From 891122266fc6836cb8a8ebf77d75aa6c9306a04c Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Mon, 22 Apr 2013 16:55:19 -0500 Subject: remote-hg: add support for schemes extension So that we can use shortened URLs, for example 'bb:://felipec/repo' (Bitbucket). Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/git-remote-hg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'contrib/remote-helpers') diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 0084709c8c..4f6c7b7d89 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -12,7 +12,7 @@ # For remote repositories a local clone is stored in # "$GIT_DIR/hg/origin/clone/.hg/". -from mercurial import hg, ui, bookmarks, context, util, encoding, node, error +from mercurial import hg, ui, bookmarks, context, util, encoding, node, error, extensions import re import sys @@ -305,6 +305,12 @@ def get_repo(url, alias): except subprocess.CalledProcessError: pass + try: + mod = extensions.load(myui, 'hgext.schemes', None) + mod.extsetup(myui) + except ImportError: + pass + if hg.islocal(url): repo = hg.repository(myui, url) else: -- cgit v1.2.3