]> thyrsus.com Git - src.git/commitdiff
Make branch_method fractionally less stubby.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 11:29:34 +0000 (06:29 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 9 Nov 2014 11:29:34 +0000 (06:29 -0500)
src
src.asc

diff --git a/src b/src
index e603ae772926545dfc7816c4a9579078618a3ae0..cadb2228c69b92f0f439d55132e66e3abf1eb6eb 100755 (executable)
--- a/src
+++ b/src
@@ -281,7 +281,8 @@ src cat [revision-spec] ['file'...]
    Send the specified revisions of the files to standard output.
 
 src branch [delete|del|-d] ['branchname']
-   Create, switch to, or delete a branch. With no arguments, list branches.
+   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 tag [delete|del|-d] ['tagname'] ['revision-spec'] ['file'...] 
    Create, switch to, or delete a tag. With no arguments, list tags.
@@ -651,7 +652,10 @@ def branch_method(*args):
     if not os.path.exists(repodir):
         croak("repository subdirectory %s does not exist" % repodir)
     args = list(args)
-    croak("branches are not yet implemented.")
+    if not args:
+        sys.stdout.write("trunk\n")
+    else:
+        croak("branches are not yet implemented.")
 
 def filecmd(legend, hook, args):
     (revspec, args) = preamble(legend, args)
diff --git a/src.asc b/src.asc
index a40c94dbbd0e1776bc1c406f4b1f56260b91e862..9c625b515a447f8ead5bd5e1489a543afb4db0a3 100644 (file)
--- a/src.asc
+++ b/src.asc
@@ -65,7 +65,8 @@ src cat [revision-spec] ['file'...]::
    Send the specified revisions of the files to standard output.
 
 src branch [delete|del|-d] ['branchname']::
-   Create, switch to, or delete a branch. With no arguments, list branches.
+   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 tag [delete|del|-d] ['tagname'] ['revision-spec'] ['file'...]::
    Create, switch to, or delete a tag. With no arguments, list tags.