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

Re: Merge question

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Wed, 16 Jan 2008 17:45:28 +0100

On Wednesday 16 January 2008, Giulio Troccoli wrote:
> I thought I had grasped the difference between the two commands , but
> then Ulrich's email made me think.
>
> > The difference is the starting point. Using peg revisions (case 1)
> > you are only saying that you are taking the thing referenced via the
> > path and revision as starting point, but taking its current (HEAD)
> > state still:
> >
> > svn merge -rHEAD:HEAD http://server/trunk@123 \
> > http://server/trunk@132 .
>
> This is not clear at all.
> Recently I had to merge some code from a branch, back into trunk, that
> had been deleted years ago. I had, of course, have to use the peg
> revisions use case. In my case then that branch did not exist in HEAD,
> so it's "current state" is deleted. That is what I don't understand of
> your explanation.

Okay, at one of us is misunderstanding how this works, maybe both. ;)

Let's try with an example:
r1: create fileA and fileB
r2: copy fileA to fileX
r3: modify fileX
r4: delete fileX
r5: copy fileB to fileX
r6: modify fileX
r7: delete fileX

  $ svn diff -r 2:3 URL/fileX
  svn: File not found: revision 7, path '/fileX'

That was expected, the file doesn't exist in HEAD.

  $ svn diff URL/fileX_at_2 URL/fileX_at_3
  ...

This displays the differences between the same file at the two revisions, so
indeed my explanation was wrong, svn also uses the peg revisions as defaults
for the revisions it is comparing, not only for identifying the files to
compare.

  $ svn diff URL/fileX_at_3 URL/fileX_at_6
  ...

This displays the differences between two unrelated files, both at the same
location but referenced via different revisions.

Sorry, my explanation and partially understanding was wrong, SVN takes the peg
revision for both locating and as current version.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-16 17:52:07 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.