From: Eric S. Raymond Date: Thu, 13 Nov 2014 23:50:41 +0000 (-0500) Subject: src log and src list now skip ignored and unregistered files. X-Git-Tag: 0.8~9 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=7757a9ef1994c893e920427a1609b228504f96e8;p=src.git src log and src list now skip ignored and unregistered files. --- diff --git a/NEWS b/NEWS index e6ad872..be6146f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ Repository head: A branch label names the tip revision of its branch. + src log and src list skip ignored and unregistered files in arguments. + The embedded help has neen enriched and now fearures multiple topics 0.7: 2014-11-13 Bugfix release: fix initial file commit. There was a bug in my tests... diff --git a/TODO b/TODO index e94335b..29072f2 100644 --- a/TODO +++ b/TODO @@ -3,6 +3,11 @@ * src branch delete. Should branch_delete really obsolesce branches or just mark them dead? +* commands that require operands to exist should ignore those that match + an ignore pattern. + +* should be possible to range-restict a tag or branch listing. + * vc.el KNOWN BUGS diff --git a/src b/src index 6ffd6a2..eb05d81 100755 --- a/src +++ b/src @@ -703,6 +703,8 @@ def list_method(*args): ctx = CommandContext("list", args, default_to="branch_reversed") width = screenwidth() for arg in ctx.args: + if ignore(arg) or not registered(arg): + continue sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "="))) for item in ctx.resolve(History(arg), backwards=True): # Must allow enough room for revno and date @@ -719,6 +721,8 @@ def log_method(*args): ctx = CommandContext("log", args, default_to="branch_reversed") width = screenwidth() for arg in ctx.args: + if ignore(arg) or not registered(arg): + continue sys.stdout.write("= %s %s\n" % (arg, ((width - len(arg) - 5) * "="))) for item in ctx.resolve(History(arg), backwards=True): sys.stdout.write("%-4d | %s\n%s" % (item.revno,item.date,item.log)) diff --git a/src.asc b/src.asc index b0cd5a3..0a7f173 100644 --- a/src.asc +++ b/src.asc @@ -31,7 +31,7 @@ an editor instance when you perform a commit. == COMMAND SUMMARY == A 'revision' is a 1-origin integer, or a tag name designating an -integer revision, or a branch name esignatingthe tip revision of its +integer revision, or a branch name designating the tip revision of its branch. Revision numbers always increase in commit-date order. A revision range is a single revision, or a pair of revisions M-N (all @@ -45,9 +45,9 @@ Unless otherwise noted under individual commands, the default revision is the tip revision on the current branch and the default range is all revisions on the current branch. -The token "--" tells the command-line interpreter that revision-specs -and subcommands are done - everything after it is a filename, even -if it looks like a subcommand or revision number. +The token "--" tells the command-line interpreter that subcommands, +switches, and revision-specs are done - everything after it is a filename, +even if it looks like a subcommand or revision number. src help [command]:: Displays help for commands.