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

Unified Diff: trychange.py

Issue 399070: Add scm.*.GetEmail() to retrieve the user email. Use this email for try job emails. (Closed)
Patch Set: Use CaptureInfo() Created 11 years, 1 month 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 | « tests/trychange_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
diff --git a/trychange.py b/trychange.py
index 65e935a08a9b55c8c3ad62f3b075fa6bd0d03616..7191faa06a7e742d5d181184a67162bebb298668 100755
--- a/trychange.py
+++ b/trychange.py
@@ -175,6 +175,8 @@ class SVN(SCM):
self.options.diff = self.GenerateDiff(adjusted_paths, root=source_root)
self.change_info = gcl.LoadChangelistInfoForMultiple(self.options.name,
gcl.GetRepositoryRoot(), True, True)
+ if not self.options.email:
+ self.options.email = scm.SVN.GetEmail(gcl.GetRepositoryRoot())
class GIT(SCM):
@@ -191,10 +193,6 @@ class GIT(SCM):
diff[i] = '--- %s' % diff[i+1][4:]
return ''.join(diff)
- def GetEmail(self):
- # TODO: check for errors here?
- return upload.RunShell(['git', 'config', 'user.email']).strip()
-
def GetFileNames(self):
"""Return the list of files in the diff."""
return self.options.files
@@ -222,7 +220,7 @@ class GIT(SCM):
if not self.options.name:
self.options.name = self.GetPatchName()
if not self.options.email:
- self.options.email = self.GetEmail()
+ self.options.email = scm.GIT.GetEmail('.')
def _ParseSendChangeOptions(options):
« no previous file with comments | « tests/trychange_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698