[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN::Client->log problem

From: Christopher H. Laco <claco_at_chrislaco.com>
Date: 2005-11-04 20:15:29 CET

Christopher H. Laco wrote:
> This may be just a stupid user trick, but I'll ask anyways. I can't seem
> to be able to get the log entry for a revision of a file that's been
> copied to a tag/branch, but I cant get the entry for the main file in
> trunk just fine.
>
> Here's and example. Let's say I have just one file in trunk, and have
> copied trunk into tags:
>
> http://example.com/svn/project/trunk/foo.txt
> http://example.com/svn/project/tags/0.01/foo.txt
>
> Both files are at revision 22.
>
> Now, here's the simple perl:
>
>
>>use strict;
>>use warnings;
>>use SVN::Core;
>>use SVN::Client;
>>
>>my $client = SVN::Client->new(auth => [SVN::Client::get_simple_provider()]);
>>
>>$client->log(
>> ['http://example.com/svn/project/trunk/foo.txt'],
>> 22,
>> 22,
>> 0,
>> 0,
>> \&_process_log
>>);
>>
>>
>>sub _process_log {
>> my @logs = @_;
>> warn join ', ', @logs;
>>};
>
>
> As is, I get the last log entry just fine.
> Now, if I change http://example.com/svn/project/trunk/foo.txt to be
> http://example.com/svn/project/tags/0.01/foo.txt
>
> I get this instead:
>
>
>>HTTP Path Not Found: REPORT request failed on '/svn/!svn/bc/22/project/tags/0.01/foo.txt': '/svn/!svn/bc/22/project/tags/0.01/foo.txt' path not found
>
>
> Both urls from the top work in a browser, so the files are there as far
> as WEBDEV is concerned, and svn log -r22 works on both urls as well.
>
> Changing the $discover_changed_paths and/or $strict_node_history options
> has no effect.
>
> What am I missing here?
>
> This is under 1.2.0 on the client/server.
>
> Thanks,
> -=Chris

This gets somewhat stranger.

Doing alist operation, SVN::Client->ls on >
http://example.com/svn/project/tags/0.01 returns an entry for the file >
http://example.com/svn/project/tags/0.01/foo.txt at revision 22.
However, the revision for > http://example.com/svn/project/tags/0.01
after the copy is 33, with an entry of "made a copy".

If I change the code above to:

> $client->log(
> ['http://example.com/svn/project/tags/0.01/foo.txt'],
> 33,
> 22,
> 0,
> 0,
> \&_process_log
> );

I get the log entry for the copy, and the log entry for the revision 22
of the file in tags/0.01.

If I can get http://example.com/svn/project/trunk/foo.txt revision 22
from within http://example.com/svn/project/trunk/ revision 32 by
specifying revision 22, why can't I get
http://example.com/svn/project/tags/0.01/foo.txt revision 22 from
http://example.com/svn/project/tags/0.01 revision 33 by specifying
revision 22?

Is that a bug, a feature, or a severe misunderstanding of getting a log
entry on my part?

-=Chris

Received on Fri Nov 4 20:17:34 2005

This is an archived mail posted to the Subversion Users mailing list.