From: Eric S. Raymond Date: Sun, 9 Nov 2014 11:29:34 +0000 (-0500) Subject: Make branch_method fractionally less stubby. X-Git-Tag: 0.3~15 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=bb81a1859bfb1504f0dfb9a99abaacda7867ff0c;p=src.git Make branch_method fractionally less stubby. --- diff --git a/src b/src index e603ae7..cadb222 100755 --- 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 a40c94d..9c625b5 100644 --- 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.