summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Rieder <johannes.a.rieder@student.tugraz.at>2012-05-16 23:44:00 +0200
committerAnton Rieder <johannes.a.rieder@student.tugraz.at>2012-05-16 23:44:00 +0200
commit8f6adfd07c5df3ae790cc0fcfe0fdda529fd70a1 (patch)
tree1b7f9970b73da36128579baf712db00f95d442d1
parentb2f6d28722b04c51d21a26f3aebec8c3e5aae72e (diff)
downloadhg-fast-export-8f6adfd07c5df3ae790cc0fcfe0fdda529fd70a1.tar.gz
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.
-rwxr-xr-xhg-fast-export.py2
1 files changed, 1 insertions, 1 deletions
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)