You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Craig White <cr...@azapple.com> on 2006/03/21 04:23:28 UTC

newbie question

I have my 'trunk' which is the code in operation.
I have made a 'tag' version of that so they are identical.
I have been working on a branch which was made from the trunk.

I am working on my workstation, where the 'tag' and 'trunk' have been
fully checked out from the repository and are current.

I have been making the changes to the 'branch' locally, some of the
changes have been committed to the repository.

I want to merge my 'branch' back into the 'trunk'.

Do I merge the 'branch' version with the 'tag' version into the
'trunk' ?

I am somewhat confused on this. Also I am planning on doing this on my
workstation and then 'committing' the changes on the trunk back to the
repository...is that how it's all done?

Thanks

Craig


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

Re: newbie question

Posted by Craig White <cr...@azapple.com>.
On Thu, 2006-03-23 at 10:19 -0700, Bob Proulx wrote:
> Craig White wrote:
> > I actually re-phrased my question because I did almost the exact thing
> > (but --dry-run) and started a new thread. It 'appears' to me that it is
> > going to add everything and doesn't look right to me.
> 
> Try a test case.  Create your own private, throwaway repository to use
> as a testing sandbox.  Try some things in your own private area.  Get
> familiar with it without any worry that it won't work.  You can try
> several things and get familiar with the operations.  Then you can
> throw it away and do what you want to do for real.
> 
> It is a little bit of effort to play and to teach yourself how the
> tools work but the effort will pay itself back later in useful
> knowledge and experience with the system.
> 
> Here is an example:
> 
>   mkdir proving-ground
>   svnadmin create $repos
>   repos=file://$(pwd)/proving-ground/one
>   svn mkdir $repos/trunk $repos/branches $repos/tags \
>     -m "Creating project infrastructure"
>   svn checkout $repos/trunk one
>   cd one
>   echo foo > foo
>   svn add foo
>   svn commit -m "* foo: New file."
>   REV_ONE=...  Put the real revision here
>   svn copy \
>     $repos/trunk \
>     $repos/branches/my-devel-area \
>     -m "Creating a working branch to play on."
>   svn switch $repos/branches/my-devel-area
>   ...play... make a change, commit
>   REV_TWO=...  Put the real revision here
>   svn switch $repos/trunk
>   svn merge -r$REV_ONE:$REV_TWO $repos .
>   svn commit
>   ... throw it away and try again with something different...
> 
> Unfortuantely I did no test the above and just typed it in off the top
> of my head.  But that is the point of having a scratch area to work
> through these details.  After you work the exercise and get some
> experience with the commands you will be more confident working with
> the real sources.
----
thanks Bob - I got it now...had to learn about the command 'svn log
--stop-on-copy'

I didn't connect the two...and it was the issue since everything was
already there from revision 1-13 and it was at revision 14 where I
branched and thus I only needed to merge from 14 on.

Craig


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

Re: newbie question

Posted by Bob Proulx <bo...@proulx.com>.
Craig White wrote:
> I actually re-phrased my question because I did almost the exact thing
> (but --dry-run) and started a new thread. It 'appears' to me that it is
> going to add everything and doesn't look right to me.

Try a test case.  Create your own private, throwaway repository to use
as a testing sandbox.  Try some things in your own private area.  Get
familiar with it without any worry that it won't work.  You can try
several things and get familiar with the operations.  Then you can
throw it away and do what you want to do for real.

It is a little bit of effort to play and to teach yourself how the
tools work but the effort will pay itself back later in useful
knowledge and experience with the system.

Here is an example:

  mkdir proving-ground
  svnadmin create $repos
  repos=file://$(pwd)/proving-ground/one
  svn mkdir $repos/trunk $repos/branches $repos/tags \
    -m "Creating project infrastructure"
  svn checkout $repos/trunk one
  cd one
  echo foo > foo
  svn add foo
  svn commit -m "* foo: New file."
  REV_ONE=...  Put the real revision here
  svn copy \
    $repos/trunk \
    $repos/branches/my-devel-area \
    -m "Creating a working branch to play on."
  svn switch $repos/branches/my-devel-area
  ...play... make a change, commit
  REV_TWO=...  Put the real revision here
  svn switch $repos/trunk
  svn merge -r$REV_ONE:$REV_TWO $repos .
  svn commit
  ... throw it away and try again with something different...

Unfortuantely I did no test the above and just typed it in off the top
of my head.  But that is the point of having a scratch area to work
through these details.  After you work the exercise and get some
experience with the commands you will be more confident working with
the real sources.

Bob

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

Re: newbie question

