Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4833:fc8b3e7cbf6b
improve warning for hg add foo; hg mv foo bar
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 11 Jul 2007 19:56:16 -0300 |
parents | 7db38bfb307e |
children | 9858477ed74c |
comparison
equal
deleted
inserted
replaced
4832:0875082d5471 | 4833:fc8b3e7cbf6b |
---|---|
531 if ui.verbose or not exact: | 531 if ui.verbose or not exact: |
532 ui.status(_('copying %s to %s\n') % (relsrc, reltarget)) | 532 ui.status(_('copying %s to %s\n') % (relsrc, reltarget)) |
533 targets[abstarget] = abssrc | 533 targets[abstarget] = abssrc |
534 if abstarget != origsrc: | 534 if abstarget != origsrc: |
535 if repo.dirstate.state(origsrc) == 'a': | 535 if repo.dirstate.state(origsrc) == 'a': |
536 ui.warn(_("%s was marked for addition. " | 536 if not ui.quiet: |
537 "%s will not be committed as a copy.\n") | 537 ui.warn(_("%s has not been committed yet, so no copy " |
538 % (repo.pathto(origsrc, cwd), reltarget)) | 538 "data will be stored for %s.\n") |
539 % (repo.pathto(origsrc, cwd), reltarget)) | |
539 if abstarget not in repo.dirstate and not opts.get('dry_run'): | 540 if abstarget not in repo.dirstate and not opts.get('dry_run'): |
540 repo.add([abstarget], wlock) | 541 repo.add([abstarget], wlock) |
541 elif not opts.get('dry_run'): | 542 elif not opts.get('dry_run'): |
542 repo.copy(origsrc, abstarget, wlock) | 543 repo.copy(origsrc, abstarget, wlock) |
543 copied.append((abssrc, relsrc, exact)) | 544 copied.append((abssrc, relsrc, exact)) |