[svk-devel] Problem in SVN::Mirror::Ra.pm
Chia-Liang Kao
clkao at clkao.org
Sat Oct 28 01:51:32 EDT 2006
Thanks so much for looking into this. I noticed the problem a while
ago with newer client library, and I think this is like what you said,
client/server version combination problems. Also the behaviour is
different depending on which ra transport is being used :(
One of the reasons that get_latest_revnum is messy is that it's so
hard to setup automated tests for different versions of client and
server to test with. I might try to do something on this next week,
or at least apply your patch..
On 26/10/06, Rolf Schäuble <mailinglists at rschaeuble.de> wrote:
> Over the last days, I was hunting down two problems that I had with
> SVK. It turned out to be a problem in SVN::Mirror::Ra.pm. I don't
> know if this is the right place for reports on that code, but since
> the code was written by the author of svk, I will start here.
> Please tell me if it would be better to report it on a subversion
> mailing list.
>
> The first problem was what I reported in a mail to this list with the
> title "Error on svk sync -s". After I have first found (and fixed)
> the second problem, I now understand what was going on. The client
> was sending a log request for the revision range -1:-1 to the
> subversion server, which responded with an empty answer. I just don't
> know why it always worked when I tried it from work. Maybe because of
> the combination of client and server svn libs? Unfortunately, I don't
> know which version of svn that server runs; it doesn't report it in
> its answers.
>
> The second problem I had was using 'sync -s' on the URL http://
> svn.python.org/projects/python/trunk (this server is running svn
> 1.1.4). Here the problem was different. SVK spent hours communicating
> with the svn server, but never achieved anything. After sniffing the
> network connection, I found that it sent the same sequence of REPORT
> and a few PROPGET (I think that was it, if someone asks for it, I can
> provide the ethereal logs) over and over again.
> After this, I started to write a small test client, just using the
> SVN::* classes directly, to track down the problem. In the end I
> found it in SVN::Mirror::Ra.pm. In get_latest_rev(), it ran into the
> until/if block, where it sends a log request in the range -1:-1. This
> request is answered with an empty response by the server, so $rev
> stays undefined. This causes the "until (defined $ref)" loop to run
> again and again and again.....
> I fixed this by changing that get_log call to query for the range
> -1:0. That seems to work, both over dav as well as on local
> repositories. I haven't tried it over svnserver yet, though.
>
> There are a few points about get_latest_rev which I don't understand:
>
> - Why did this work ever before? Was there a change in some version
> of subversion, redefining the meaning of -1:-1?
> - What is the line
> my $_start = $self->{rsource} =~ m/^file/ ? 0 : -1;
> good for? Especially when my 'fix' is to always use the value '0'.
> - Would my change break anything? I changed the get_log call to this:
> $ra->get_log ([''], $ra->get_latest_revnum, 0, 1, 0, 1, sub
> { $rev = $_[1] });
> always querying the log in the range -1:0. It would be especially
> interesting to know if that doesn't work with older clients or
> servers. I can't really test this myself right now.
> - Does anyone know a bit more about the problem that long comment in
> get_latest_rev refers to? I think it's missing a few details. Also,
> the until/else block looks a bit strange to me. And when I tested it,
> it didn't work.
>
> I will send a patch with my changes this weekend. But since I know
> much too less about SVN and SVK, it would be great to get some
> comments and answers.
>
> Thanks
> Rolf
>
> _______________________________________________
> svk-devel mailing list
> svk-devel at bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-devel
>
More information about the svk-devel
mailing list