Show More
@@ -1552,6 +1552,8 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1552 | for abs, rel, exact in srcs: |
|
1552 | for abs, rel, exact in srcs: | |
1553 | copylist.append(abs) |
|
1553 | copylist.append(abs) | |
1554 |
|
1554 | |||
|
1555 | if not copylist: | |||
|
1556 | raise error.Abort(_(b'no files to copy')) | |||
1555 | # TODO: Add support for `hg cp --at-rev . foo bar dir` and |
|
1557 | # TODO: Add support for `hg cp --at-rev . foo bar dir` and | |
1556 | # `hg cp --at-rev . dir1 dir2`, preferably unifying the code with the |
|
1558 | # `hg cp --at-rev . dir1 dir2`, preferably unifying the code with the | |
1557 | # existing functions below. |
|
1559 | # existing functions below. |
@@ -25,10 +25,9 b' Test single file' | |||||
25 | abort: --at-rev requires --after |
|
25 | abort: --at-rev requires --after | |
26 | [255] |
|
26 | [255] | |
27 | # Errors out with non-existent source |
|
27 | # Errors out with non-existent source | |
28 | BROKEN: this should have a better error message |
|
|||
29 | $ hg cp -A --at-rev . d1/non-existent d1/d |
|
28 | $ hg cp -A --at-rev . d1/non-existent d1/d | |
30 | d1/non-existent: no such file in rev 55d1fd85ef0a |
|
29 | d1/non-existent: no such file in rev 55d1fd85ef0a | |
31 | abort: --at-rev requires a single source |
|
30 | abort: no files to copy | |
32 | [255] |
|
31 | [255] | |
33 | # Errors out with non-existent destination |
|
32 | # Errors out with non-existent destination | |
34 | $ hg cp -A --at-rev . d1/b d1/non-existent |
|
33 | $ hg cp -A --at-rev . d1/b d1/non-existent |
General Comments 0
You need to be logged in to leave comments.
Login now