def help_method(*_args):
"Summarize src commands, or (with argument) show help for a single command."
- print"""
+ print("""
A 'revision' is a 1-origin integer, or a tag name designating an
integer revision. A revision range is a single revision or a pair of
revisions separated by"-" or "..". Unless otherwise noted under
Report the version of src.
The omission of 'src remove' is a deliberate speed bump.
-"""
+""")
class CommandContext:
"Consume a revision specification or range from an argument list"
sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "=")))
if legend == "branch":
sys.stdout.write(" 0\t%s\n" % metadata.branch)
- for (key, value) in metadata.symbols.items():
+ for (key, value) in list(metadata.symbols.items()):
if legend == "branch":
if key == metadata.branch:
continue
last_commit_mark = mark
markmap[item.revno] = mark
sys.stdout.write("reset refs/heads/%s\nfrom :%d\n\n" % (branch, mark))
- for (key, val) in metadata.symbols.items():
+ for (key, val) in list(metadata.symbols.items()):
val = metadata.rcs_to_revno(val)
if val in ctx:
sys.stdout.write("reset refs/tags/%s\nfrom :%d\n\n" % (key, markmap[val]))
metadata.revlist[-1].log += line
# Now that we have the symbol table...
if metadata.branch != "trunk":
- for (k, v) in metadata.symbols.items():
+ for (k, v) in list(metadata.symbols.items()):
if v == metadata.branch:
metadata.branch = k
break
metadata.revlist.reverse()
if debug >= DEBUG_PARSE:
#print "\t%d revisions" % len(metadata.revlist)
- print "\tlockrevs:", metadata.lockrevs
- print "\tsymbols:", metadata.symbols
+ print("\tlockrevs:", metadata.lockrevs)
+ print("\tsymbols:", metadata.symbols)
if __name__ == "__main__":
try:
help_method()
else:
try:
- apply(dispatch[commandline[0]], commandline[1:])
+ dispatch[commandline[0]](*commandline[1:])
except KeyError:
sys.stderr.write("src: no such commandline as '%s'. Try 'src help'\n" \
% commandline[0])