Thread (75 messages) flat view 75 messages, 12 authors, 2016-06-15
STALE3748d

Revision v4 of 2 in this series.

Revisions (2)
  1. v4 current
  2. v5 [diff vs current]

[PATCH v4 11/13] remote-hg: add support for fake remote

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:55:08
Subsystem: the rest · Maintainer: Linus Torvalds

Helpful while testing.

Signed-off-by: Felipe Contreras <redacted>
---
 contrib/remote-hg/git-remote-hg | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/contrib/remote-hg/git-remote-hg b/contrib/remote-hg/git-remote-hg
index e8e3791..092020f 100755
--- a/contrib/remote-hg/git-remote-hg
+++ b/contrib/remote-hg/git-remote-hg
@@ -245,7 +245,13 @@ def get_repo(url, alias):
     myui = ui.ui()
     myui.setconfig('ui', 'interactive', 'off')
 
-    if hg.islocal(url):
+    if url.startswith("remote://"):
+        remote = True
+        url = "file://%s" % url[9:]
+    else:
+        remote = False
+
+    if hg.islocal(url) and not remote:
         repo = hg.repository(myui, url)
     else:
         local_path = os.path.join(dirname, 'clone')
-- 
1.8.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help