diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-23 11:43:04 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-23 11:43:04 -0400 |
commit | caf0111d9c571ac268c235880e6d18fa512e9efa (patch) | |
tree | b498654ed1dcbdbba94605292c280c883c5e9faa /libbe/rcs.py | |
parent | 678d074ba2d20c22255abdcc8c41f3c0e2ec2c2a (diff) | |
download | bugseverywhere-caf0111d9c571ac268c235880e6d18fa512e9efa.tar.gz |
libbe.rcs.RCS.commit() now actually calls .pre/postcommit().
It hadn't before, which defeats the Pu purpose of hook functions.
This hand't caused any problems though, since only libbe.bzr defined a
postcommit() and there were no precommit() definitions.
Bzr's postcommit() had been to auto-merge from the default merge
source. Yikes! Removed that ;).
Diffstat (limited to 'libbe/rcs.py')
-rw-r--r-- | libbe/rcs.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libbe/rcs.py b/libbe/rcs.py index 1e1cfa7..294b8e0 100644 --- a/libbe/rcs.py +++ b/libbe/rcs.py @@ -398,14 +398,22 @@ class RCS(object): temp_file = os.fdopen(descriptor, 'wb') temp_file.write(summary) temp_file.flush() + self.precommit() revision = self._rcs_commit(filename, allow_empty=allow_empty) temp_file.close() + self.postcommit() finally: os.remove(filename) return revision - def precommit(self, directory): + def precommit(self): + """ + Executed before all attempted commits. + """ pass - def postcommit(self, directory): + def postcommit(self): + """ + Only executed after successful commits. + """ pass def _u_any_in_string(self, list, string): """ |