Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 363:ae96b7e1318d
Add hg copy
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Add hg copy
extend dirstate to remember copies
add copy command
add copy repo operation
write copy metadata with commit
manifest hash: 9f42c7b4a2400d35807b5f18c05a31814fa3e375
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCsMBTywK+sNU5EO8RAjXpAJ9fvNtTP1A/4veqFWQHcWGro7buyACgoVXz
/ngGOFowxS/zGkvUvGavYGQ=
=drb1
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Wed, 15 Jun 2005 15:57:07 -0800 |
parents | 3e18360a8912 |
children | f94d3632a323 |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jun 15 15:50:28 2005 -0800 +++ b/mercurial/commands.py Wed Jun 15 15:57:07 2005 -0800 @@ -250,6 +250,10 @@ 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 @@ ('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>'),