comparison 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
comparison
equal deleted inserted replaced
362:410373162036 363:ae96b7e1318d
248 248
249 if opts['addremove']: 249 if opts['addremove']:
250 addremove(ui, repo, *files) 250 addremove(ui, repo, *files)
251 repo.commit(relpath(repo, files), text, opts['user'], opts['date']) 251 repo.commit(relpath(repo, files), text, opts['user'], opts['date'])
252 252
253 def copy(ui, repo, source, dest):
254 """mark a file as copied or renamed for the next commit"""
255 return repo.copy(*relpath(repo, (source, dest)))
256
253 def debugaddchangegroup(ui, repo): 257 def debugaddchangegroup(ui, repo):
254 data = sys.stdin.read() 258 data = sys.stdin.read()
255 repo.addchangegroup(data) 259 repo.addchangegroup(data)
256 260
257 def debugchangegroup(ui, repo, roots): 261 def debugchangegroup(ui, repo, roots):
606 ('A', 'addremove', None, 'run add/remove during commit'), 610 ('A', 'addremove', None, 'run add/remove during commit'),
607 ('l', 'logfile', "", 'commit text file'), 611 ('l', 'logfile', "", 'commit text file'),
608 ('d', 'date', "", 'data'), 612 ('d', 'date', "", 'data'),
609 ('u', 'user', "", 'user')], 613 ('u', 'user', "", 'user')],
610 'hg commit [files]'), 614 'hg commit [files]'),
615 "copy": (copy, [], 'hg copy <source> <dest>'),
611 "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'), 616 "debugaddchangegroup": (debugaddchangegroup, [], 'debugaddchangegroup'),
612 "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'), 617 "debugchangegroup": (debugchangegroup, [], 'debugchangegroup [roots]'),
613 "debugindex": (debugindex, [], 'debugindex <file>'), 618 "debugindex": (debugindex, [], 'debugindex <file>'),
614 "debugindexdot": (debugindexdot, [], 'debugindexdot <file>'), 619 "debugindexdot": (debugindexdot, [], 'debugindexdot <file>'),
615 "diff": (diff, [('r', 'rev', [], 'revision')], 620 "diff": (diff, [('r', 'rev', [], 'revision')],