Mercurial > hg-stable
changeset 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 | 0875082d5471 |
children | 439e2f2fde42 |
files | mercurial/commands.py tests/test-copy2.out |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jul 11 18:15:21 2007 -0300 +++ b/mercurial/commands.py Wed Jul 11 19:56:16 2007 -0300 @@ -533,9 +533,10 @@ targets[abstarget] = abssrc if abstarget != origsrc: if repo.dirstate.state(origsrc) == 'a': - ui.warn(_("%s was marked for addition. " - "%s will not be committed as a copy.\n") - % (repo.pathto(origsrc, cwd), reltarget)) + if not ui.quiet: + ui.warn(_("%s has not been committed yet, so no copy " + "data will be stored for %s.\n") + % (repo.pathto(origsrc, cwd), reltarget)) if abstarget not in repo.dirstate and not opts.get('dry_run'): repo.add([abstarget], wlock) elif not opts.get('dry_run'):
--- a/tests/test-copy2.out Wed Jul 11 18:15:21 2007 -0300 +++ b/tests/test-copy2.out Wed Jul 11 19:56:16 2007 -0300 @@ -3,13 +3,13 @@ abort: no files to copy ? foo # dry-run; print a warning that this is not a real copy; foo is added -foo was marked for addition. bar will not be committed as a copy. +foo has not been committed yet, so no copy data will be stored for bar. A foo # should print a warning that this is not a real copy; bar is added -foo was marked for addition. bar will not be committed as a copy. +foo has not been committed yet, so no copy data will be stored for bar. A bar # should print a warning that this is not a real copy; foo is added -bar was marked for addition. foo will not be committed as a copy. +bar has not been committed yet, so no copy data will be stored for foo. A foo # dry-run; should show that foo is clean C foo