"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.
+'-' 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.
The token "--" tells the command-line interpreter that revision-specs
-ad subcommands are done - everything after it is a filename, even
+and subcommands are done - everything after it is a filename, even
if it looks like a subcommand or revision number.
src help [command]
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-spec'] ['file'...]
Refresh the working copy of the file(s) from their history files.
co is a synonym for checkout.
src list ['revision-spec'] ['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.
+ state that checkout would return to. The default revision-spec is
+ all commits on the current branch.
src log ['revision-spec'] ['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'...]
Sends a diff listing to standard output. With no revision spec, diffs
the working copy against the last version checked in. With one revno,
if args[0] == '--':
args.pop(0)
elif args[0] == "-":
- commentfp = sys.stdin.read()
+ comment = sys.stdin.read()
args.pop(0)
elif args[0] == "-m":
args.pop(0)
master = RCSLog(arg)
revspec = master.resolve(revspec)
if revspec is None:
- revspec = range(1, len(master)+1)
+ revspec = [master.tip().revno]
with lifted(arg):
for item in master:
if item.revno in revspec:
== 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 "-".
+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.
The token "--" tells the command-line interpreter that revision-specs
-ad subcommands are done - everything after it is a filename, even
+and subcommands are done - everything after it is a filename, even
if it looks like a subcommand or revision number.
src help [command]::
src list ['revision-spec'] ['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.
+ state that checkout would return to. The default revision-spec is
+ all commits on the current branch.
src log ['revision-spec'] ['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'...]
Sends a diff listing to standard output. With no revision spec, diffs
check "add"
src commit -m "First comment" testfile$$ >/dev/null
-check "commit"
+check "commit with -m option"
src cat testfile$$ | diff testfile$$ - >/dev/null
-check "diff"
+check "content check after first commit"
cat >testfile$$ <<EOF
Now is the time
for all good men
EOF
-echo "Second comment" | src commit -m - testfile$$ >/dev/null
-check "commit"
+echo "Second comment" | src commit - testfile$$ >/dev/null
+check "commit with -"
+
+src cat testfile$$ | diff testfile$$ -
+check "content check after second commit"
# end