##// END OF EJS Templates
feat(mercurial): added close branch commit message template
super-admin -
r5334:c713b60d default
parent child Browse files
Show More
@@ -35,6 +35,7 b' from rhodecode.lib.datelib import ('
35 from rhodecode.lib.str_utils import safe_str
35 from rhodecode.lib.str_utils import safe_str
36 from rhodecode.lib.utils2 import CachedProperty
36 from rhodecode.lib.utils2 import CachedProperty
37 from rhodecode.lib.vcs import connection, exceptions
37 from rhodecode.lib.vcs import connection, exceptions
38 from rhodecode.lib.vcs.conf import settings as vcs_settings
38 from rhodecode.lib.vcs.backends.base import (
39 from rhodecode.lib.vcs.backends.base import (
39 BaseRepository, CollectionGenerator, Config, MergeResponse,
40 BaseRepository, CollectionGenerator, Config, MergeResponse,
40 MergeFailureReason, Reference, BasePathPermissionChecker)
41 MergeFailureReason, Reference, BasePathPermissionChecker)
@@ -722,7 +723,12 b' class MercurialRepository(BaseRepository'
722 commit needs to be pushed.
723 commit needs to be pushed.
723 """
724 """
724 self._update(source_ref.commit_id)
725 self._update(source_ref.commit_id)
725 message = close_message or f"Closing branch: `{source_ref.name}`"
726 message = (close_message or vcs_settings.HG_CLOSE_BRANCH_MESSAGE_TMPL).format(
727 user_name=user_name,
728 user_email=user_email,
729 target_ref_name=target_ref.name,
730 source_ref_name=source_ref.name
731 )
726 try:
732 try:
727 self._remote.commit(
733 self._remote.commit(
728 message=safe_str(message),
734 message=safe_str(message),
@@ -58,6 +58,9 b' MERGE_MESSAGE_TMPL = ('
58 MERGE_DRY_RUN_MESSAGE = 'dry_run_merge_message_from_rhodecode'
58 MERGE_DRY_RUN_MESSAGE = 'dry_run_merge_message_from_rhodecode'
59 MERGE_DRY_RUN_USER = 'Dry-Run User'
59 MERGE_DRY_RUN_USER = 'Dry-Run User'
60 MERGE_DRY_RUN_EMAIL = 'dry-run-merge@rhodecode.com'
60 MERGE_DRY_RUN_EMAIL = 'dry-run-merge@rhodecode.com'
61 HG_CLOSE_BRANCH_MESSAGE_TMPL = (
62 'Closing branch: `{source_ref_name}`'
63 )
61
64
62
65
63 def available_aliases():
66 def available_aliases():
General Comments 0
You need to be logged in to leave comments. Login now