Mercurial > hg
diff tests/test-copy.t @ 39350:5b92a717bfc1
rename: return error status if any rename/copy failed
Ever since 447ea621e50e (copy: propagate errors properly, 2007-12-06),
we have returned an error status if the source file did not
exist. That commit did not return error status for any other errors,
and it's unclear if that was on purpose or not. It seems to me like we
should return an error in the other cases to, so that's what this
patch does.
Differential Revision: https://phab.mercurial-scm.org/D4419
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 29 Aug 2018 09:59:08 -0700 |
parents | cde75233c415 |
children | f1186c292d03 |
line wrap: on
line diff
--- a/tests/test-copy.t Wed Aug 29 09:54:50 2018 -0700 +++ b/tests/test-copy.t Wed Aug 29 09:59:08 2018 -0700 @@ -148,6 +148,7 @@ copy --after to a nonexistent target filename $ hg cp -A foo dummy foo: not recording copy - dummy does not exist + [1] dry-run; should show that foo is clean $ hg copy --dry-run foo bar @@ -225,11 +226,13 @@ $ hg copy -A bar foo foo: not overwriting - file already committed ('hg copy --after --force' to replace the file by recording a copy) + [1] same error without the --after, so the user doesn't have to go through two hints: $ hg copy bar foo foo: not overwriting - file already committed ('hg copy --force' to replace the file by recording a copy) + [1] but it's considered modified after a copy --after --force $ hg copy -Af bar foo $ hg st -AC foo @@ -241,5 +244,6 @@ $ hg cp bar xyzzy xyzzy: not overwriting - file exists ('hg copy --after' to record the copy) + [1] $ cd ..