• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SCM: Subversion Tags - Easy to create, but how to revert?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCM: Subversion Tags - Easy to create, but how to revert?


  • Subject: Re: SCM: Subversion Tags - Easy to create, but how to revert?
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 30 Oct 2007 17:15:46 -0700

On Oct 30, 2007, at 3:23 PM, Fritz Anderson wrote:

I think, on the command line, I want "svn merge", but I admit I'm finding that part of the Subversion Book a bit opaque.

How would I accomplish this?

That's the sort of thing you need "svn merge" for, and unfortunately we don't have a human interface atop Subversion's merge functionality in Xcode 3.0.


Here's a rundown on how merging works in Subversion.

The central idea of "svn merge" is that regardless of the form in which you give it the arguments, it really takes three arguments in the following order:

(1) Merge Source A (URL)
(2) Merge Source B (URL)
(3) Merge Destination (working copy)

These are used to perform what you can think of as a difference operation in the Subversion merge algebra (Merge Source B minus Merge Source A) and then apply the results of that operation to the Merge Destination working copy.

Example 1: If you are working on a branch, to merge changes 123 through 130 from trunk into that branch you would write:

% svn merge -r 123:130 svn+ssh://svn.example.com/svn/project/trunk

That gives you

  A: svn+ssh://svn.example.com/svn/project/trunk@123
  B: svn+ssh://svn.example.com/svn/project/trunk@130
  Destination: . (implicit)

and thus the changes from 123 to 130 will be applied to the current working directory.

Example 2: If you are working on the trunk and want to revert from version 131 (which, say, you just checked in with a bad bug) to version 130:

% svn merge -r 131:130 svn+ssh://svn.example.com/svn/project/trunk

That gives you

  A: svn+ssh://svn.example.com/svn/project/trunk@131
  B: svn+ssh://svn.example.com/svn/project/trunk@130
  Destination: . (implicit)

and thus -- since Subversion takes B minus A and applies it to the destination, it reverts the change.

You can use essentially arbitrary URLs -- as long as they're in the same repository -- for A and B, and an arbitrary path -- as long as it points to a working copy from that repository -- for the destination.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >SCM: Subversion Tags - Easy to create, but how to revert? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: debugging a command line tool with XCode
  • Next by Date: Re: Using Interface Builder 2.5 under Leopard
  • Previous by thread: SCM: Subversion Tags - Easy to create, but how to revert?
  • Next by thread: Using Interface Builder 2.5 under Leopard
  • Index(es):
    • Date
    • Thread