tracked, I = ignored, L = locked (recover with src checkout).
Find more details under 'help status'. 'st' is a synonym fot status.
-src tag [list|-l|delete|del|-d] ['name'] ['revision'] ['file'...]
+src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...]
List tags, create tags, or delete tags. Takes a singleton
revision, defaulting to the current branch tip.
-src branch [list|-l|delete|del|-d] ['name'] ['file'...]
- List, create, or delete branches. the active branch is first in
- the list. The default branch is 'trunk'.
+src branch [list|create|-c-l|delete|del|-d] ['name'] ['file'...]
+ List, create, or delete branches. When listing, the active branch
+ is first in the list. The default branch is 'trunk'.
src rename ['tag'|'branch'] ['oldname'] ['newname'] ['file'...]
Rename a tag or branch. Refuses to step on an existing symbol or
This command is mainly intended for use in scripts.
""",
"tag" : """
-src tag [list|-l|delete|del|-d] ['name'] ['revision'] ['file'...]
+src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...]
-List tags (with -l), create tags, or delete tags (with -d).
+List tags (with -l), create tags (with -c), or delete tags (with -d).
Takes at most a singleton revision; the default is the current branch tip.
cannot be deleted.
""",
"branch" : """
-src branch [list|-l|delete|del|-d] ['name'] ['file'...]
+src branch [list|-l|create|-c|delete|del|-d] ['name'] ['file'...]
-List branches (with -l), create branches, or delete branches (with -d).
+List branches (with -l), create branches (with -c), or delete branches
+(with -d).
In the list produced by '-', the active branch is first in the list.
if not quiet and len(args) > 1:
announce("in %s, %s %s removed" % (arg, legend, name))
return
- elif args[0] in ("-l", "list"):
+ if args[0] in ("-l", "list"):
args.pop(0)
ctx = CommandContext(legend + " listing", args, require_empty=True)
width = screenwidth()
if backend.isbranch(value) == (legend == "branch"):
sys.stdout.write("%4s\t%s\n" % (display,key))
return
- if not args:
- croak("%s setting requires a name argument" % legend)
- name = args.pop(0)
- ctx = CommandContext(legend, args)
- if ctx.is_range():
- croak("can't accept a range when setting a %s" % legend)
- for arg in ctx.args:
- metadata = History(arg)
- revision = validation_hook(ctx, metadata, name)
- with backend.lifter(arg):
- set_method(name, revision, metadata)
- if not quiet and len(args) > 1:
- announce("in %s, %s %s = %s" % (arg, legend, name, ctx.start))
+ if args[0] in ("-c", "create"):
+ args.pop(0)
+ if not args:
+ croak("%s setting requires a name argument" % legend)
+ name = args.pop(0)
+ ctx = CommandContext(legend, args)
+ if ctx.is_range():
+ croak("can't accept a range when setting a %s" % legend)
+ for arg in ctx.args:
+ metadata = History(arg)
+ revision = validation_hook(ctx, metadata, name)
+ with backend.lifter(arg):
+ set_method(name, revision, metadata)
+ if not quiet and len(args) > 1:
+ announce("in %s, %s %s = %s" % (arg, legend, name, ctx.start))
+ return
+ else:
+ croak("%s requires a list, create, or delete modifier" % legend)
def tag_method(*args):
"Inspect, create, and delete tags."
give the -a switch or specify which files to look at. "st" is a
synonym for status.
-src tag [list|-l|delete|del|-d] ['name'] ['revision'] ['file'...]::
+src tag [list|-l|create|-c|delete|del|-d] ['name'] ['revision'] ['file'...]::
List tags, create tags, or delete tags. Takes a singleton
revision, defaulting to the current branch tip.
-src branch [list|-l|delete|del|-d] ['name'] ['file'...]::
- List, create, or delete branches. the active branch is first in
- the list. The default branch is 'trunk'.
+src branch [list|-l|create|-c|delete|del|-d] ['name'] ['file'...]::
+ List, create, or delete branches. When listing, the active branch
+ is first in the list. The default branch is 'trunk'.
src rename ['tag'|'branch'] ['oldname'] ['newname'] ['file'...]::
Rename a tag or branch. Refuses to step on an existing symbol or
check "revision $rev content test"
done
-src $TESTOPTS tag sampletag
+src $TESTOPTS tag create sampletag
check "tag set to default tip revision"
cat >testfile8 <<EOF
= testfile1 =================================================================
3 sampletag
EOF
-src $TESTOPTS tag >testfile9
+src $TESTOPTS tag list >testfile9
diff -u testfile8 testfile9
check "tag list check"
-src $TESTOPTS tag basetag 1
+src $TESTOPTS tag create basetag 1
check "tag set to revision 1"
cat >testfile10 <<EOF
1 basetag
3 sampletag
EOF
-src $TESTOPTS tag >testfile11
+src $TESTOPTS tag -l >testfile11
diff -u testfile10 testfile11
check "second tag list check"