Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Issue 1482753002: Fix "git rebase-update" when multiple branch are stale. (Closed)

Created:
5 years ago by sdefresne
Modified:
5 years ago
Reviewers:
iannucci
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix "git rebase-update" when multiple branch are stale. Fix a bug that left branches tracking a dead branch if both their parent and grand-parent were left with no changes after a "rebase-update" step. Given the following initial state: $ git map-branches -v origin/master a b c * [ ahead 1 ] without this patch, a "git rebase-update" on this tree state would leave the branch "c" as tracking a non-existing branch "a": $ git recursive-rebase a up-to-date b up-to-date c up-to-date Reparented c to track a (was tracking b) Deleted branch b (was 448d1da). Deleted branch a (was 448d1da). $ git map-branches -v {a:GONE} c * with the patch, we record that the branch "c" is tracking must be updated twice and we end up in a state were "c" is correctly tracking "origin/master": $ git recursive-rebase a up-to-date b up-to-date c up-to-date Reparented c to track origin/master (was tracking b) Deleted branch b (was 448d1da). Deleted branch a (was 448d1da). $ git map-branches -v origin/master c * [ ahead 1 ] BUG=456806 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=297792

Patch Set 1 #

Patch Set 2 : Fix removal of leaf branches #

Total comments: 2

Patch Set 3 : Add unit tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -16 lines) Patch
M git_rebase_update.py View 1 2 1 chunk +33 lines, -11 lines 0 comments Download
M tests/git_rebase_update_test.py View 1 2 7 chunks +21 lines, -5 lines 2 comments Download

Messages

Total messages: 19 (8 generated)
sdefresne
Please take a look.
5 years ago (2015-11-27 17:35:28 UTC) #2
iannucci
On 2015/11/27 at 17:35:28, sdefresne wrote: > Please take a look. I think this may ...
5 years ago (2015-11-30 20:59:16 UTC) #6
iannucci
Thanks for working on this! I think this looks really good. Would you mind adding ...
5 years ago (2015-12-01 02:46:22 UTC) #7
sdefresne
I've added one unit test. Here is the log for the test passing: $ tests/git_rebase_update_test.py ...
5 years ago (2015-12-01 09:09:16 UTC) #9
sdefresne
Please take another look.
5 years ago (2015-12-02 10:29:43 UTC) #11
iannucci
lgtm https://codereview.chromium.org/1482753002/diff/60001/tests/git_rebase_update_test.py File tests/git_rebase_update_test.py (right): https://codereview.chromium.org/1482753002/diff/60001/tests/git_rebase_update_test.py#newcode71 tests/git_rebase_update_test.py:71: def testRebaseUpdate(self): I've created a monster (unit test)! ...
5 years ago (2015-12-02 18:08:51 UTC) #12
iannucci
On 2015/12/02 at 18:08:51, iannucci wrote: > lgtm > > https://codereview.chromium.org/1482753002/diff/60001/tests/git_rebase_update_test.py > File tests/git_rebase_update_test.py (right): ...
5 years ago (2015-12-02 18:10:29 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1482753002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1482753002/60001
5 years ago (2015-12-02 18:12:08 UTC) #15
sdefresne
Thank you for the review. I've not touched the sys.stderr/sys.stdout thing. https://codereview.chromium.org/1482753002/diff/60001/tests/git_rebase_update_test.py File tests/git_rebase_update_test.py (right): ...
5 years ago (2015-12-02 18:12:54 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:60001) as http://src.chromium.org/viewvc/chrome?view=rev&revision=297792
5 years ago (2015-12-02 18:13:56 UTC) #18
iannucci
5 years ago (2015-12-02 18:22:21 UTC) #19
Message was sent while issue was closed.
Blah, good to know... :/

On Wed, Dec 2, 2015, 10:13 commit-bot@chromium.org via
codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote:

> Committed patchset #3 (id:60001) as
> http://src.chromium.org/viewvc/chrome?view=rev&revision=297792
>
> https://codereview.chromium.org/1482753002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698