List all registered files.
src move 'old' 'new'
- Rename a file and its master. Refuses to step on existing files or masters.
- 'mv' and 'rename' are synonyms.
+ Rename a workfile and its history. Refuses to step on existing
+ workfiles or histories. 'mv' and 'rename' are synonyms.
src copy 'old' 'new'
- Copy a file and its master. Refuses to step on existing files or masters.
- 'cp' is a synonym.
+ Copy a workfile and its history. Refuses to step on existing files
+ or histories. 'cp' is a synonym.
src fast-export ['revision-range'] ['file'...]
Export one or more projects to standard output as a git fast-import stream.
set_method(name, revision, metadata, arg)
if not quiet and len(args) > 1:
# FIXME: Misleading message when creating a branch.
- announce("%s %s = %s in " % (legend, name, revno, arg))
+ #announce("%s %s = %s in " % (legend, name, revno, arg))
+ pass
def tag_method(*args):
"Inspect, create, and delete tags."
def __enter__(self):
do_or_die("mv {0}/{1},v .".format(repodir, self.name))
def __exit__(self, extype, value, traceback_unused):
+ if extype and debug > 0:
+ raise extype(value)
do_or_die("mv {0},v {1}".format(self.name, repodir))
return True
def lifter(self, name):
croak("branch deletion is not yet supported")
def set_branch(self, name, revision, metadata, arg):
"Set the specified branch to be default, creating it if required."
- def branchfrom(c, p):
- "Is c a branch child (not direct descendant) of parent p?"
- c = c.split(".")
- p = p.split(".")
- return len(c) == len(p) + 2 and c[len(p):] == p
- newsib = len(item for item in metatdata.revlist \
- if branchfrom(item.revision, baserev))
- croak("branch change is not yet supported")
- #do_or_die("rcs -b%s %s" % (revision, name))
+ if name in metadata.symbols:
+ base = metadata.symbols[name]
+ else:
+ def branchfrom(c, p):
+ "Is c a branch child (not direct descendant) of parent p?"
+ c = c.split(".")
+ p = p.split(".")
+ return len(c) == len(p) + 2 and c[len(p):] == p
+ baserev = metadata.current()
+ print "Beginning branch computation from", baserev
+ newsib = len([item for item in metadata.revlist \
+ if branchfrom(item.revision, baserev)])
+ print "Continuing branch computation"
+ # Use CVS sticky-tag format here? If so, we'd have to do
+ # some unscrambling just above in the non-new case
+ base = baserev + "." + str(newsib)
+ print "New branch", base
+ do_or_die("rcs -n{0}:{1} {2}".format(name, base, arg), loud=True)
+ do_or_die("rcs -b%s %s" % (base, arg), loud=True)
def move(self, source, target):
"Move a file and its history."
do_or_die("mv {0} {1} && mv {2} {3}".format(source, target,