* [PATCH] git-remote-hg: Fix . at end of ref
@ 2013-06-21 16:12 Brian Gernhardt
0 siblings, 0 replies; only message in thread
From: Brian Gernhardt @ 2013-06-21 16:12 UTC (permalink / raw)
To: Git List; +Cc: Junio C Hamano
Any Mercurial tag/branch/bookmark that ended with a period would be
rejected by fast-import. The repository could be cloned, but any
further fetch would fail.
Use a similar trick to the space handling, but only when the period is
at the end of the ref.
Probably need a more general solution to this problem.
Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
---
contrib/remote-helpers/git-remote-hg | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 0194c67..7fa6cd7 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -78,9 +78,11 @@ def hgbin(n):
return node.bin(n)
def hgref(ref):
+ ref = re.sub('_\._$', '.', ref)
return ref.replace('___', ' ')
def gitref(ref):
+ ref = re.sub('\.$', '_._', ref)
return ref.replace(' ', '___')
def check_version(*check):
--
1.8.3.1.636.g893104c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-06-21 16:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 16:12 [PATCH] git-remote-hg: Fix . at end of ref Brian Gernhardt
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).