##// END OF EJS Templates
copy: to find copy source, walk parent of revision we're marking copies in...
Martin von Zweigbergk -
r45314:02bf61bb default
parent child Browse files
Show More
@@ -1496,8 +1496,11 b' def copy(ui, repo, pats, opts, rename=Fa'
1496
1496
1497 def walkpat(pat):
1497 def walkpat(pat):
1498 srcs = []
1498 srcs = []
1499 m = scmutil.match(ctx, [pat], opts, globbed=True)
1499 # TODO: Inline and simplify the non-working-copy version of this code
1500 for abs in ctx.walk(m):
1500 # since it shares very little with the working-copy version of it.
1501 ctx_to_walk = ctx if ctx.rev() is None else pctx
1502 m = scmutil.match(ctx_to_walk, [pat], opts, globbed=True)
1503 for abs in ctx_to_walk.walk(m):
1501 rel = uipathfn(abs)
1504 rel = uipathfn(abs)
1502 exact = m.exact(abs)
1505 exact = m.exact(abs)
1503 if abs not in ctx:
1506 if abs not in ctx:
@@ -47,13 +47,11 b' Test moved file (not copied)'
47 $ hg add d1/d
47 $ hg add d1/d
48 $ hg ci -m 'move d1/b to d1/d'
48 $ hg ci -m 'move d1/b to d1/d'
49 created new head
49 created new head
50 BROKEN: this should work
51 $ hg cp -A --at-rev . d1/b d1/d
50 $ hg cp -A --at-rev . d1/b d1/d
52 d1/b: no such file in rev 519850c3ea27
51 saved backup bundle to $TESTTMP/.hg/strip-backup/519850c3ea27-153c8fbb-copy.hg
53 abort: --at-rev requires a single source
54 [255]
55 $ hg st -C --change .
52 $ hg st -C --change .
56 A d1/d
53 A d1/d
54 d1/b
57 R d1/b
55 R d1/b
58
56
59 Test using directory as destination
57 Test using directory as destination
General Comments 0
You need to be logged in to leave comments. Login now