##// END OF EJS Templates
pep8: Remove unused imports and variables.
Martin Bornhold -
r1050:54b2fc53 default
parent child Browse files
Show More
@@ -40,7 +40,6 b' from rhodecode.lib.vcs.backends.base imp'
40 from rhodecode.lib.vcs.backends.git.commit import GitCommit
40 from rhodecode.lib.vcs.backends.git.commit import GitCommit
41 from rhodecode.lib.vcs.backends.git.diff import GitDiff
41 from rhodecode.lib.vcs.backends.git.diff import GitDiff
42 from rhodecode.lib.vcs.backends.git.inmemory import GitInMemoryCommit
42 from rhodecode.lib.vcs.backends.git.inmemory import GitInMemoryCommit
43 from rhodecode.lib.vcs.conf import settings
44 from rhodecode.lib.vcs.exceptions import (
43 from rhodecode.lib.vcs.exceptions import (
45 CommitDoesNotExistError, EmptyRepositoryError,
44 CommitDoesNotExistError, EmptyRepositoryError,
46 RepositoryError, TagAlreadyExistError, TagDoesNotExistError, VCSError)
45 RepositoryError, TagAlreadyExistError, TagDoesNotExistError, VCSError)
@@ -865,7 +864,7 b' class GitRepository(BaseRepository):'
865 shadow_repo._checkout(pr_branch, create=True)
864 shadow_repo._checkout(pr_branch, create=True)
866 try:
865 try:
867 shadow_repo._local_fetch(source_repo.path, source_ref.name)
866 shadow_repo._local_fetch(source_repo.path, source_ref.name)
868 except RepositoryError as e:
867 except RepositoryError:
869 log.exception('Failure when doing local fetch on git shadow repo')
868 log.exception('Failure when doing local fetch on git shadow repo')
870 return MergeResponse(
869 return MergeResponse(
871 False, False, None, MergeFailureReason.MISSING_COMMIT)
870 False, False, None, MergeFailureReason.MISSING_COMMIT)
@@ -886,7 +885,7 b' class GitRepository(BaseRepository):'
886 # be used to easily identify the last successful merge commit in
885 # be used to easily identify the last successful merge commit in
887 # the shadow repository.
886 # the shadow repository.
888 shadow_repo.set_refs('refs/heads/pr-merge', merge_commit_id)
887 shadow_repo.set_refs('refs/heads/pr-merge', merge_commit_id)
889 except RepositoryError as e:
888 except RepositoryError:
890 log.exception('Failure when doing local merge on git shadow repo')
889 log.exception('Failure when doing local merge on git shadow repo')
891 merge_possible = False
890 merge_possible = False
892 merge_failure_reason = MergeFailureReason.MERGE_FAILED
891 merge_failure_reason = MergeFailureReason.MERGE_FAILED
@@ -897,7 +896,7 b' class GitRepository(BaseRepository):'
897 pr_branch, self.path, target_ref.name, enable_hooks=True,
896 pr_branch, self.path, target_ref.name, enable_hooks=True,
898 rc_scm_data=self.config.get('rhodecode', 'RC_SCM_DATA'))
897 rc_scm_data=self.config.get('rhodecode', 'RC_SCM_DATA'))
899 merge_succeeded = True
898 merge_succeeded = True
900 except RepositoryError as e:
899 except RepositoryError:
901 log.exception(
900 log.exception(
902 'Failure when doing local push on git shadow repo')
901 'Failure when doing local push on git shadow repo')
903 merge_succeeded = False
902 merge_succeeded = False
@@ -688,7 +688,7 b' class MercurialRepository(BaseRepository'
688 log.debug('Pulling in source reference %s', source_ref)
688 log.debug('Pulling in source reference %s', source_ref)
689 source_repo._validate_pull_reference(source_ref)
689 source_repo._validate_pull_reference(source_ref)
690 shadow_repo._local_pull(source_repo.path, source_ref)
690 shadow_repo._local_pull(source_repo.path, source_ref)
691 except CommitDoesNotExistError as e:
691 except CommitDoesNotExistError:
692 log.exception('Failure when doing local pull on hg shadow repo')
692 log.exception('Failure when doing local pull on hg shadow repo')
693 return MergeResponse(
693 return MergeResponse(
694 False, False, None, MergeFailureReason.MISSING_COMMIT)
694 False, False, None, MergeFailureReason.MISSING_COMMIT)
@@ -706,7 +706,7 b' class MercurialRepository(BaseRepository'
706 # used to easily identify the last successful merge commit in the
706 # used to easily identify the last successful merge commit in the
707 # shadow repository.
707 # shadow repository.
708 shadow_repo.bookmark('pr-merge', revision=merge_commit_id)
708 shadow_repo.bookmark('pr-merge', revision=merge_commit_id)
709 except RepositoryError as e:
709 except RepositoryError:
710 log.exception('Failure when doing local merge on hg shadow repo')
710 log.exception('Failure when doing local merge on hg shadow repo')
711 merge_possible = False
711 merge_possible = False
712 merge_failure_reason = MergeFailureReason.MERGE_FAILED
712 merge_failure_reason = MergeFailureReason.MERGE_FAILED
General Comments 0
You need to be logged in to leave comments. Login now