You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Frederic Melot <fr...@lpsc.in2p3.fr> on 2008/08/27 11:56:37 UTC

Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Hello,

I already sent this email to users@subversion.tigris.org, with no reply, 
so I post it to dev@subversion.tigris.org!

Here is the result of a svnlook diff command with svn 1.4.5:
  svn-1.4.5/bin/svnlook diff --revision 1607 /SVN/quattor/
  Copied: scdb/tags/2008/08/08-16.48.11 (from rev 1606, scdb/trunk)

I upgraded the server and the client to svn 1.5.1 and now the result is 
empty for the same command:
  svn-1.5.1/bin/svnlook diff --revision 1607 /SVN/quattor/

Has someone an idea of the origin of this difference of result?

Thanks in advance

Best regards,
Frederic Melot

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Thu, 28 Aug 2008 at 18:04 +0300:
> C. Michael Pilato wrote on Thu, 28 Aug 2008 at 10:13 -0400:
> > Looks like in the original recipe, the copied thing was a directory (copied
> > from "trunk").  Is that significant?
> > 
> 
> Yes.  (Julian pointed out the same.)
> 
> 	% /usr/bin/svnlook diff -r2 r1
> 	Copied: trunk2 (from rev 1, trunk)
> 
> 	% svnlook diff -r2 r1
> 
> 	%
> 

Filed as http://subversion.tigris.org/issues/show_bug.cgi?id=3292.  

Frederic (or Frédéric?), do you have time to provide a patch?

Daniel

> In 1.4, it just prints the "Copied" header immediately:
> 
>       SVN_ERR(svn_cmdline_printf(pool, _("Copied: %s (from rev %ld, %s)\n"),
>                                  path, node->copyfrom_rev, base_path));
>       printed_header = TRUE;
> 
> but in trunk, it uses a buffer:
> 
>       svn_stringbuf_appendcstr
>         (header,
>          apr_psprintf(pool, _("Copied: %s (from rev %ld, %s)\n"),
>                       path, node->copyfrom_rev, base_path));
> 
> And, apparently, never prints its contents for the directory case...
> 
> Daniel

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Forward to list.

Frederic Melot wrote on Tue, 2 Sep 2008 at 09:38 +0200:
> Hello,
> 
> do you know if this behavior will be corrected in a future svn release and on
> which one ?
> 

I don't know when it will be fixed.  (It should be fixed, since it's a 
regression.)  No one stepped up yet to fix it; feel free to do it 
yourself, though.  See HACKING, particularly [1].

Once committed, the fix is likely to be backported to the 1.5.x line and 
be included in the next release.

Daniel

[1] http://subersion.tigris.org/hacking.html#patches

> Best regards,
> Frédéric
> 
> Daniel Shahaf wrote:
> > C. Michael Pilato wrote on Thu, 28 Aug 2008 at 10:13 -0400:
> >   
> > > Looks like in the original recipe, the copied thing was a directory
> > > (copied
> > > from "trunk").  Is that significant?
> > > 
> > >     
> > 
> > Yes.  (Julian pointed out the same.)
> > 
> > 	% /usr/bin/svnlook diff -r2 r1
> > 	Copied: trunk2 (from rev 1, trunk)
> > 
> > 	% svnlook diff -r2 r1
> > 
> > 	%
> > 
> > In 1.4, it just prints the "Copied" header immediately:
> > 
> >       SVN_ERR(svn_cmdline_printf(pool, _("Copied: %s (from rev %ld, %s)\n"),
> >                                  path, node->copyfrom_rev, base_path));
> >       printed_header = TRUE;
> > 
> > but in trunk, it uses a buffer:
> > 
> >       svn_stringbuf_appendcstr
> >         (header,
> >          apr_psprintf(pool, _("Copied: %s (from rev %ld, %s)\n"),
> >                       path, node->copyfrom_rev, base_path));
> > 
> > And, apparently, never prints its contents for the directory case...
> > 
> > Daniel
> 

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
C. Michael Pilato wrote on Thu, 28 Aug 2008 at 10:13 -0400:
> Looks like in the original recipe, the copied thing was a directory (copied
> from "trunk").  Is that significant?
> 

Yes.  (Julian pointed out the same.)

	% /usr/bin/svnlook diff -r2 r1
	Copied: trunk2 (from rev 1, trunk)

	% svnlook diff -r2 r1

	%

In 1.4, it just prints the "Copied" header immediately:

      SVN_ERR(svn_cmdline_printf(pool, _("Copied: %s (from rev %ld, %s)\n"),
                                 path, node->copyfrom_rev, base_path));
      printed_header = TRUE;

