Show More
@@ -623,9 +623,12 b' def docopy(ui, repo, pats, opts, wlock):' | |||
|
623 | 623 | raise util.Abort(_('no destination specified')) |
|
624 | 624 | dest = pats.pop() |
|
625 | 625 | destdirexists = os.path.isdir(dest) |
|
626 | if (len(pats) > 1 or util.patkind(pats[0], None)[0]) and not destdirexists: | |
|
627 | raise util.Abort(_('with multiple sources, destination must be an ' | |
|
628 | 'existing directory')) | |
|
626 | if not destdirexists: | |
|
627 | if len(pats) > 1 or util.patkind(pats[0], None)[0]: | |
|
628 | raise util.Abort(_('with multiple sources, destination must be an ' | |
|
629 | 'existing directory')) | |
|
630 | if dest.endswith(os.sep) or os.altsep and dest.endswith(os.altsep): | |
|
631 | raise util.Abort(_('destination %s is not a directory') % dest) | |
|
629 | 632 | if opts['after']: |
|
630 | 633 | tfn = targetpathafterfn |
|
631 | 634 | else: |
@@ -88,6 +88,11 b' hg status -C' | |||
|
88 | 88 | diff d1/b d2/b |
|
89 | 89 | hg update -C |
|
90 | 90 | |
|
91 | echo "# attempt to move one file into a non-existent directory" | |
|
92 | hg rename d1/a dx/ | |
|
93 | hg status -C | |
|
94 | hg update -C | |
|
95 | ||
|
91 | 96 | echo "# attempt to move potentially more than one file into a non-existent" |
|
92 | 97 | echo "# directory" |
|
93 | 98 | hg rename 'glob:d1/**' dx |
@@ -166,6 +166,9 b' 1c1' | |||
|
166 | 166 | --- |
|
167 | 167 | > d2/b |
|
168 | 168 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
169 | # attempt to move one file into a non-existent directory | |
|
170 | abort: destination dx/ is not a directory | |
|
171 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
169 | 172 | # attempt to move potentially more than one file into a non-existent |
|
170 | 173 | # directory |
|
171 | 174 | abort: with multiple sources, destination must be an existing directory |
General Comments 0
You need to be logged in to leave comments.
Login now