aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-13 08:43:01 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-13 08:43:01 -0500
commite8a0ff2488d1535cea0528aa1c7b9ef8aa43dfed (patch)
tree7735dc412b599c6e89df2628045f623ea52708c9 /libbe/storage
parentd21c50ece316536b5972725eced19b40d6e2589d (diff)
downloadbugseverywhere-e8a0ff2488d1535cea0528aa1c7b9ef8aa43dfed.tar.gz
Don't regexp out the short-revid in Git._vcs_commit()
The output version strings change: Version 1.5.4.3: Created initial commit 217efa7: MESSAGE Created commit acb3066: MESSAGE Version 1.6.4.4: [master (root-commit) c5b48cf] MESSAGE [master 66a48c1] MESSAGE Instead, get the full revid, and look for its beginning in the output.
Diffstat (limited to 'libbe/storage')
-rw-r--r--libbe/storage/vcs/git.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/libbe/storage/vcs/git.py b/libbe/storage/vcs/git.py
index 77ddd88..6d240c2 100644
--- a/libbe/storage/vcs/git.py
+++ b/libbe/storage/vcs/git.py
@@ -130,15 +130,9 @@ class Git(base.VCS):
'nothing added to commit']
if self._u_any_in_string(strings, output) == True:
raise base.EmptyCommit()
- revision = None
- revline = re.compile('(.*) (.*)[:\]] (.*)')
- match = revline.search(output)
- assert match != None, output+error
- assert len(match.groups()) == 3
- revision = match.groups()[1]
full_revision = self._vcs_revision_id(-1)
- assert full_revision.startswith(revision), \
- 'Mismatched revisions:\n%s\n%s' % (revision, full_revision)
+ assert full_revision[:7] in output, \
+ 'Mismatched revisions:\n%s\n%s' % (full_revision, output)
return full_revision
def _vcs_revision_id(self, index):