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

Unified Diff: tests/git_rebase_update_test.py

Issue 1331263002: Add a --keep-going flag for people who run rebase-update infrequently. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Fix typo. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « man/src/git-rebase-update.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_rebase_update_test.py
diff --git a/tests/git_rebase_update_test.py b/tests/git_rebase_update_test.py
index ee725bc1d2fa9f6303efc435b41c2492d1d20fe7..273e9220488b33bf2ab27c56e806ce3ab336d019 100755
--- a/tests/git_rebase_update_test.py
+++ b/tests/git_rebase_update_test.py
@@ -259,6 +259,42 @@ class GitRebaseUpdateTest(git_test_utils.GitRepoReadWriteTestBase):
self.assertIn('\'branch_G\' was merged', output)
self.assertIn('checking out \'origin/master\'', output)
+ def testRebaseConflictsKeepGoing(self):
+ # Pretend that branch_L landed
+ self.origin.git('checkout', 'master')
+ with self.origin.open('L', 'w') as f:
+ f.write('L')
+ self.origin.git('add', 'L')
+ self.origin.git_commit('L')
+
+ # Add a commit to branch_K so that things fail
+ self.repo.git('checkout', 'branch_K')
+ with self.repo.open('M', 'w') as f:
+ f.write('NOPE')
+ self.repo.git('add', 'M')
+ self.repo.git_commit('K NOPE')
+
+ # Add a commits to branch_L which will work when squashed
+ self.repo.git('checkout', 'branch_L')
+ self.repo.git('reset', 'branch_L~')
+ with self.repo.open('L', 'w') as f:
+ f.write('NOPE')
+ self.repo.git('add', 'L')
+ self.repo.git_commit('L NOPE')
+ with self.repo.open('L', 'w') as f:
+ f.write('L')
+ self.repo.git('add', 'L')
+ self.repo.git_commit('L YUP')
+
+ # start on a branch which will be deleted
+ self.repo.git('checkout', 'branch_G')
+
+ self.repo.git('config', 'branch.branch_K.dormant', 'false')
+ output, _ = self.repo.capture_stdio(self.reup.main, ['-k'])
+ self.assertIn('--keep-going set, continuing with next branch.', output)
+ self.assertIn('could not be cleanly rebased:', output)
+ self.assertIn(' branch_K', output)
+
def testTrackTag(self):
self.origin.git('tag', 'lkgr', self.origin['M'])
« no previous file with comments | « man/src/git-rebase-update.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698