> -----Original Message-----
> From: Laird Nelson [mailto:ljnelson_at_gmail.com]
> Sent: 01 December 2010 13:01
> To: Cooke, Mark; users_at_subversion.apache.org
> Subject: Re: svn diff: output stops after first couple hunks?
>
> > On Wed, Dec 1, 2010 at 3:32 AM, Cooke, Mark
> > <mark.cooke_at_siemens.com> wrote:
> >
> >
> > ...it sounds like you are expecting `diff` to check against the
latest
> > version in the repository. This is not what happens, at least using
> > the command as you provided above.
> >
>
> You know, I have read words to that effect before, but
> haven't ever really properly thought about the ramifications.
>
>
> > Most operations within a working copy use the latest known pristene
> > copy as the reference (i.e. the copy stored from the _last_ update
of
> > _this_ wc in your .svn subdirectories).
> >
> > Does that explain the differences you are seeing?
> >
>
> I believe it does. So, to be very clear, she is computing
> differences between her working copy, and the version that
> was the result of the last svn update, whenever that happened
> to have occurred?
>
Exactly. Subversion minimises the network traffic by storing the latest
known 'master' locally. When you do a commit, only the diffs are sent
across the network, hence one reason why a commit will fail if your WC
is not updated...
> I suppose then if I really wanted to do the diff properly
> (read: against the copy in the repo) I would do:
>
> svn diff pom.xml http://path.to/my/svnrepo/myproject/trunk/pom.xml
>
> ...that is, diff the working pom.xml against the copy stored
> in the repository? (I don't have the command or the manual
> up right now, so I may have left off an argument or two, but
> hopefully you get the idea.)
>
While you can do that, most people would simply update the working copy
and then do the diff locally. You will not be able to commit until you
have updated anyway.
An update will bring in any changes that others have made but these
generally merge silently with your changes and any conflicts will be
flagged for resolution. This is one reason for updating regularly,
these merges seem to work best when taken in smaller increments!
By the way, do you know the online subversion book
(http://svnbook.red-bean.com/)? It is very good and the first two
chapters should be compulsory reading for all users. The `svn diff`
reference is here:
http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.diff.html
~ mark c
Received on 2010-12-01 14:26:01 CET