Posted by Craig White <cr...@azapple.com>.
On Tue, 2006-03-21 at 10:40 -0500, Duncan Murdoch wrote:
> On 3/21/2006 9:51 AM, Craig White wrote:
> > On Tue, 2006-03-21 at 02:08 -0700, Bob Proulx wrote:
> >> Craig White wrote:
> >> > I want to merge my 'branch' back into the 'trunk'.
> >> > 
> >> > Do I merge the 'branch' version with the 'tag' version into the
> >> > 'trunk' ?
> >> > 
> >> > I am somewhat confused on this. Also I am planning on doing this on my
> >> > workstation and then 'committing' the changes on the trunk back to the
> >> > repository...is that how it's all done?
> >> 
> >> Yes.  You pretty much have it.  But please read this part of the book
> >> which covers your question in detail.
> >> 
> >>   http://svnbook.red-bean.com/en/1.1/ch04.html
> >> 
> > ----
> > I've been through that book and that is why I'm so confused. All I
> > wanted to do was to merge my branch into the trunk - the tag version was
> > for my safety.
> > 
> > I can't seem to merge into the existing trunk.
> 
> The tag isn't involved in the merge.  What you need to do is this:
> 
> Make sure all your changes to the branch have been committed.
> 
> Identify which changes on the branch you want to merge.  (Typically that 
> would be all of them, but not necessarily.)  You can use svn log 
> --stop-on-copy, and you'll see everything since the branch was created. 
>   Say you started making changes at rev 123, and you want all the 
> changes from there to rev 456. (Rev 123 would be the revision just 
> before your first change, 456 after your last one.)
> 
> Check out the trunk (or switch to it).
> 
> At the root of the trunk working copy, do
> 
> svn merge -r123:456 url:path/to/branch/root
> 
> This will merge all the changes you made to the branch into the trunk. 
> You should now look at all the changes and be sure they work (try 
> compiling, testing, etc.), then commit with a log message saying that 
> you've just merged changes 123:456 from the branch to the trunk.
> 
> That's it!
----
yeah - I think so.

I actually re-phrased my question because I did almost the exact thing
(but --dry-run) and started a new thread. It 'appears' to me that it is
going to add everything and doesn't look right to me.

Thanks

Craig


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

Re: newbie question

Posted by Duncan Murdoch <mu...@stats.uwo.ca>.
On 3/21/2006 9:51 AM, Craig White wrote:
> On Tue, 2006-03-21 at 02:08 -0700, Bob Proulx wrote:
>> Craig White wrote:
>> > I want to merge my 'branch' back into the 'trunk'.
>> > 
>> > Do I merge the 'branch' version with the 'tag' version into the
>> > 'trunk' ?
>> > 
>> > I am somewhat confused on this. Also I am planning on doing this on my
>> > workstation and then 'committing' the changes on the trunk back to the
>> > repository...is that how it's all done?
>> 
>> Yes.  You pretty much have it.  But please read this part of the book
>> which covers your question in detail.
>> 
>>   http://svnbook.red-bean.com/en/1.1/ch04.html
>> 
> ----
> I've been through that book and that is why I'm so confused. All I
> wanted to do was to merge my branch into the trunk - the tag version was
> for my safety.
> 
> I can't seem to merge into the existing trunk.

The tag isn't involved in the merge.  What you need to do is this:

Make sure all your changes to the branch have been committed.

Identify which changes on the branch you want to merge.  (Typically that 
would be all of them, but not necessarily.)  You can use svn log 
--stop-on-copy, and you'll see everything since the branch was created. 
  Say you started making changes at rev 123, and you want all the 
changes from there to rev 456. (Rev 123 would be the revision just 
before your first change, 456 after your last one.)

Check out the trunk (or switch to it).

At the root of the trunk working copy, do

svn merge -r123:456 url:path/to/branch/root

This will merge all the changes you made to the branch into the trunk. 
You should now look at all the changes and be sure they work (try 
compiling, testing, etc.), then commit with a log message saying that 
you've just merged changes 123:456 from the branch to the trunk.

That's it!

Duncan Murdoch

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

Re: newbie question

Posted by Craig White <cr...@azapple.com>.
On Tue, 2006-03-21 at 02:08 -0700, Bob Proulx wrote:
> Craig White wrote:
> > I want to merge my 'branch' back into the 'trunk'.
> > 
> > Do I merge the 'branch' version with the 'tag' version into the
> > 'trunk' ?
> > 
> > I am somewhat confused on this. Also I am planning on doing this on my
> > workstation and then 'committing' the changes on the trunk back to the
> > repository...is that how it's all done?
> 
> Yes.  You pretty much have it.  But please read this part of the book
> which covers your question in detail.
> 
>   http://svnbook.red-bean.com/en/1.1/ch04.html
> 
----
I've been through that book and that is why I'm so confused. All I
wanted to do was to merge my branch into the trunk - the tag version was
for my safety.

I can't seem to merge into the existing trunk.

Craig


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

Re: newbie question

Posted by Bob Proulx <bo...@proulx.com>.
Craig White wrote:
> I want to merge my 'branch' back into the 'trunk'.
> 
> Do I merge the 'branch' version with the 'tag' version into the
> 'trunk' ?
> 
> I am somewhat confused on this. Also I am planning on doing this on my
> workstation and then 'committing' the changes on the trunk back to the
> repository...is that how it's all done?

Yes.  You pretty much have it.  But please read this part of the book
which covers your question in detail.

  http://svnbook.red-bean.com/en/1.1/ch04.html

Bob

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