[Kde-scm-interest] Re: Using svn2git to capture only a couple of files in a directory

Torgny Nyblom kde at nyblom.org
Fri Dec 24 07:34:41 CET 2010


On Fri, 24 Dec 2010 02:21:40 -0300
Nicolas Alvarez <nicolas.alvarez at gmail.com> wrote:

> Michael Pyne wrote:
> > As a followup, I've tried adding a "prefix /" to the applicable rules to
> > force there to be some path component in the resultant filename.
> 
> Okay, this is a bit disgusting, but it works (at least in the 411384-420000 
> revision range you were converting):
> 
> match /trunk/KDE/kdesdk/scripts/(kdesvn-build.*)
>   repository kdesrc-build
>   branch master
>   prefix /\1
>   min revision 414006
>   max revision 1143245
> end match
> 
> match /trunk/KDE/kdesdk/scripts/(kdesrc-build.*)
>   repository kdesrc-build
>   prefix /\1
>   min revision 1143246
>   branch master
> end match

This is what you need to do. The entire match of the "match line" will be removed from the path that the match is done against. So if you match on a file the path feed to git will be empty. The remedy for this what is shown above, use a prefix that recreates the path as you would like it to show up in git.

Also guessing that the script was renamed in r1143246 this would result in a repo with both kdesvn-build.* and kdesrc-build.* as the deletion of kdesvn-build.* will never match. To fix this simply remove the min/max revisions.

/Regards
Torgny


More information about the Kde-scm-interest mailing list