Previous import merge detection bug
Bug #1648029 reported by
mdes@hp.com
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-upstream |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using git-upstream 0.12.1, I have a scenario whereby a no-op merge which appears between the tip of the local branch and the merge-base with the upstream branch, is being incorrectly detected as being the previous import merge.
I've log --graphical tree attached to illustrate the scenario.
The reason for the mistake is that the merge commit that is detected as being the previous import merge is a 'no-op' merge - the change(LC7) that it's merging into tree was also submitted upstream and had already been imported onto the local branch before LC7 was merged.
To post a comment you must log in.
Git-upstream-import log (truncated past the point of previous- merge-point detection):
(git-upstream- latest) 2016-12-02.14:11 desbonne@ kilcolgan2: ~/tmp/neutron$ git-upstream --version latest) 2016-12-02.14:13 desbonne@ kilcolgan2: ~/tmp/neutron$ script -f git-upstream- import. log -c 'git-upstream -vvv import --import-branch hp/import/desbonne --into hp/prerelease/ mitaka stable/mitaka' import. log
git-upstream 0.12.1
(git-upstream-
Script started, file is git-upstream-
Searching for previous import
Searching for most recent merge base with upstream branches
Upstream refs:
stable/mitaka
Construct list of upstream revs to search:
stable/ mitaka
git rev-list --min-parents=1 --no-walk \
Retrieve minimal list of revs to check with merge-base by excluding
c86f1ab75a97c4 ea23c2533bc1d8d 2b7baaae037 \
fe14343fabc213 41f630d8bfd4dfc e1b98524508
revisions that are in the reachable from others in the list:
git rev-list \
--not \
Running merge-base against each found upstream revision and target mitaka ${upstream_rev}
git merge-base hp/prerelease/
Order the possible merge-base commits in descendent order, to
0bc12bc4b3dd22 cb1bcd34c3ff542 25f14abe491
find the most recent one used irrespective of date:
git rev-list --topo-order --max-count=1 --no-walk \
Most recent merge-base commit is: '0bc12bc4b3dd22 cb1bcd34c3ff542 25f14abe491' b1bcd34c3ff5422 5f14abe491. .hp/prerelease/ mitaka
Searching for previous merges that exclude one side of the history
since the last import.
git rev-list --ancestry-path --merges 0bc12bc4b3dd22c
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 651a41c5e5bcbd7 2dec8744d3
merge-base: 0bc12bc4b3dd22c
parent: f716d76df03d080
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 43cc5a4002fb050 0ceb5982e0
merge-base: 0bc12bc4b3dd22c
parent: a086cc5466e7598
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 6e040f76193b51f 6ba69f544b
merge-base: 0bc12bc4b3dd22c
parent: 43b9d0d734ca173
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 eca5cac69b6af80 63f993b430
merge-base: 0bc12bc4b3dd22c
parent: 903173e1ac39099
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 e5e29b87ba506aa f532e7a2ab
merge-base: 0bc12bc4b3dd22c
parent: 9c997bdf1c3099a
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 d18d9bd7d03e9e5 2a55f0ed22
merge-base: 0bc12bc4b3dd22c
parent: c255028efdcf680
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 5daa3c1c11c3809 05e2dce630
merge-base: 0bc12bc4b3dd22c
parent: bf60247966cab6e
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 9fc133be802ab16 839abd8722
merge-base: 0bc12bc4b3dd22c
parent: 8c0631957c85017
previous upstream: 0bc12bc4b3dd22c b1bcd34c3ff5422 5f14abe491 b1bcd34c3ff5422 5f14abe491 e4a55c63b3ea6c3 4629062b51
merge-base: 0bc12bc4b3dd22c
parent: 28bc9ac70d5dab1
Adding following to ignore list: cc765eab3e606b1 3da0eedbfabe823
^47c94110de
Found the previous import merge: 76d14a8d2b8432e f70311. ..
7a5a28e59ac