mercurial/commands.py
changeset 363 ae96b7e1318d
parent 355 3e18360a8912
child 365 f94d3632a323
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -250,6 +250,10 @@ def commit(ui, repo, *files, **opts):
         addremove(ui, repo, *files)
     repo.commit(relpath(repo, files), text, opts['user'], opts['date'])
 
+def copy(ui, repo, source, dest):
+    """mark a file as copied or renamed for the next commit"""
+    return repo.copy(*relpath(repo, (source, dest)))
+
 def debugaddchangegroup(ui, repo):
     data = sys.stdin.read()
     repo.addchangegroup(data)
@@ -608,6 +612,7 @@ table = {
                    ('d', 'date', "", 'data'),
                    ('u', 'user', "", 'user')],
                   'hg commit [files]'),
+    "copy": (copy, [], 'hg copy <source> <dest>'),
     "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),
     "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'),
     "debugindex": (debugindex, [], 'debugindex <file>'),