[Debichem-devel] Git migration plan

Daniel Leidert dleidert at debian.org
Sat Jan 27 11:26:15 UTC 2018


Am Donnerstag, den 25.01.2018, 16:12 +0100 schrieb Daniel Leidert:
> Am Donnerstag, den 25.01.2018, 14:40 +1100 schrieb Stuart Prescott:

[tags outside the linearized history]
> That's due to so called mixed-revision-tags, created by running "svn
> cp" without calling "svn update" first. Anders Kaseorg explained it in
> #887881. If you take a look at the subversion log, you'll see, that
> many of our tags have several parent revisions instead of just one.
> 
> > Programmatically fixing it is not impossible but is difficult.
> 
> What about this: After creating the Git repositories, get the parent
> commit IDs of a tag, determine the youngest one, compare its content
> tree to the current tag content tree and if both match (safety net),
> recreate the tag. I'm not that familiar with using `git log` in
> scripts, but it might be possible to do this. Help is appreciated.

Done [2].

[..]
> > > - Are there hooks, templates, ... etc. that should be created for every
> > > repository? Do we need to setup a repository template at
> > > salsa.debian.org for every repository? Is there anybody already
> > > familiar with the latter?
> > 
> > There are two options here -- straight to salsa or park on alioth for a short 
> > period. I suspect going straight to salsa is a better idea.
> 
> ACK.

Added a script [4] to do that. The script can set more parameters for
the repository if necessary. Please add them yourself or comment, if
you have a suggestion.

Already tested the script successfully to upload to my private account
at [5]. The script needs a secret token to be created first and added
to the script. It also contains a (commented) line to delete an
existing repository before upload. Note, that if you enable this line,
it will only work on your personal repository and for teams, where you
have the status "owner". If you want to test the script yourself within
your personal pages, you'll have to get the namespace_id [6] and create
a private token, then adjust the variables in the script accordingly.

[..]
> > > - Tags called backup/* are used by svn-all-fast-export to mark the last
> > > commit, before a branch (sometimes tags, but these should all be fixed
> > > already) was deleted. These can be removed if you feel no need to keep
> > > them. Please check the graphical log and/or the subversion history if
> > > necessary.
> > 
> > I notice in your script that you are copying the bare repo created via svn-
> > all-fast-export. Instead, it is best to immediately clone that repo (either a 
> > bare clone or otherwise). There tends to be a lot of mess left in the repo 
> > that svn-all-fast-export creates (including all these backup tags) and from 
> > memory that initial clone lets git get rid of them. The call to git-repack 
> > does some of this but the recommendation is to clone. (Yes, I am painfully 
> > aware that svn-all-fast-export is woefully underdocumented; unfortunately, 
> > it's a tool that by the time you've become expert enough in using it, you 
> > probably stop using it because you've done all the conversions you need.)
> 
> Thanks for the advice. Didn't know that. I'll try to do a clone, then
> fix the tags as mentioned at the top, then create a bare repo and
> upload it to salsa.d.o.

Done. The workflow now is:

- create the repos [1]
- fix the tags [2]
- create a bare clone
- upload that clone to my personal alioth pages [3]
(- import the repository to salsa [4] - currently into my own namespace
for testing)

[..]
> - updating debian/control to add Vcs-Git, remove Vcs-Svn and update Vcs-
> > Browser; a simple sed is probably enough but I can help with python-debian's 
> > deb822 if not. I assume it's worth doing that on all packages immediately even 
> > if they are not yet uploaded.
> 
> ACK. sed and dch might be enough. The commit could be done locally
> before creating the bare repo and uploading it. Help is appreciated.

Still on the TODO list.

[1] https://anonscm.debian.org/viewvc/debichem/debichem.rules?view=co
[2] https://anonscm.debian.org/viewvc/debichem/gitfixtags.sh?view=co&content-type=text%2Fplain
[3] https://people.debian.org/~dleidert/debichem/
[4] https://anonscm.debian.org/viewvc/debichem/gitimport.sh?view=co&content-type=text%2Fplain
[5] https://salsa.debian.org/users/dleidert/projects
[6] https://salsa.debian.org/api/v4//namespaces

Current conversion time including upload <6 minutes :)

Regards, Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/debichem-devel/attachments/20180127/cec6ea2e/attachment-0001.sig>


More information about the Debichem-devel mailing list