Show More
@@ -365,7 +365,8 b' class BaseRepository(object):' | |||
|
365 | 365 | raise NotImplementedError |
|
366 | 366 | |
|
367 | 367 | def merge(self, target_ref, source_repo, source_ref, workspace_id, |
|
368 |
user_name='', user_email='', message='', dry_run=False |
|
|
368 | user_name='', user_email='', message='', dry_run=False, | |
|
369 | use_rebase=False): | |
|
369 | 370 | """ |
|
370 | 371 | Merge the revisions specified in `source_ref` from `source_repo` |
|
371 | 372 | onto the `target_ref` of this repository. |
@@ -388,6 +389,8 b' class BaseRepository(object):' | |||
|
388 | 389 | :param user_email: Merge commit `user_email`. |
|
389 | 390 | :param message: Merge commit `message`. |
|
390 | 391 | :param dry_run: If `True` the merge will not take place. |
|
392 | :param use_rebase: If `True` commits from the source will be rebased | |
|
393 | on top of the target instead of being merged. | |
|
391 | 394 | """ |
|
392 | 395 | if dry_run: |
|
393 | 396 | message = message or 'sample_message' |
@@ -407,7 +410,8 b' class BaseRepository(object):' | |||
|
407 | 410 | try: |
|
408 | 411 | return self._merge_repo( |
|
409 | 412 | shadow_repository_path, target_ref, source_repo, |
|
410 |
source_ref, message, user_name, user_email, dry_run=dry_run |
|
|
413 | source_ref, message, user_name, user_email, dry_run=dry_run, | |
|
414 | use_rebase=use_rebase) | |
|
411 | 415 | except RepositoryError: |
|
412 | 416 | log.exception( |
|
413 | 417 | 'Unexpected failure when running merge, dry-run=%s', |
@@ -833,7 +833,8 b' class GitRepository(BaseRepository):' | |||
|
833 | 833 | |
|
834 | 834 | def _merge_repo(self, shadow_repository_path, target_ref, |
|
835 | 835 | source_repo, source_ref, merge_message, |
|
836 |
merger_name, merger_email, dry_run=False |
|
|
836 | merger_name, merger_email, dry_run=False, | |
|
837 | use_rebase=False): | |
|
837 | 838 | if target_ref.commit_id != self.branches[target_ref.name]: |
|
838 | 839 | return MergeResponse( |
|
839 | 840 | False, False, None, MergeFailureReason.TARGET_IS_NOT_HEAD) |
@@ -659,7 +659,8 b' class MercurialRepository(BaseRepository' | |||
|
659 | 659 | |
|
660 | 660 | def _merge_repo(self, shadow_repository_path, target_ref, |
|
661 | 661 | source_repo, source_ref, merge_message, |
|
662 |
merger_name, merger_email, dry_run=False |
|
|
662 | merger_name, merger_email, dry_run=False, | |
|
663 | use_rebase=False): | |
|
663 | 664 | if target_ref.commit_id not in self._heads(): |
|
664 | 665 | return MergeResponse( |
|
665 | 666 | False, False, None, MergeFailureReason.TARGET_IS_NOT_HEAD) |
General Comments 0
You need to be logged in to leave comments.
Login now