From 998d76167f9f2cfdf7f09b97c475d537eaa71fb6 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 9 Nov 2014 12:11:41 -0500 Subject: [PATCH] Revise the syntax descruiptions. Regression test passes. --- src | 34 +++++++++++++++++++--------------- src.asc | 35 +++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/src b/src index 5f25b45..8611a3e 100755 --- a/src +++ b/src @@ -274,10 +274,12 @@ class History: def help_method(*args): "Summarize src commands, or (with argument) show help for a single command." print""" -A revision-spec can be a 1-origin revno or a pair of them separated by -'-' or '..'. Revisions can be designated by named tags. Unless otherwise -noted under individual commands, if no revision-spec is included in a -command that wants one, the tip revision on the current branch is selected. +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 +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 @@ -296,7 +298,7 @@ src commit [- | -m 'commentstring' | -f 'commentfile'] ['file'...] following string as the comment; with '-f' take from a file. ci is a synonym for commit. -src checkout ['revision-spec'] ['file'...] +src checkout ['revision'] ['file'...] Refresh the working copy of the file(s) from their history files. co is a synonym for checkout. @@ -304,30 +306,32 @@ src status ['file'...] A = added, U = unmodified, M = modified, ! = missing, ? = not tracked, I = ignored. -src cat [revision-spec] ['file'...] +src cat [revision-range] ['file'...] Send the specified revisions of the files to standard output. -src tag [list|-l|delete|del|-d] ['tagname'] ['revision-spec'] ['file'...] - Create, switch to, or delete a tag. With no arguments, list tags. +src tag [list|-l|delete|del|-d|rename|-r] ['name'] ['revision'] ['file'...] + Create, rename, or delete a tag. With no or only file arguments, list tags. -src branch [list|-l|delete|del|-d] ['branchname'] - Create, switch to, or delete a branch. With no arguments, list branches; - the active branch is first in the list. The dafault branch is 'trunk'. +src branch [list|-l|delete|del|-d|rename|-r] ['name'] ['revision'] ['file'...] + Create, rename, switch to, or delete a branch. With no arguments, + list branches; the active branch is first in the list. The default + branch is 'trunk'. -src list ['revision-spec'] ['file'...] +src list ['revision-range'] ['file'...] Sends summary information about the specified commits to standard output. In each file listing, the summary line tagged with '*' is the state that checkout would return to. The default revision-spec is all commits on the current branch. -src log ['revision-spec'] ['file'...] +src log ['revision-range'] ['file'...] Sends log information about the specified commits to standard output. The default revision-spec is all commits on the current branch. -src diff ['revision-spec'] ['file'...] +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. src ls List all registered files. @@ -340,7 +344,7 @@ src copy 'old' 'new' Rename a file and its master. Refuses to step on existing files or masters. 'cp' is a synonym. -src fast-export ['file'...] +src fast-export ['revision-range'] ['file'...] Export one or more projects to standard output as a git fast-import stream. The committer identification is copied from your Git configuration. diff --git a/src.asc b/src.asc index 08357c9..8ddc563 100644 --- a/src.asc +++ b/src.asc @@ -30,11 +30,12 @@ an editor instance when you perform a commit. == COMMAND SUMMARY == -A revision spec is a 1-origin integer N, or a range literal M-N. -Revisions can be designated by named tags. ".." is treated as a -synonym for "-". Unless otherwise noted under individual commands, if -no revision-spec is included in a command that wants one, the tip -revision on the current branch is selected. +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 +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 @@ -53,7 +54,7 @@ src commit [- | -m commentstring | -f commentfile] ['file'...]:: following string as the comment;with '-f' take from a file. ci is a synonym for commit. -src checkout [revision-spec] ['file'...]:: +src checkout [revision] ['file'...]:: Refresh the working copy of the file(s) from their history files. co is a synonym for checkout. @@ -61,30 +62,32 @@ src status ['file'...]:: A = added, U = unmodified, M = modified, ! = missing, ? = not tracked, I = ignored. -src cat [revision-spec] ['file'...]:: +src cat [revision-range] ['file'...]:: Send the specified revisions of the files to standard output. -src tag [list|-ldelete|del|-d] ['tagname'] ['revision-spec'] ['file'...]:: - Create, switch to, or delete a tag. With no arguments, list tags. +src tag [list|-ldelete|del|-d}rename|-r] ['name'] ['revision'] ['file'...]:: + Create, rename, or delete a tag. With no or only file arguments, list tags. -src branch [list|-l|delete|del|-d] ['branchname']:: - Create, switch to, or delete a branch. With no arguments, list branches; - the active branch is first in the list. The dafault branch is 'trunk'. +src branch [list|-l|delete|del|-d] ['name'] ['revision'] ['file...']:: + Create, rename, switch to, or delete a branch. With no arguments, + list branches; the active branch is first in the list. The default + branch is 'trunk'. -src list ['revision-spec'] ['file'...]:: +src list ['revision-range'] ['file'...]:: Sends summary information about the specified commits to standard output. In each file listing, the summary line tagged with '*' is the state that checkout would return to. The default revision-spec is all commits on the current branch. -src log ['revision-spec'] ['file'...]:: +src log ['revision-range'] ['file'...]:: Sends log information about the specified commits to standard output. The default revision-spec is all commits on the current branch. -src diff ['revision-spec'] ['file'...]:: +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. src ls:: List all registered files. @@ -97,7 +100,7 @@ src copy 'old' 'new':: Rename a file and its master. Refuses to step on existing files or masters. 'cp' is a synonym. -src fast-export ['file'...]:: +src fast-export ['revision-range'] ['file'...]:: Export one or more projects as a git fast-import stream. The committer identification is copied from your Git configuration. -- 2.43.0