From e14e269ee26fb9b74e3d9832d5c391b63cb61730 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 16 Nov 2014 01:29:07 -0500 Subject: [PATCH] Documentation for src diff. --- src | 20 +++++++++++++++++++- src.asc | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src b/src index 529933e..8a85c35 100755 --- a/src +++ b/src @@ -270,6 +270,7 @@ cat -- the cat command: dumping revisions to standard output. status -- the status command: more details and unusual status codes. log -- the log command: dump commit log information to standard output. list -- the list command: dump commit summaries to standard output. +diff -- the diff command: dump revision differences to standard output. fast-export -- the fast-export command: export history to other systems. ignores -- .srcignore files and their uses. """, @@ -563,6 +564,20 @@ of beginning each commit with a self-contained summary line. With no revision, dumps a log of the entire current branch. 'li' is a synonym for 'list'. +""", + "diff" : """ +src diff ['revision-range'] ['file'...] + +Sends a diff listing to standard output. 'di' is a synonym. + +With no revision spec, diffs the working copy against the last version +checked in. With one revno, diffs the working copy against that stored +revision; with a range, diff between the beginning and end of the +range. + +The actual difference generation is done with diff(1), The default +diff format is -u, but if you specify options such as -c or -b after +the verb they will be passed to the command. """, "fast-export" : """ src fast-export ['revision-range'] ['file'...] @@ -1047,9 +1062,11 @@ def diff_method(*args): ctx = CommandContext("diff", args) if type(args) == type(()): args = list(args) - diffopts = "-u" + diffopts = "" while args and args[0].startswith("-"): diffopts += " " + args.pop(0) + if not diffopts: + diffopts = "-u" for arg in ctx.args: diffspec1 = diffspec2 = "" if not ctx.is_empty(): @@ -1328,6 +1345,7 @@ dispatch = { "st": status_method, "cat": cat_method, "diff": diff_method, + "di": diff_method, "tag": tag_method, "branch": branch_method, "ls": ls_method, diff --git a/src.asc b/src.asc index d29d1d9..f8f0254 100644 --- a/src.asc +++ b/src.asc @@ -100,7 +100,8 @@ src diff ['revision-range'] ['file'...]:: Sends a diff listing to standard output. With no revision spec, diffs the working copy against the last version checked in. With one revno, diffs the working copy against that stored revision; with a range, - diff between the beginning and end of the range. + diff between the beginning and end of the range. "di" is a synonym + for "diff". src ls:: List all registered files. -- 2.43.0