--- a/mercurial/cmdutil.py Sun Dec 02 18:11:59 2007 -0600
+++ b/mercurial/cmdutil.py Sun Dec 02 18:41:22 2007 -0600
@@ -366,7 +366,11 @@
if ui.verbose or not exact:
ui.status(_('copying %s to %s\n') % (relsrc, reltarget))
targets[abstarget] = abssrc
- if abstarget != origsrc:
+ if abstarget == origsrc: # copying back a copy?
+ if repo.dirstate[abstarget] not in 'mn':
+ if not opts.get('dry_run'):
+ repo.add([abstarget])
+ else:
if repo.dirstate[origsrc] == 'a':
if not ui.quiet:
ui.warn(_("%s has not been committed yet, so no copy "