Show More
@@ -366,7 +366,11 b' def copy(ui, repo, pats, opts):' | |||||
366 | if ui.verbose or not exact: |
|
366 | if ui.verbose or not exact: | |
367 | ui.status(_('copying %s to %s\n') % (relsrc, reltarget)) |
|
367 | ui.status(_('copying %s to %s\n') % (relsrc, reltarget)) | |
368 | targets[abstarget] = abssrc |
|
368 | targets[abstarget] = abssrc | |
369 |
if abstarget |
|
369 | if abstarget == origsrc: # copying back a copy? | |
|
370 | if repo.dirstate[abstarget] not in 'mn': | |||
|
371 | if not opts.get('dry_run'): | |||
|
372 | repo.add([abstarget]) | |||
|
373 | else: | |||
370 | if repo.dirstate[origsrc] == 'a': |
|
374 | if repo.dirstate[origsrc] == 'a': | |
371 | if not ui.quiet: |
|
375 | if not ui.quiet: | |
372 | ui.warn(_("%s has not been committed yet, so no copy " |
|
376 | ui.warn(_("%s has not been committed yet, so no copy " |
General Comments 0
You need to be logged in to leave comments.
Login now