Show More
@@ -503,7 +503,7 b' def docopy(ui, repo, pats, opts, wlock):' | |||||
503 | util.localpath(prevsrc))) |
|
503 | util.localpath(prevsrc))) | |
504 | return |
|
504 | return | |
505 | if (not opts['after'] and os.path.exists(reltarget) or |
|
505 | if (not opts['after'] and os.path.exists(reltarget) or | |
506 | opts['after'] and repo.dirstate.state(abstarget) not in '?r'): |
|
506 | opts['after'] and repo.dirstate.state(abstarget) not in '?ar'): | |
507 | if not opts['force']: |
|
507 | if not opts['force']: | |
508 | ui.warn(_('%s: not overwriting - file exists\n') % |
|
508 | ui.warn(_('%s: not overwriting - file exists\n') % | |
509 | reltarget) |
|
509 | reltarget) |
@@ -38,4 +38,10 b' hg debugrename bar' | |||||
38 | echo "# should show no copies" |
|
38 | echo "# should show no copies" | |
39 | hg debugstate|grep '^copy' |
|
39 | hg debugstate|grep '^copy' | |
40 |
|
40 | |||
|
41 | echo "# copy --after on an added file" | |||
|
42 | cp bar baz | |||
|
43 | hg add baz | |||
|
44 | hg cp -A bar baz | |||
|
45 | hg st -C | |||
|
46 | ||||
41 | exit 0 |
|
47 | exit 0 |
@@ -20,3 +20,6 b' copy: foo -> bar' | |||||
20 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 |
|
20 | 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000 | |
21 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 |
|
21 | bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17 | |
22 | # should show no copies |
|
22 | # should show no copies | |
|
23 | # copy --after on an added file | |||
|
24 | A baz | |||
|
25 | bar |
General Comments 0
You need to be logged in to leave comments.
Login now