# HG changeset patch # User Alexis S. L. Carvalho # Date 1184194576 10800 # Node ID fc8b3e7cbf6b26b4e5f20df14335710227564d54 # Parent 0875082d547197a3199f9fd0faa93514c835b13b improve warning for hg add foo; hg mv foo bar diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -533,9 +533,10 @@ def docopy(ui, repo, pats, opts, wlock): 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'): diff --git a/tests/test-copy2.out b/tests/test-copy2.out --- a/tests/test-copy2.out +++ b/tests/test-copy2.out @@ -3,13 +3,13 @@ foo: not copying - file is not managed 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