##// END OF EJS Templates
mercurial: move imports from top-level to prevent from loading mercurial code on hook execution for svn/git
marcink -
r802:4f496d5f default
parent child Browse files
Show More
@@ -33,7 +33,6 b' import mercurial.node'
33 import simplejson as json
33 import simplejson as json
34
34
35 from vcsserver import exceptions, subprocessio, settings
35 from vcsserver import exceptions, subprocessio, settings
36 from vcsserver.hgcompat import get_ctx
37
36
38 log = logging.getLogger(__name__)
37 log = logging.getLogger(__name__)
39
38
@@ -184,6 +183,7 b' def _extras_from_ui(ui):'
184
183
185
184
186 def _rev_range_hash(repo, node, check_heads=False):
185 def _rev_range_hash(repo, node, check_heads=False):
186 from vcsserver.hgcompat import get_ctx
187
187
188 commits = []
188 commits = []
189 revs = []
189 revs = []
@@ -203,6 +203,7 b' def _rev_range_hash(repo, node, check_he'
203
203
204
204
205 def _check_heads(repo, start, end, commits):
205 def _check_heads(repo, start, end, commits):
206 from vcsserver.hgcompat import get_ctx
206 changelog = repo.changelog
207 changelog = repo.changelog
207 parents = set()
208 parents = set()
208
209
@@ -393,6 +394,7 b' def post_push_ssh(ui, repo, node, **kwar'
393
394
394
395
395 def key_push(ui, repo, **kwargs):
396 def key_push(ui, repo, **kwargs):
397 from vcsserver.hgcompat import get_ctx
396 if kwargs['new'] != '0' and kwargs['namespace'] == 'bookmarks':
398 if kwargs['new'] != '0' and kwargs['namespace'] == 'bookmarks':
397 # store new bookmarks in our UI object propagated later to post_push
399 # store new bookmarks in our UI object propagated later to post_push
398 ui._rc_pushkey_branches = get_ctx(repo, kwargs['key']).bookmarks()
400 ui._rc_pushkey_branches = get_ctx(repo, kwargs['key']).bookmarks()
General Comments 0
You need to be logged in to leave comments. Login now