[Kde-scm-interest] Problem with svn2git

Sebastian Dörner sebastian at sebastian-doerner.de
Thu Jul 12 18:51:50 UTC 2012


This seems to work. I did a full conversion of dolphin-plugins and now
the branching commit is recorded. Patched version is at

https://gitorious.org/~sdoerner/svn2git/sdoerners-svn2git

As I don't know with which other unusual circumstances (apparently not
occuring in the dolphin-plugins repo) this change might conflict, I'm
not sure if it is ready for upstream. After all the patch referenced
in my last email bails out for files. Feel free to contact me if
anyone considering themselves "upstream" bothers...

Some tags are still a bit messed up, but that can be fixed after the
fact (see other thread on this list).

On 4 July 2012 19:15, Sebastian Dörner <sebastian at sebastian-doerner.de> wrote:
> Now at least I know what's going on:
>
> The only thing matching the branching commit is a rule ending in a
> file name (not a directory). When svn2git is in "recurse mode", he
> skips all files that are not directories. For trunk he never gets into
> recurse mode, so these rules work there. Below an "svn cp" however,
> file rules never match. This is due to this commit:
>
> https://gitorious.org/svn2git/svn2git/commit/d6da65ded6cab37ef5630b978a6438951ee1e150
>
> Removing those lines made the commit appear in a small test, I'm
> currently running a full conversion.
>
> Looking further down the method yields two calls, one to
> exportDispatch() and (in the else branch) one to recurse(). None of
> these calls are made for a non-directory, but from my understanding
> the exportDispatch() call should be made and only the recurse() call
> skipped. Obviously I'm not very familiar with the code base and I
> don't know if my understanding is right and what other things might go
> wrong.
>
> Can anyone (Nicolas? / Torgny?) confirm my understanding is correct or
> know why the original change was made the way it was made?
>
> Thank you!
> Sebastian
>
> On 21 June 2012 23:30, Sebastian Dörner <sebastian at sebastian-doerner.de> wrote:
>> On 13 June 2012 15:11, Torgny Nyblom <nyblom at kde.org> wrote:
>>> On Sunday 10 June 2012 19.15.43 Sebastian Dörner wrote:
>>>> Dear list,
>>>>
>>>> I started writing git conversion rules for KDESDK, starting with the
>>>> dolphin-plugins repository. The svn plugin started out in the core of
>>>> dolphin in kdebase, and some of the rules should take care of that.
>>>> While this all worked pretty well for trunk, I have some problems with
>>>> tags and branches, and I have no idea anymore why it fails. I would be
>>>> grateful if someone experienced could have a look at this problem.
>>>>
>>> Try and do the conversion with rule debugging turned on, it will produce a lot of out put but you'll see exactly what is happening and why.
>> I was working on another repository meanwhile, but now hit the same
>> thing again (hardcoded KDE-version for testing purposes):
>>
>> match /(branches|tags)/KDE/[^/]+/kdesdk/doc/(scripts/)?$
>>   action recurse
>> end match
>>
>> match /branches/KDE/4.2/kdesdk/doc/scripts/man-demangle.1.docbook
>>     repository ${REPO}
>>     prefix doc/kmtrace/man-demangle.1.docbook
>>     branch KDE/4.2
>> end match
>>
>> The recurse action works, but in the end the file itself is not
>> matched and I don't know why. The log looks like this:
>>
>> rev 906699 /branches/KDE/4.2/kdesdk/doc/ matched rule:
>> "kde-ruleset/kdesdk/kde-dev-utils-rules:21
>> /(branches|tags)/KDE/[^/]+/kdesdk/doc/(scripts/)?$"    recursing.
>> rev 906699 /branches/KDE/4.2/kdesdk/doc/scripts/ matched rule:
>> "kde-ruleset/kdesdk/kde-dev-utils-rules:21
>> /(branches|tags)/KDE/[^/]+/kdesdk/doc/(scripts/)?$"    recursing.
>> rev 906699 /branches/KDE/4.2/kdesdk/kpartloader/ matched rule:
>> "kde-ruleset/kdesdk/../common-kde-branches-rules-match-files:20
>> /branches/KDE/(\d+)\.(\d+)/kdesdk/kpartloader/"    exporting.
>>
>> I know you should have a / at the end of the path, but this is the
>> only way for files. And it does work for trunk strangely (also seen in
>> other rule files):
>>
>> match /trunk/KDE/kdesdk/doc/scripts/(man-demangle.1.docbook)
>>     repository ${REPO}
>>     branch master
>>     prefix doc/kmtrace/\1
>>     min revision 409203
>> end match
>>
>> Maybe I should start debugging the tool...
>>
>>>
>>> /Regards
>>> Torgny
>>> _______________________________________________
>>> Kde-scm-interest mailing list
>>> Kde-scm-interest at kde.org
>>> https://mail.kde.org/mailman/listinfo/kde-scm-interest


More information about the Kde-scm-interest mailing list