if val in revrange:
sys.stdout.write("reset refs/tags/%s\nfrom :%d\n\n" % (key, markmap[val]))
-def dircmd(legend, hook, args):
- (revspec, args) = preamble(legend, args)
- if revspec is not None:
- croak("%s doesn't take a revision spec" % legend)
- if args:
- target = args.pop(0)
- else:
- croak("%s requires a directory argument" % legend)
- if not os.path.exists(target):
- croak("%s does not exist" % arg)
- if not os.path.isdir(target):
- croak("%s is not a directory" % arg)
- init_method(target)
- for arg in args:
- if not os.path.exists(arg):
- croak("I see no '%s' here." % arg)
- elif not os.path.exists(backend.master(arg)):
- croak("%s is not registered, skipping." % arg)
- else:
- hook(arg, target)
- if not quiet and len(args) > 1:
- announce("%s -> %s" % target)
-
-def moveto_method(*args):
- "Move a file and its history to another directory."
- dircmd("moveto", backend.moveto, args)
-
-def copyto_method(*args):
- "Copy a file and its history to another directory."
- dircmd("copyto", backend.copyto, args)
-
def filecmd(legend, hook, args):
(revspec, args) = preamble(legend, args)
if revspec is not None:
"tag": tag_method,
"branch": branch_method,
"fast-export": fast_export_method,
- "moveto": moveto_method,
- "copyto": copyto_method,
"ls": ls_method,
"move": move_method,
"mv": move_method,
Rename a file and its master. Refuses to step on existing files or masters.
'cp' is a synonym.
-src moveto 'directory' ['file'...]::
- Moves files and their histories to another directory.
-
-src copyto 'directory' ['file'...]::
- Copies files and their histories to another directory.
-
src fast-export ['file'...]::
Export one or more projects as a git fast-import stream.
The committer identification is copied from your Git configuration.