From: Brian Gernhardt <brian@gernhardtsoftware.com>
To: Git List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] git-remote-hg: Fix . at end of ref
Date: Fri, 21 Jun 2013 12:12:38 -0400 [thread overview]
Message-ID: <1371831158-9720-1-git-send-email-brian@gernhardtsoftware.com> (raw)
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
reply other threads:[~2013-06-21 16:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371831158-9720-1-git-send-email-brian@gernhardtsoftware.com \
--to=brian@gernhardtsoftware.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).