[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Subversion repository layout



I've set up a test repo that's reorganised using the new layout. 
svn://svn.debian.org/svn/pkg-perl/test-repo/trunk/ That's a 300 mb
checkout. :-) 

If you have a few minutes try some things out and make sure it looks ok
and works with your tools. Commits here won't be saved.

I automated the transition, so when it's time to convert the real repo the
attached script can be used.

Note that scripts/qa/ will need some changes after the transition.

-- 
see shy jo
#!/bin/sh
# check out, cd to repo
set -e
mkdir -p trunk tags branches/upstream
svn add trunk tags branches
svn mv packages/attic .
svn commit attic -m moved
for p in $(ls -1 packages); do 
	if [ "$p" != attic ]; then
		svn mv packages/$p/trunk trunk/$p
		svn mkdir tags/$p
		for t in $(ls -1 packages/$p/tags/); do
			svn mv packages/$p/tags/$t tags/$p/$t
		done
		for b in $(ls -1 packages/$p/branches/); do
			if [ "$b" = upstream ]; then
				svn mv packages/$p/branches/$b branches/upstream/$p
			else
				svn mkdir branches/$p || true
				svn mv packages/$p/branches/$b branches/$p
			fi
		done
	fi
done
svn commit trunk -m "repo reorganisation"
svn commit tags -m "repo reorganisation"
svn commit branches -m "repo reorganisation"
svn rm $(svnpath)/packages -m "repo reorganisation" # uses less ram
cd trunk
for p in $(ls -1); do
	perl -i -pe 's!pkg-perl/packages/(.*)/trunk!pkg-perl/trunk/$1!' $p/debian/control
done
svn commit -m "update Vcs-Svn lines for new locations"

Attachment: signature.asc
Description: Digital signature


Reply to: