Show More
@@ -0,0 +1,20 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | rm -rf a | |||
|
3 | hg init a | |||
|
4 | cd a | |||
|
5 | touch a | |||
|
6 | hg ci -Am0 | |||
|
7 | hg mv a a1 | |||
|
8 | hg ci -m1 | |||
|
9 | hg co 0 | |||
|
10 | hg mv a a2 | |||
|
11 | hg up | |||
|
12 | hg ci -m2 | |||
|
13 | ||||
|
14 | touch a | |||
|
15 | hg ci -Am3 | |||
|
16 | hg mv a b | |||
|
17 | hg ci -Am4 a | |||
|
18 | hg ci --debug --traceback -Am5 b | |||
|
19 | hg verify | |||
|
20 | hg export --git tip |
@@ -0,0 +1,24 b'' | |||||
|
1 | adding a | |||
|
2 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
3 | warning: detected divergent renames of a to: | |||
|
4 | a2 | |||
|
5 | a1 | |||
|
6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
7 | adding a | |||
|
8 | b | |||
|
9 | b: searching for copy revision for a | |||
|
10 | b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db | |||
|
11 | checking changesets | |||
|
12 | checking manifests | |||
|
13 | crosschecking files in changesets and manifests | |||
|
14 | checking files | |||
|
15 | 4 files, 6 changesets, 4 total revisions | |||
|
16 | # HG changeset patch | |||
|
17 | # User test | |||
|
18 | # Date 0 0 | |||
|
19 | # Node ID 755e75751bf67eb4378bca61987df035d90a7a06 | |||
|
20 | # Parent 7399822c2e395fe7d57c2fcf4b310f6fb22f8c2d | |||
|
21 | 5 | |||
|
22 | ||||
|
23 | diff --git a/b b/b | |||
|
24 | new file mode 100644 |
@@ -708,7 +708,7 b' class localrepository(repo.repository):' | |||||
708 | # \- 2 --- 4 as the merge base |
|
708 | # \- 2 --- 4 as the merge base | |
709 | # |
|
709 | # | |
710 |
|
710 | |||
711 |
cr = manifest1.get(cf |
|
711 | cr = manifest1.get(cf) | |
712 | nfp = fp2 |
|
712 | nfp = fp2 | |
713 |
|
713 | |||
714 | if manifest2: # branch merge |
|
714 | if manifest2: # branch merge | |
@@ -717,6 +717,24 b' class localrepository(repo.repository):' | |||||
717 | cr = manifest2[cf] |
|
717 | cr = manifest2[cf] | |
718 | nfp = fp1 |
|
718 | nfp = fp1 | |
719 |
|
719 | |||
|
720 | # find source in nearest ancestor if we've lost track | |||
|
721 | if not cr: | |||
|
722 | self.ui.debug(_(" %s: searching for copy revision for %s\n") % | |||
|
723 | (fn, cf)) | |||
|
724 | p1 = self.dirstate.parents()[0] | |||
|
725 | rev = self.changelog.rev(p1) | |||
|
726 | seen = {-1:None} | |||
|
727 | visit = [rev] | |||
|
728 | while visit: | |||
|
729 | for p in self.changelog.parentrevs(visit.pop(0)): | |||
|
730 | if p not in seen: | |||
|
731 | seen[p] = True | |||
|
732 | visit.append(p) | |||
|
733 | ctx = self.changectx(p) | |||
|
734 | if cf in ctx: | |||
|
735 | cr = ctx[cf].filenode() | |||
|
736 | break | |||
|
737 | ||||
720 | self.ui.debug(_(" %s: copy %s:%s\n") % (fn, cf, hex(cr))) |
|
738 | self.ui.debug(_(" %s: copy %s:%s\n") % (fn, cf, hex(cr))) | |
721 | meta["copy"] = cf |
|
739 | meta["copy"] = cf | |
722 | meta["copyrev"] = hex(cr) |
|
740 | meta["copyrev"] = hex(cr) |
General Comments 0
You need to be logged in to leave comments.
Login now