if debug >= DEBUG_COMMANDS:
announce(b"executing '%s'%s" % (dcmd, legend))
try:
- retcode = subprocess.call(dcmd + mute, shell=True)
+ retcode = subprocess.call("(" + dcmd + ")" + mute, shell=True)
if retcode < 0:
complain(b"child was terminated by signal %d." % -retcode)
elif retcode != 0:
self.date = None
def list_method(*args):
- args = preamble("log", args)
+ args = preamble("list", args)
width = screenwidth()
for arg in args:
sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "=")))
sys.stdout.write("%-4d | %s\n%s" % (item.revno, item.date, item.log))
sys.stdout.write(("-" * (width - 1)) + "\n")
+def checkout_method(*args):
+ args = preamble("checkout", args)
+ width = screenwidth()
+ for arg in args:
+ revlist = log_capture(arg)
+ do_or_die("mv .src/{0},v . && rm {0} && co -l {0} && mv {0},v .src".format(arg))
+ announce("%s <- %d" % (arg, len(revlist)))
dispatch = {
- "help": help_method,
- "init": init_method,
- "add": add_method,
- "commit": commit_method,
- "list": list_method,
- "log": log_method,
+ "help": help_method,
+ "init": init_method,
+ "add": add_method,
+ "commit": commit_method,
+ "list": list_method,
+ "log": log_method,
+ "checkout": checkout_method,
}
if __name__ == "__main__":