Mercurial > hg
comparison tests/test-mq-merge.t @ 20294:243ea5ffdf31
diff: search beyond ancestor when detecting renames
This removes an optimization that was introduced in 91eb4512edd0 but was too
aggressive - as indicated by how it changed test-mq-merge.t .
We are walking filelogs to find copy sources and we can thus not be sure to hit
the base revision and find the renamed file there - it could also be in the
first ancestor of the base ... in the filelog.
We are walking the filelog and can thus not easily know when we hit the first
ancestor of the base revision and which filename to look for there. Instead, we
use _findlimit like mergecopies do: The lower bound for how far we have to go
is found from the lowest changelog revision that is an ancestor of only one of
the compared revisions. Any filelog ancestor with a revision number lower than
that revision will be the ancestor of both compared revisions, and there is
thus no reason to go further back than that.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 16 Nov 2013 15:46:29 -0500 |
parents | 0e0060bf2f44 |
children | 9d4ebb75de53 |
comparison
equal
deleted
inserted
replaced
20293:2f6b3900be64 | 20294:243ea5ffdf31 |
---|---|
145 +++ b/a | 145 +++ b/a |
146 @@ -1,1 +1,2 @@ | 146 @@ -1,1 +1,2 @@ |
147 -b | 147 -b |
148 +a | 148 +a |
149 +c | 149 +c |
150 diff --git a/aa b/aa | 150 diff --git a/a b/aa |
151 new file mode 100644 | 151 copy from a |
152 --- /dev/null | 152 copy to aa |
153 --- a/a | |
153 +++ b/aa | 154 +++ b/aa |
154 @@ -0,0 +1,1 @@ | 155 @@ -1,1 +1,1 @@ |
156 -b | |
155 +a | 157 +a |
156 | 158 |
157 Check patcha2 is still a regular patch: | 159 Check patcha2 is still a regular patch: |
158 | 160 |
159 $ cat .hg/patches/patcha2 | 161 $ cat .hg/patches/patcha2 |