def complain(msg):
sys.stderr.write("src: " + msg + "\n")
-debug = 0
+debug = 1
DEBUG_COMMANDS = 1 # Show commands as they are executed
def do_or_die(dcmd, legend=b""):
do_or_die("ci -l %s && mv %s,v .src" % (arg, arg))
announce("%s: 1" % arg)
+def commit_method(*args):
+ "Commit changes to files."
+ for arg in args:
+ if not os.path.exists(arg):
+ complain("I see no '%s' here." % arg)
+ elif not os.path.exists(".src/%s,v"):
+ complain("%s is not registered.")
+ else:
+ do_or_die("mv .src/{0},v . && ci -l {0} && mv {0},v .src".format(arg))
+ #announce("%s: 1" % arg)
+
dispatch = {
"help": help_method,
"init": init_method,
"add": add_method,
+ "commit": add_method,
}
if __name__ == "__main__":