src status [-a] ['file'...]
'A' = added, '=' = unmodified, 'M' = modified, '!' = missing, '?' = not
tracked, 'I' = ignored, 'L' = locked (recover with src checkout).
- Find more details under 'help status'. 'st' is a synonym fot status.
+ Find more details under 'help status'. 'st' is a synonym for status.
src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...]
List tags, create tags, or delete tags. Takes a singleton
Rename a tag or branch. Refuses to step on an existing symbol or
rename a nonexistent one. 'rn' is a synonym for 'rename'.
-src list [-f fmt] ['revision-range'] ['file'...]
+src list [-l n] [-f fmt] ['revision-range'] ['file'...]
Sends summary information about the specified commits to standard output.
The summary line tagged with '*' is the state that the file would
return to on checkout without a revision-spec. See 'help list' for
- information about custom formats.
+ information about custom formats. Use -l n to omit the listing length.
-src log ['revision-range'] ['file'...]
+src log [-l n] ['revision-range'] ['file'...]
Sends log information about the specified commits to standard output.
+ Use -l n to omit the listing length.
src diff ['revision-range'] ['file'...]
Sends a diff listing to standard output. With no revision spec, diffs
cannot be deleted.
""",
"log" : """
-src log ['revision-range'] ['file'...]
+src log [-l n] ['revision-range'] ['file'...]
Sends log information about the specified commits of each file
to standard output. The log information includes the revision
number, the date, and the log comment.
With no revision, dumps a log of the entire current branch.
+
+The -l option can be used to limit the listing length. It is not
+primarily intended for use by humans, but rather for Emacs VC mode.
""",
"list" : """
-src list [-f fmt] ['revision-range'] ['file'...]
+src list [-l n] [-f fmt] ['revision-range'] ['file'...]
Sends summary information about the specified commits of each file
to standard output. The summary information includes the revision
{3} The date in RFC3339 format
{4} The summary line
+The -l option can be used to limit the listing length. It is not
+primarily intended for use by humans, but rather for Emacs VC mode.
+
'li' is a synonym for 'list'.
""",
"diff" : """
"Generate a summary listing of commits, one line per commit."
args = list(args)
custom = None
+ limit = None
if args[0] == '--':
args.pop(0)
elif args[0] == "-f":
elif args[0].startswith("-f"):
custom = args[0][2:]
args.pop(0)
+ elif args[0] == "-l":
+ args.pop(0)
+ try:
+ limit = args[0]
+ args.pop(0)
+ limit = int(limit)
+ except IndexError:
+ croak("list -f requires a following string")
+ except ValueError:
+ croak("%s is not an integer" % limit)
ctx = CommandContext("list", args, default_to="branch_reversed")
for arg in ctx.args:
if ignore(arg) or not registered(arg):
% (item.revno, mark, item.date, summary))
else:
sys.stdout.write(custom.format(arg, item.revno, mark, item.date, summary))
+ if limit is not None:
+ limit -= 1
+ if limit <= 0:
+ break
def log_method(*args):
"Report revision logs"
+ limit = None
+ args = list(args)
+ if args[0] == '--':
+ args.pop(0)
+ elif args[0] == "-l":
+ args.pop(0)
+ try:
+ limit = args[0]
+ args.pop(0)
+ limit = int(limit)
+ except IndexError:
+ croak("list -f requires a following string")
+ except ValueError:
+ croak("%s is not an integer" % limit)
ctx = CommandContext("log", args, default_to="branch_reversed")
for arg in ctx.args:
if ignore(arg) or not registered(arg):
for item in ctx.resolve(History(arg), backwards=True):
sys.stdout.write("%-4d | %s\n%s" % (item.revno,item.date,item.log))
sys.stdout.write(("-" * WIDTH) + "\n")
+ if limit is not None:
+ limit -= 1
+ if limit <= 0:
+ break
def checkout_method(*args):
"Refresh the working copy from the history file."