[Kde-scm-interest] Re: Using svn2git to capture only a couple of files in a directory
Michael Pyne
mpyne at kde.org
Fri Dec 24 21:50:04 CET 2010
On Friday, December 24, 2010 01:34:41 Torgny Nyblom wrote:
> 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.
OK, thanks for the help and feedback. Someone else is running a conversion now
but I will check back later and see if it completes.
As an aside, it might be useful to have this "hack" recorded somewhere like
the kde-ruleset. I'll probably put it up on TechBase once I've confirmed that
it works, but I wasn't able to find anything like it on the Internet when I
was looking.
Regards,
- Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20101224/f86a216d/attachment.sig
More information about the Kde-scm-interest
mailing list