but in trunk, it uses a buffer:

      svn_stringbuf_appendcstr
        (header,
         apr_psprintf(pool, _("Copied: %s (from rev %ld, %s)\n"),
                      path, node->copyfrom_rev, base_path));

And, apparently, never prints its contents for the directory case...

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by "C. Michael Pilato" <cm...@collab.net>.
Daniel Shahaf wrote:
> Frederic Melot wrote on Wed, 27 Aug 2008 at 13:56 +0200:
>> Hello,
>>
>> I already sent this email to users@subversion.tigris.org, with no reply, so I
>> post it to dev@subversion.tigris.org!
>>
>> Here is the result of a svnlook diff command with svn 1.4.5:
>>  svn-1.4.5/bin/svnlook diff --revision 1607 /SVN/quattor/
>>  Copied: scdb/tags/2008/08/08-16.48.11 (from rev 1606, scdb/trunk)
>>
>> I upgraded the server and the client to svn 1.5.1 and now the result is empty
>> for the same command:
>>  svn-1.5.1/bin/svnlook diff --revision 1607 /SVN/quattor/
>>
> 
> I can't reproduce this:
> 
>     ### 1.4.5
>     % svnlook --version | head -1
>     svnlook, version 1.4.5 (r25188)
> 
>     % svnlook diff -r2 repos1
>     Copied: trunk/iota2 (from rev 1, trunk/iota)
>     ===================================================================
>     --- trunk/iota2                         (rev 0)
>     +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
>     @@ -0,0 +1 @@
>     +This is the file 'iota'.

Looks like in the original recipe, the copied thing was a directory (copied
from "trunk").  Is that significant?

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Frederic Melot <fr...@lpsc.in2p3.fr>.
Hello,

here is a script which can reproduce my problem :

1) Creation of a new repository with the 1.4.5 svn server (FS format '2' 
is needed to use the 1.4.5 svn client):
/rm -rf /SVN/NEW/
/usr/local/svn-1.4.5/bin/svnadmin create /SVN/NEW
chown -R apache:apache /SVN/NEW/

/
2) On a svn client:
/cd /tmp
rm -rf NEW
/
/svn co https://lpsc.in2p3.fr/svn/NEW
cd NEW/
touch toto
svn add toto
svn ci -m 'add of file toto'
mkdir dir1
touch dir1/tata
svn add dir1
svn ci -m 'add of folder dir1'
nedit toto&
svn ci -m 'Design improvements'/

This will create 3 new revisions, two with file or folder creation and 
one with file modification.

3) On the svn server:
//usr/local/svn-1.4.5/bin/svnlook diff --revision 1 /SVN/NEW/
/usr/local/svn-1.5.1/bin/svnlook diff --revision 1 /SVN/NEW/

/usr/local/svn-1.4.5/bin/svnlook diff --revision 2 /SVN/NEW/
/usr/local/svn-1.5.1/bin/svnlook diff --revision 2 /SVN/NEW/

/usr/local/svn-1.4.5/bin/svnlook diff --revision 3 /SVN/NEW/
/usr/local/svn-1.5.1/bin/svnlook diff --revision 3 /SVN/NEW//

The first one returns "Added: toto", the second nothing!
The third one returns "Added: dir1/tata", the fourth nothing!
The fifth and the sixth both return the same result: the file modification.

Many thanks for investigating.
Best regards,
Frédéric

