You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anthony Gardner <cy...@yahoo.co.uk> on 2008/04/06 07:04:02 UTC

Need diff output explained

<table cellspacing='0' cellpadding='0' border='0' ><tr><td style='font: inherit;'>Not a noob but really trying to put svn through it paces and predict the output of commands. Sometimes, I get stumped.<br><br>These are some home made examples and just when I think I'm making progess, something unexpected pops up.<br><br>Here's the first of my questions.<br><br>With the following flow, why, when I svn diff on the release_branch, does svn show unexpected paths for the diff? Why doesn't svn stay within the WC of release_branch to display the diffs as in the last example.<br><br>Thank you <br><br>trunk r2 ____ r5 (copy to devel_branch)<br>
&nbsp;&nbsp; devel_branch r6 ____ r7 (copy to release_branch) <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release_branch r8<br><br>(the examples below are just snippets from the actual output)<br><br>cd <span style="font-weight: bold;">release_branch</span><br><br><span style="font-weight: bold;">svn diff -r2:7</span><br>--- public/pub_file3.pl (.../<span style="font-weight: bold;">trunk</span>)&nbsp;&nbsp;&nbsp;&nbsp; (revision 2)<br>+++ public/pub_file3.pl (.../<span style="font-weight: bold;">branches/devel_branch</span>)&nbsp;&nbsp;&nbsp;&nbsp; (revision 7)<br><br><span style="font-weight: bold;">svn diff -r2:8</span><br>--- public/pub_file3.pl (.../<span style="font-weight: bold;">trunk</span>)&nbsp;&nbsp;&nbsp;&nbsp; (revision 2)<br>+++ public/pub_file3.pl (.../<span style="font-weight: bold;">branches/release_branch</span>)&nbsp;&nbsp; (revision 8)<br><br><span style="font-weight: bold;">svn diff -r8:9</span><br>--- private/pri_file1.pl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (revision 8)<br>+++
 private/pri_file1.pl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (revision 9)<br><br>Disclaimer: Technically, I&amp;#39;m always wrong!!</td></tr></table><br>



      <hr size=1> 
Yahoo! for Good helps you <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/">make a difference</a>

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

Re: Need diff output explained

Posted by Troy Curtis Jr <tr...@gmail.com>.
On Sun, Apr 6, 2008 at 2:04 AM, Anthony Gardner
<cy...@yahoo.co.uk> wrote:
> Not a noob but really trying to put svn through it paces and predict the
> output of commands. Sometimes, I get stumped.
>
> These are some home made examples and just when I think I'm making progess,
> something unexpected pops up.
>
> Here's the first of my questions.
>
> With the following flow, why, when I svn diff on the release_branch, does
> svn show unexpected paths for the diff? Why doesn't svn stay within the WC
> of release_branch to display the diffs as in the last example.
>
> Thank you
>
> trunk r2 ____ r5 (copy to devel_branch)
>     devel_branch r6 ____ r7 (copy to release_branch)
>            release_branch r8
>
> (the examples below are just snippets from the actual output)
>
> cd release_branch
>
> svn diff -r2:7
> --- public/pub_file3.pl (.../trunk)     (revision 2)
> +++ public/pub_file3.pl (.../branches/devel_branch)     (revision 7)
>
> svn diff -r2:8
> --- public/pub_file3.pl (.../trunk)     (revision 2)
> +++ public/pub_file3.pl (.../branches/release_branch)   (revision 8)
>
> svn diff -r8:9
> --- private/pri_file1.pl        (revision 8)
> +++ private/pri_file1.pl        (revision 9)
>
> Disclaimer: Technically, I&#39;m always wrong!!
>  ________________________________
>  Yahoo! for Good helps you make a difference
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional
> commands, e-mail: users-help@subversion.tigris.org

Copies in Subversion not only copy the contents of the item but also
the history.  Doing a log on that file will travel all the way back to
when it was really created in the repo, past the copy point.  With the
diff it is the same way.

When you ask subversion to give you the diff between revision 2 and
revision 8 of a file that is the result of a copy it does just that.
That file DOES exist in revision 2, even if it did not exist in that
particular location at that time.

Hope that helps.

Troy

-- 
"Beware of spyware. If you can, use the Firefox browser." - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)

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