diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-02-03 15:52:07 -0500 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2006-02-03 15:52:07 -0500 |
commit | a9e110fe90d4b65bbfe74c1819ba46b394ded23d (patch) | |
tree | 97f85a2a0c198f355ffb570416f0b1709727c2fd | |
parent | d0190448a465bf09504ad2d39f1a3d94638c04b4 (diff) | |
parent | 66abb87cf229971b3dcc0781d83bbddeb8c0604f (diff) | |
download | bugseverywhere-a9e110fe90d4b65bbfe74c1819ba46b394ded23d.tar.gz |
Merge from upstream
-rw-r--r-- | libbe/bzr.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libbe/bzr.py b/libbe/bzr.py index b8d1c8c..c6fc622 100644 --- a/libbe/bzr.py +++ b/libbe/bzr.py @@ -21,7 +21,7 @@ import config from rcs import invoke, CommandError def invoke_client(*args, **kwargs): - directory = kwargs.get('directory') + directory = kwargs['directory'] expect = kwargs.get('expect', (0, 1)) cl_args = ["bzr"] cl_args.extend(args) @@ -111,12 +111,19 @@ def commit(directory, summary, body=None): temp_file = os.fdopen(descriptor, 'wb') temp_file.write(summary) temp_file.close() - try: - invoke_client('commit', '--unchanged', '--file', filename, - directory=directory) + invoke_client('commit', '--unchanged', '--file', filename, + directory=directory) finally: os.unlink(filename) def postcommit(directory): - pass + try: + status = invoke_client('merge', directory=directory) + except CommandError: + status = invoke_client('revert --no-backup', directory=directory) + status = invoke_client('resolve --all', directory=directory) + raise + if status == 1: + commit(directory, 'Merge from upstream') + name = "bzr" |