Julian Foad wrote:
>> Frederic Melot wrote on Wed, 27 Aug 2008 at 13:56 +0200:
>>     
>>> Hello,
>>>
>>> I already sent this email to users@subversion.tigris.org, with no reply, so I
>>> post it to dev@subversion.tigris.org!
>>>
>>> Here is the result of a svnlook diff command with svn 1.4.5:
>>>  svn-1.4.5/bin/svnlook diff --revision 1607 /SVN/quattor/
>>>  Copied: scdb/tags/2008/08/08-16.48.11 (from rev 1606, scdb/trunk)
>>>
>>> I upgraded the server and the client to svn 1.5.1 and now the result is empty
>>> for the same command:
>>>  svn-1.5.1/bin/svnlook diff --revision 1607 /SVN/quattor/
>>>
>>>       
>
> Frederic,
> can you create a reproduction script for us? That is, a script that
> creates a repository, creates some data inside it, and then runs the
> "svnlook" command, so that we can simply run your script and watch what
> happens.
>
> Or, alternatively, can you give us (or one of us) remote access to your
> repository, or a copy of your repository?
>
> Any one of these things would make it much more likely that we could
> reproduce and then debug the problem.
>
>
> Daniel Shahaf wrote:
>   
>> I can't reproduce this:
>>     
>
> Daniel, Note that the Frederic copied a directory. I don't know if this
> will make the difference.
>
>
>   
>>     ### 1.4.5
>>     % svnlook --version | head -1
>>     svnlook, version 1.4.5 (r25188)
>>
>>     % svnlook diff -r2 repos1
>>     Copied: trunk/iota2 (from rev 1, trunk/iota)
>>     ===================================================================
>>     --- trunk/iota2                         (rev 0)
>>     +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
>>     @@ -0,0 +1 @@
>>     +This is the file 'iota'.
>>     
> [...]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Julian Foad <ju...@btopenworld.com>.
> Frederic Melot wrote on Wed, 27 Aug 2008 at 13:56 +0200:
> > Hello,
> > 
> > I already sent this email to users@subversion.tigris.org, with no reply, so I
> > post it to dev@subversion.tigris.org!
> > 
> > Here is the result of a svnlook diff command with svn 1.4.5:
> >  svn-1.4.5/bin/svnlook diff --revision 1607 /SVN/quattor/
> >  Copied: scdb/tags/2008/08/08-16.48.11 (from rev 1606, scdb/trunk)
> > 
> > I upgraded the server and the client to svn 1.5.1 and now the result is empty
> > for the same command:
> >  svn-1.5.1/bin/svnlook diff --revision 1607 /SVN/quattor/
> > 

Frederic,
can you create a reproduction script for us? That is, a script that
creates a repository, creates some data inside it, and then runs the
"svnlook" command, so that we can simply run your script and watch what
happens.

Or, alternatively, can you give us (or one of us) remote access to your
repository, or a copy of your repository?

Any one of these things would make it much more likely that we could
reproduce and then debug the problem.


Daniel Shahaf wrote:
> I can't reproduce this:

Daniel, Note that the Frederic copied a directory. I don't know if this
will make the difference.


>     ### 1.4.5
>     % svnlook --version | head -1
>     svnlook, version 1.4.5 (r25188)
> 
>     % svnlook diff -r2 repos1
>     Copied: trunk/iota2 (from rev 1, trunk/iota)
>     ===================================================================
>     --- trunk/iota2                         (rev 0)
>     +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
>     @@ -0,0 +1 @@
>     +This is the file 'iota'.
[...]



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Difference of behavior between svn 1.4.5 and 1.5.1 for svnlook diff

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Frederic Melot wrote on Wed, 27 Aug 2008 at 13:56 +0200:
> Hello,
> 
> I already sent this email to users@subversion.tigris.org, with no reply, so I
> post it to dev@subversion.tigris.org!
> 
> Here is the result of a svnlook diff command with svn 1.4.5:
>  svn-1.4.5/bin/svnlook diff --revision 1607 /SVN/quattor/
>  Copied: scdb/tags/2008/08/08-16.48.11 (from rev 1606, scdb/trunk)
> 
> I upgraded the server and the client to svn 1.5.1 and now the result is empty
> for the same command:
>  svn-1.5.1/bin/svnlook diff --revision 1607 /SVN/quattor/
> 

I can't reproduce this:

    ### 1.4.5
    % svnlook --version | head -1
    svnlook, version 1.4.5 (r25188)

    % svnlook diff -r2 repos1
    Copied: trunk/iota2 (from rev 1, trunk/iota)
    ===================================================================
    --- trunk/iota2                         (rev 0)
    +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
    @@ -0,0 +1 @@
    +This is the file 'iota'.


    ### 1.5.1
    % svnlook --version | head -1
    svnlook, version 1.5.1 (r32289)

    % svnlook diff -r2 repos1
    Copied: trunk/iota2 (from rev 1, trunk/iota)
    ===================================================================
    --- trunk/iota2                         (rev 0)
    +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
    @@ -0,0 +1 @@
    +This is the file 'iota'.


    ### trunk@HEAD
    % svnlook --version | head -1
    svnlook, version 1.6.0 (dev build-r32777)

    % svnlook diff -r2 repos1
    Copied: trunk/iota2 (from rev 1, trunk/iota)
    ===================================================================
    --- trunk/iota2                         (rev 0)
    +++ trunk/iota2 2008-08-28 05:04:59 UTC (rev 2)
    @@ -0,0 +1 @@
    +This is the file 'iota'.




> Has someone an idea of the origin of this difference of result?
> 
> Thanks in advance
> 
> Best regards,
> Frederic Melot
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org