Index: git_cl/git_cl.py |
diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py |
index ea1238261dc8c1aa2fe6d30485a13264bd1de242..6d153f8d7a318f9f906d7d82117d87799eaa3a18 100644 |
--- a/git_cl/git_cl.py |
+++ b/git_cl/git_cl.py |
@@ -996,7 +996,13 @@ def SendUpstream(parser, args, cmd): |
if cmd == 'dcommit' and 'Committed r' in output: |
revision = re.match('.*?\nCommitted r(\\d+)', output, re.DOTALL).group(1) |
elif cmd == 'push' and retcode == 0: |
- revision = output.splitlines()[1].split('\t')[2].split('..')[1] |
+ m = (re.match(r'.*?([a-f0-9]{7})\.\.([a-f0-9]{7})$', l) |
evanm
2011/01/12 00:21:06
Can you use longer variable names? ("match" inste
|
+ for l in output.splitlines(False)) |
+ m = filter(None, m) |
+ if not len(m) == 1: |
evanm
2011/01/12 00:21:06
Didn't realize this was valid Python (rather than
|
+ DieWithError("Couldn't parse ouput to extract the committed hash:\n%s" % |
+ output) |
+ revision = m[0].group(2) |
else: |
return 1 |
viewvc_url = settings.GetViewVCUrl() |