diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-04-22 16:55:19 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-22 15:25:55 -0700 |
commit | 891122266fc6836cb8a8ebf77d75aa6c9306a04c (patch) | |
tree | 7abf26cdc9a2650080955c9df404d41517c105c2 /contrib | |
parent | a2e462c5b50c6072e478d434b3892c9f7155a084 (diff) | |
download | git-891122266fc6836cb8a8ebf77d75aa6c9306a04c.tar.gz |
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 <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/remote-helpers/git-remote-hg | 8 |
1 files changed, 7 insertions, 1 deletions
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: |