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

Unified Diff: tests/gclient_scm_test.py

Issue 496003: gclient: Add better error reporting and handling when there is a rebase conflict (Closed)
Patch Set: Created 11 years 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 | « gclient_scm.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_scm_test.py
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index 8d37678ddcebe2f6e62328349da7e96f040d5a2d..a5413ca136ba83980257d37b87fe0a134fb5117b 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -279,7 +279,7 @@ class SVNWrapperTestCase(BaseTestCase):
scm.update(options, self.args, file_list)
-class GitWrapperTestCase(SuperMoxBaseTestBase):
+class GitWrapperTestCase(BaseTestCase):
"""This class doesn't use pymox."""
class OptionsObject(object):
def __init__(self, test_case, verbose=False, revision=None):
@@ -506,6 +506,29 @@ from :3
self.assertEquals(scm.revinfo(options, (), None),
'a7142dc9f0009350b96a11f372b6ea658592aa95')
+ def testUpdateConflict(self):
+ if not self.enabled:
+ return
+ options = self.Options()
+ scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
+ relpath=self.relpath)
+ file_path = gclient_scm.os.path.join(self.base_path, 'b')
+ f = open(file_path, 'w').writelines('conflict\n')
+ scm._Run(['commit', '-am', 'test'])
+ exception = \
+ '\n____ .\n' \
+ '\nConflict while rebasing this branch.\n' \
+ 'Fix the conflict and run gclient again.\n' \
+ 'See man git-rebase for details.\n'
+ self.assertRaisesError(exception, scm.update, options, (), [])
+ exception = \
+ '\n____ .\n' \
+ '\tAlready in a conflict, i.e. (no branch).\n' \
+ '\tFix the conflict and run gclient again.\n' \
+ '\tOr to abort run:\n\t\tgit-rebase --abort\n' \
+ '\tSee man git-rebase for details.\n'
+ self.assertRaisesError(exception, scm.update, options, (), [])
+
def testRevinfo(self):
if not self.enabled:
return
« no previous file with comments | « gclient_scm.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698