You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ri...@Consultants-Inc.com on 2005/11/11 00:08:19 UTC

Merging changes

List,

This is my first posting, so please be kind...

I'm a new Subversion user, trying to get my changes merged into the repository.  
Here's what I did.

Loaded the repository with the original software.
A co-worker checked out all the software, I didn't.
I made changes to my original software, but didn't do a checkout from SVN.
The co-worker checked in his changes.

Now I want to get my changes 'merged' into his.

I checked out the software.
I moved my 'modified files' into the working directory, replacing original files.
I did an SVN Update.  Nothing happened!

So my question is: how can I get SVN to merge my changes into the version from the 
repository?

I hoped that be replacing the files in the working directory with my versions, SVN 
would then merge my changes into the repository version.  Can I fix this without doing 
a manual 'diff'?

Thanks List,

Ric

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

Re: Merging changes

Posted by Steve Williams <st...@kromestudios.com>.
Ric@Consultants-Inc.com wrote:
> List,
> 
> This is my first posting, so please be kind...
> 
> I'm a new Subversion user, trying to get my changes merged into the repository.  
> Here's what I did.
> 
> Loaded the repository with the original software.
> A co-worker checked out all the software, I didn't.
> I made changes to my original software, but didn't do a checkout from SVN.
> The co-worker checked in his changes.
> 
> Now I want to get my changes 'merged' into his.
> 
> I checked out the software.
> I moved my 'modified files' into the working directory, replacing original files.
> I did an SVN Update.  Nothing happened!
> 
> So my question is: how can I get SVN to merge my changes into the version from the 
> repository?
> 
> I hoped that be replacing the files in the working directory with my versions, SVN 
> would then merge my changes into the repository version.  Can I fix this without doing 
> a manual 'diff'?

Perhaps this might work.

If the co-worker's commit was revision 2, then checkout revision 1.

 >svn co -r1 url workingcopy

Copy your locally changed file over the file in the working copy.  Now 
update to the latest.

 >svn up workingcopy

Then test and commit.

 >svn ci workingcopy

I haven't tested this, but it may work.

-- 
Sly


This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

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

RE: Merging changes

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Ric@Consultants-Inc.com <ma...@Consultants-Inc.com>:
> Loaded the repository with the original software.
> A co-worker checked out all the software, I didn't.
> I made changes to my original software, but didn't do a
> checkout from SVN. The co-worker checked in his changes.
> 
> Now I want to get my changes 'merged' into his.
> 
> I checked out the software.
> I moved my 'modified files' into the working directory,
> replacing original files. I did an SVN Update.  Nothing happened!
> 
> So my question is: how can I get SVN to merge my changes into the
> version from the repository?
> 
> I hoped that be replacing the files in the working directory with my
> versions, SVN would then merge my changes into the repository
> version.  Can I fix this without doing a manual 'diff'?

An 'update' will update your local copy with the changes in the
*repository*.  Since you had just done a fresh checkout and nobody else
had changed anything since then, naturally the update didn't do
anything.

To update the repository with your changes, you 'commit' them.

Since you've done things in the wrong order (by copying your changes in
from 'outside' subversion), it might be a bit trickier than that,
though.  If you're *absolutely* certain that the other developers
haven't changed anything in any of the files you changed, then just
doing a commit will be fine.

But if the other developer has changed the same file you have, then
you'll have to manually merge the changes.  (Normally subversion will
detect this condition and warn you about it.  But because of the order
you did things in this time, it won't be able to detect the condition.
So be careful.)


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