...
First, we need the list of all subversion userids:
Code Blocknoformat |
---|
svnadmin dump /path/to/svnrepo | grep -a -A 2 svn:author \
| grep -v svn:author | grep -v ^V | grep -v ^- | sort -u > authors.txt |
Next, this file will need to be modified so that each line looks like:
Code Blocknoformat |
---|
userid = Full Name <email-address@example.org> |
...
Use a copy of the result of the previous step:
Code Blocknoformat |
---|
cp -a 1.initial-conversion 2.abandoned-svn cd 2.abandoned-svn |
Install the git-svn-abandon scripts, then run the following:
Code Blocknoformat |
---|
git svn-abandon-fix-refs git svn-abandon-cleanup git config --remove-section svn git config --remove-section svn-remote.svn rm -rf .git/svn .git/logs/refs/remotes/svn .git/refs/remotes/svn |
...
Use a copy of the result of the previous step:
Code Blocknoformat |
---|
cp -a 2.abandoned-svn 3.refs-cleaned cd 3.refs-cleaned |
Remove useless tags:
Code Blocknoformat |
---|
git tag -d NA1-0 2.2.4-patch1 release-2.2.4-patch1 |
Rename original release tags using git convention (preserves original tag dates):
Code Blocknoformat |
---|
git tag -f v1.0 fedora-1-0 git tag -f v1.1 fedora-1-1 git tag -f v1.1.1 fedora-1-1-1 git tag -f v1.2 fedora-1-2 git tag -f v1.2.1 fedora-1-2-1 git tag -f v2.0 fedora-2-0 git tag -f v2.1 fedora-2-1 git tag -f v2.1.1 fedora-2-1-1 git tag -f v2.1b fedora-2-1b git tag -f v2.2 fedora-2-2 git tag -f v2.2.1 release-2.2.1 git tag -f v2.2.2 release-2.2.2 git tag -f v2.2.3 release-2.2.3 git tag -f v2.2.4 release-2.2.4 git tag -f v3.0 release-3.0 git tag -f v3.0b1 release-3.0b1 git tag -f v3.0b2 release-3.0b2 git tag -f v3.1 release-3.1 git tag -f v3.2 release-3.2 git tag -f v3.2.1 release-3.2.1 git tag -f v3.3 release-3.3 git tag -f v3.3.1 release-3.3.1 git tag -f v3.4 release-3.4 git tag -f v3.4-RC1 release-3.4-RC1 git tag -f v3.4.1 release-3.4.1 |
Remove old, redundant tags:
Code Blocknoformat |
---|
git tag -d `git tag|grep release` git tag -d `git tag|grep fedora` |
Remove old, unused branches:
Code Blocknoformat |
---|
git branch -D `git branch | grep -v master \ | grep -v maintenance-3.4|grep -v maintenance-2.2` |
Free unused space in the repository:
Code Blocknoformat |
---|
git gc --prune=now git prune |
Avoid 'local uncommitted change' errors later
Code Blocknoformat |
---|
git status |
4. Separate Recent History
...