[Pkg-sysvinit-devel] git repository for sysvinit
Roger Leigh
rleigh at codelibre.net
Tue Jul 12 21:03:53 UTC 2011
Hi,
I mentioned a few months back that I'd created a temporary git
repository on git.debian.org for the /run transition work. This
was just a crude import of the current tree, without any history.
IIRC, someone mentioned at the time that doing a git conversion
was on their TODO list.
Today, I tried a couple of different conversion methods:
- git svn
- svn2git
Both worked, but when doing per-tag and -branch checks the former
gave broken history. This is due to the presence of some
inconsistencies in the repository history. The latter allowed
a "perfect" conversion with the creation of a custom import
ruleset.
I've replaced the temporary repository at
git.debian.org/git/collab-maint/sysvinit
with the completed repository conversion for you to take a look at.
I've also attached the scripts I used to to the conversion and
validation.
sysvinit.rules works around brokenness in the early history of the
repo (all revisions before r18 are discarded), and it special cases
upstream branches and names tags to allow tag conversion later.
fixtags.sh converts tag branches to signed tags. Currently signed
by me, but can be trivially resigned. checktags.sh validates all
tags by diffing each checked out tag with a full SVN tree, and
filtering out all .svn and .git dirs. Branches were validated using
the same logic, but by hand.
Dodgy tags:
2.86.ds1-12
2.86.ds1-13
2.86.ds1-22[.new[@936]]
2.86.ds1-31
2.86.ds1-34
These all appear in git as incomplete merges. They exist as tags
but are not attached to any branch (i.e. unlike all other tags
are not in the history for master). "git svn" gave incorrect
history for these. "svn2git" correctly reproduces the tree, but
it's not part of the history for any specific branch. You can
easily create such a branch with "git checkout -b $tag".
I guess these were a result of making a commit to the tag after
branching from master, since in svn a tag is just a directory.
Anyway, hope this is useful. If you don't want to use the repo
as it stands, feel free to pull the branches and push them
elsewhere, or to repeat the entire conversion yourselves--all
the bits needed to reproduce the conversion are attached. The
above repo is in collab-maint for convenience, but could easily
be moved to a pkg-sysvinit directory with the same access controls
as the existing svn repo.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
-------------- next part --------------
#
# Declare the repositories we know about:
#
create repository sysvinit
end repository
#
# Declare the rules
# Note: rules must end in a slash
#
match /(trunk|branches|tags|sysvinit|sysvinit-upstream)/
max revision 17
end match
match /sysvinit/trunk/
min revision 18
repository sysvinit
branch master
end match
match /sysvinit-upstream/trunk/
min revision 18
repository sysvinit
branch upstream
end match
# Subversion doesn't understand the Git concept of tags
# In Subversion, tags are really branches
#
# Only a post-processing (i.e., after converting to Git) of the tag
# branches can we be sure that a tag wasn't moved or changed from the
# branch it was copied from
#
# So we don't pretend that SVN tags are Git tags and then import
# everything as one
match /sysvinit/branches/upstream/([^/]+)/
min revision 18
repository sysvinit
branch upstream/\1
end match
match /sysvinit/branches/([^/]+)/
min revision 18
repository sysvinit
branch \1
end match
match /sysvinit/tags/([^/]+)/
min revision 18
repository sysvinit
branch tag-\1
end match
match /sysvinit-upstream/(branches|tags)/([^/]+)/
min revision 18
repository sysvinit
branch upstream-\2
end match
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixtags.sh
Type: application/x-sh
Size: 524 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110712/9876c3d2/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checktags.sh
Type: application/x-sh
Size: 266 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110712/9876c3d2/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-sysvinit-devel/attachments/20110712/9876c3d2/attachment.pgp>
More information about the Pkg-sysvinit-devel
mailing list