--- a/mercurial/commands.py Fri Jun 09 08:42:36 2006 -0700
+++ b/mercurial/commands.py Fri Jun 09 08:48:30 2006 -0700
@@ -1172,9 +1172,10 @@
if not copylist:
raise util.Abort(_('no files to copy'))
- for targetpath, srcs in copylist:
- for origsrc, abssrc, relsrc, exact in srcs:
- copy(origsrc, abssrc, relsrc, targetpath(abssrc), exact)
+ if not opts.get('dry_run'):
+ for targetpath, srcs in copylist:
+ for origsrc, abssrc, relsrc, exact in srcs:
+ copy(origsrc, abssrc, relsrc, targetpath(abssrc), exact)
if errors:
ui.warn(_('(consider using --after)\n'))
@@ -2882,7 +2883,8 @@
('f', 'force', None,
_('forcibly copy over an existing managed file')),
('I', 'include', [], _('include names matching the given patterns')),
- ('X', 'exclude', [], _('exclude names matching the given patterns'))],
+ ('X', 'exclude', [], _('exclude names matching the given patterns')),
+ ('n', 'dry-run', None, _('print what would be done'))],
_('hg copy [OPTION]... [SOURCE]... DEST')),
"debugancestor": (debugancestor, [], _('debugancestor INDEX REV1 REV2')),
"debugcomplete":