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

RE: merge two local working copies

From: Jason Winnebeck <jpwasp_at_rit.edu>
Date: 2007-07-13 15:48:25 CEST

What you could do is create a "private" branch where you check in
changes often and at will, then when you are ready you merge your
private branch back into the trunk, and then delete your private branch.
Branching in SVN has been made easy, and I believe one of the
motivations for this is to handle your specific case.

See http://svnbook.red-bean.com/nightly/en/svn.branchmerge.using.html

The problem with the book is that it assumes that you know what you need
before you need it. What I don't know is the ideal commands if
modifications are already made, as I'm still pretty new to SVN. I don't
know if you have to (or should) make a copy of trunk, then switch to it,
then commit, or if you can copy+modify at the same time (but I think if
you do that you'll have a hard time merging back to trunk?)

Does anyone know the ideal/easiest sequence of commands to take
modifications you've already started, then merge back? Is this the best
way?

svn cp http://example.com/svn/Project/trunk
http://example.com/svn/Project/branches/my-uber-branch
(remember revision number "X" here)
svn switch http://example.com/svn/Project/branches/my-uber-branch
svn commit (initial modifications)
... do more mods
svn switch http://example.com/svn/Project/trunk
svn merge from branch@X to branch@HEAD to WC
svn commit -m "Merged from my private uber branch"
svn rm http://example.com/svn/Project/branches/my-uber-branch

Jason

-----Original Message-----
From: Freek Dijkstra [mailto:public@macfreek.nl]

Hi,

I find myself doing to following a lot:
1. Check out a repository, make changes at work
2. Manually see what I changed, and copy those to my home computer
3. Go home
4. Continue editing at home
5. Do a commit

So I do not commit at step 2, and update at home. That would of course
be a lot easier for me! The reason I do so clumsy is because my
yet-unfinished change would break stuff of a few colleagues.

Is there a smarter way to do this, than to manually do a diff -r --brief
and copy the changed files between my two local computers? I looked at
svn merge, but that only seems to be able to merge changes between two
revision to a local working copy. What I want is to merge the difference
between HEAD and whatever I had at the working copy at work to the
working copy at home.

Regards,
Freek

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 13 15:47:56 2007

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.