From: Anton Rieder Date: Wed, 16 May 2012 21:44:00 +0000 (+0200) Subject: Applied rule #7 of git-check-ref-format X-Git-Tag: v160415~44^2~1 X-Git-Url: https://repo.or.cz/w/fast-export.git/commitdiff_plain/8f6adfd07c5df3ae790cc0fcfe0fdda529fd70a1 Applied rule #7 of git-check-ref-format Rule #7 of git-check-ref-format states "7. They cannot end with a dot '.'." which was not yet implemented in fast-export. This commit fixes this. --- diff --git a/hg-fast-export.py b/hg-fast-export.py index 2da0289..49b2add 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -140,7 +140,7 @@ def sanitize_name(name,what="branch"): n=name p=re.compile('([[ ~^:?*]|\.\.)') n=p.sub('_', n) - if n[-1] == '/': n=n[:-1]+'_' + if n[-1] in ('/', '.'): n=n[:-1]+'_' n='/'.join(map(dot,n.split('/'))) p=re.compile('_+') n=p.sub('_', n)