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

Re: Presenting net code changes for a branch

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Sun, 13 Oct 2013 21:52:10 +0200

On Sun, Oct 13, 2013 at 9:29 PM, Gabriela Gibson
<gabriela.gibson_at_gmail.com> wrote:
> On 13/10/13 15:15, Lieven Govaerts wrote:
>
> Hi Lieven,
>
>
>> The last time you updated the invoke-diff-cmd branch from trunk was in
>> rr1526487, you updated from trunk r1526439.
>
>
> Sorry, I had merged locally but not committed. (done now)
>
>
>>
>> So if you compare your branch to trunk_at_1526439 you will get a diff file
>> with only your changes. No?
>> $ svn diff -x -pwb ^/subversion/trunk_at_1526439
>> ^/subversion/branches/invoke-diff-cmd-feature
>>
>
> Previously I got all the merge changes, without seeing any of mine at all.
> And now that it's been re-merged (I reverted and started over) & committed,
> I get nothing at all. But:
>
> diff -r ~/trunk/subversion/ ~/branches/invoke-diff-cmd-feature/subversion/
>
> shows me all my changes as expected.
>
> Yet, this:
>
> svn diff -x -pwb /home/g/trunk/ /home/g/branches/invoke-diff-cmd-feature/
>
> shows me nothing at all (before it showed me what the merge added
> from trunk, but none of my changes). For some reason, the ^ expansion does
> not work on my system so I use a full path here.

But now you're using two local paths (working copy paths), instead of
repository urls. That means you're hitting usage 2 of 'svn diff'
(instead of usage 4):

[[[
C:\Documents and Settings\User>svn help diff
diff (di): Display local changes or differences between two revisions or paths.
usage: 1. diff
       2. diff [-c M | -r N[:M]] [TARGET[@REV]...]
       3. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] [--new=NEW-TGT[@NEWREV]] \
               [PATH...]
       4. diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]
       5. diff OLD-URL[@OLDREV] NEW-PATH[@NEWREV]
       6. diff OLD-PATH[@OLDREV] NEW-URL[@NEWREV]

  1. Use just 'svn diff' to display local modifications in a working copy.

  2. Display the changes made to TARGETs as they are seen in REV between
     two revisions. TARGETs may be all working copy paths or all URLs.
     If TARGETs are working copy paths, N defaults to BASE and M to the
     working copy; if URLs, N must be specified and M defaults to HEAD.
     The '-c M' option is equivalent to '-r N:M' where N = M-1.
     Using '-c -M' does the reverse: '-r M:N' where N = M-1.

  3. Display the differences between OLD-TGT as it was seen in OLDREV and
     NEW-TGT as it was seen in NEWREV. PATHs, if given, are relative to
     OLD-TGT and NEW-TGT and restrict the output to differences for those
     paths. OLD-TGT and NEW-TGT may be working copy paths or URL[@REV].
     NEW-TGT defaults to OLD-TGT if not specified. -r N makes OLDREV default
     to N, -r N:M makes OLDREV default to N and NEWREV default to M.
     If OLDREV or NEWREV are not specified, they default to WORKING for
     working copy targets and to HEAD for URL targets.

     Either or both OLD-TGT and NEW-TGT may also be paths to unversioned
     targets. Revisions cannot be specified for unversioned targets.
     Both targets must be of the same node kind (file or directory).
     Diffing unversioned targets against URL targets is not supported.

  4. Shorthand for 'svn diff --old=OLD-URL[@OLDREV] --new=NEW-URL[@NEWREV]'
  5. Shorthand for 'svn diff --old=OLD-URL[@OLDREV] --new=NEW-PATH[@NEWREV]'
  6. Shorthand for 'svn diff --old=OLD-PATH[@OLDREV] --new=NEW-URL[@NEWREV]'
]]]

So this will only show you local modifications (with respect to the
checked-out versions) of your two working copy paths.

To do what you want here, you should have used the --old=X --new=Y syntax.

(yes, this usage is confusing and sometimes counter-intuitive -- see
also various discussions on the users list ...)

-- 
Johan
Received on 2013-10-13 21:53:06 CEST

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