[pkg-java-svn2git] 01/01: Adopt tag sanitization rules from git-buildpackage.
Giovanni Mascellani
gio at moszumanska.debian.org
Fri Aug 12 09:12:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
gio pushed a commit to branch master
in repository pkg-java-svn2git.
commit e4e36793b82b708e86a12c820c4c2726819c7b78
Author: Giovanni Mascellani <gio at debian.org>
Date: Fri Aug 12 11:02:17 2016 +0200
Adopt tag sanitization rules from git-buildpackage.
---
migrate-svn-repo-to-git | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/migrate-svn-repo-to-git b/migrate-svn-repo-to-git
index 3874cb3..54c93a2 100755
--- a/migrate-svn-repo-to-git
+++ b/migrate-svn-repo-to-git
@@ -32,6 +32,12 @@ git svn clone --authors-file=../$TEAM-authors.txt \
.
git reset --hard
+# Substitutions from
+# https://sources.debian.net/src/git-buildpackage/0.7.5/gbp/deb/git.py/#L164
+sanitize_version() {
+ echo "$1" | sed -e 's|%3A|%|g' -e 's|%7E|_|g'
+}
+
# Turn the branches into tags
echo "Converting branches to tags..."
for branch in `git branch -r`; do
@@ -39,7 +45,7 @@ for branch in `git branch -r`; do
version=`basename $branch`
subject=`git log -1 --pretty=format:"%s" $branch`
GIT_COMMITTER_DATE=`git log -1 --pretty=format:"%ci" $branch` \
- git tag -f -m "$subject" "debian/$version" "$branch^"
+ git tag -f -m "$subject" "debian/$(sanitize_version "$version")" "$branch^"
git branch -d -r $branch
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/pkg-java-svn2git.git
More information about the pkg-java-commits
mailing list