Show More
@@ -1135,6 +1135,7 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1135 | dryrun = opts.get("dry_run") |
|
1135 | dryrun = opts.get("dry_run") | |
1136 | wctx = repo[None] |
|
1136 | wctx = repo[None] | |
1137 |
|
1137 | |||
|
1138 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |||
1138 | def walkpat(pat): |
|
1139 | def walkpat(pat): | |
1139 | srcs = [] |
|
1140 | srcs = [] | |
1140 | if after: |
|
1141 | if after: | |
@@ -1144,7 +1145,7 b' def copy(ui, repo, pats, opts, rename=Fa' | |||||
1144 | m = scmutil.match(wctx, [pat], opts, globbed=True) |
|
1145 | m = scmutil.match(wctx, [pat], opts, globbed=True) | |
1145 | for abs in wctx.walk(m): |
|
1146 | for abs in wctx.walk(m): | |
1146 | state = repo.dirstate[abs] |
|
1147 | state = repo.dirstate[abs] | |
1147 |
rel = |
|
1148 | rel = uipathfn(abs) | |
1148 | exact = m.exact(abs) |
|
1149 | exact = m.exact(abs) | |
1149 | if state in badstates: |
|
1150 | if state in badstates: | |
1150 | if exact and state == '?': |
|
1151 | if exact and state == '?': |
@@ -118,6 +118,23 b' should fail - foo is not managed' | |||||
118 | [255] |
|
118 | [255] | |
119 | $ hg st -A |
|
119 | $ hg st -A | |
120 | ? foo |
|
120 | ? foo | |
|
121 | respects ui.relative-paths | |||
|
122 | $ mkdir dir | |||
|
123 | $ cd dir | |||
|
124 | $ hg mv ../foo ../bar | |||
|
125 | ../foo: not copying - file is not managed | |||
|
126 | abort: no files to copy | |||
|
127 | [255] | |||
|
128 | $ hg mv ../foo ../bar --config ui.relative-paths=yes | |||
|
129 | ../foo: not copying - file is not managed | |||
|
130 | abort: no files to copy | |||
|
131 | [255] | |||
|
132 | $ hg mv ../foo ../bar --config ui.relative-paths=no | |||
|
133 | foo: not copying - file is not managed | |||
|
134 | abort: no files to copy | |||
|
135 | [255] | |||
|
136 | $ cd .. | |||
|
137 | $ rmdir dir | |||
121 | $ hg add foo |
|
138 | $ hg add foo | |
122 |
dry-run; print a warning that this is not a real copy; |
|
139 | dry-run; print a warning that this is not a real copy; foo is added | |
123 | $ hg mv --dry-run foo bar |
|
140 | $ hg mv --dry-run foo bar |
General Comments 0
You need to be logged in to leave comments.
Login now