aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bzr.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-29 15:56:10 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-29 15:56:10 -0400
commitdcfe9d5e292fa4a405fafb4bdd6d9e2070f30fa9 (patch)
treef9e9c8d2ba5190d1a71046cdb5fb3abdc0fcf74f /libbe/bzr.py
parent4e8882e74aad64859a16f17fa6bef8c04b33913d (diff)
parent22a38de80ee11ada710bc6766798ca608f938307 (diff)
downloadbugseverywhere-dcfe9d5e292fa4a405fafb4bdd6d9e2070f30fa9.tar.gz
Merged interactive email interface
Diffstat (limited to 'libbe/bzr.py')
-rw-r--r--libbe/bzr.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/libbe/bzr.py b/libbe/bzr.py
index d7cd1e5..7457815 100644
--- a/libbe/bzr.py
+++ b/libbe/bzr.py
@@ -93,6 +93,28 @@ class Bzr(RCS):
assert len(match.groups()) == 1
revision = match.groups()[0]
return revision
+ def _rcs_revision_id(self, index):
+ status,output,error = self._u_invoke_client("revno")
+ current_revision = int(output)
+ if index >= current_revision or index < -current_revision:
+ return None
+ if index >= 0:
+ return str(index+1) # bzr commit 0 is the empty tree.
+ return str(current_revision+index+1)
+ def postcommit(self):
+ try:
+ self._u_invoke_client('merge')
+ except rcs.CommandError, e:
+ if ('No merge branch known or specified' in e.err_str or
+ 'No merge location known or specified' in e.err_str):
+ pass
+ else:
+ self._u_invoke_client('revert', '--no-backup',
+ directory=directory)
+ self._u_invoke_client('resolve', '--all', directory=directory)
+ raise
+ if len(self._u_invoke_client('status', directory=directory)[1]) > 0:
+ self.commit('Merge from upstream')
rcs.make_rcs_testcase_subclasses(Bzr, sys.modules[__name__])