diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-27 08:12:16 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-27 08:12:16 -0400 |
commit | 675aa10516d1fe2a5f0502be5553e38169f444c0 (patch) | |
tree | cb19b2ee621cd1120ae9afdafe6f52ee70137a32 /libbe/git.py | |
parent | 885b04b50ad3bbde81ec2eccfbfb2e516d0d3a80 (diff) | |
parent | 7f2ee356b76303edd01efad6bd049fbc7f01b5ff (diff) | |
download | bugseverywhere-675aa10516d1fe2a5f0502be5553e38169f444c0.tar.gz |
Merged "be subscribe" and be-handle-mail subscription support.
Also assorted other changes and fixes in the be.subscribe branch.
Highlights:
* Much more powerful libbe.diff with subclassable report generators.
* "be diff" compares working copy with last commit by default.
* comment reference text shown in "be comment" EDITOR footer
* .revision_id() for all VCSs
* meaningful comment comparison and stricter bug comparison
* stricter .sync_with_disk interpretation. See BugDir.__doc__.
* Comment.From and .time_string -> .author and .date, for better
conformance with settings_object.setting_name_to_attr_name().
Diffstat (limited to 'libbe/git.py')
-rw-r--r-- | libbe/git.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libbe/git.py b/libbe/git.py index 2f9ffa9..2b45679 100644 --- a/libbe/git.py +++ b/libbe/git.py @@ -111,7 +111,18 @@ class Git(RCS): assert match != None, output+error assert len(match.groups()) == 3 revision = match.groups()[1] - return revision + full_revision = self._rcs_revision_id(-1) + assert full_revision.startswith(revision), \ + "Mismatched revisions:\n%s\n%s" % (revision, full_revision) + return full_revision + def _rcs_revision_id(self, index): + args = ["rev-list", "--first-parent", "--reverse", "HEAD"] + status,output,error = self._u_invoke_client(*args) + commits = output.splitlines() + try: + return commits[index] + except IndexError: + return None rcs.make_rcs_testcase_subclasses(Git, sys.modules[__name__]) |