On Oct 22, 2005, at 23:20, Ryan Schmidt wrote:
> It looks like what you wanted was to take differences between trunk
> and log4 and apply them to the trunk. If that's so, then your merge
> command was fine, except you needed to perform it in the trunk
> working copy, not the log4 branch working copy:
> cd trunk
> svn merge svn+ssh://localhost/home/jlynch/svnrep/trunk \
> You wrote above that you wanted to "merge a file back into the
> trunk." Now, I know that in CVS, it's normal to think in terms of
> files, but in Subversion, you need to think in terms of revisions.
> You'll generally make a change to a file, or to several files, and
> maybe add some files and delete some others, and you'll commit all
> of this together as one revision. Then you can take those same
> changes and apply them somewhere else by doing a merge. You often
> don't want to merge all changes on a branch back to the trunk;
> instead, it's common to want to merge only one particular bugfix.
> To do this, you need to keep track of the revision number in which
> the change was made (or, if you've forgotten, look it up in the log).
I suppose I should point out that the merge command I gave above
follows from this assumption: that log4 is identical to trunk, except
that log4 has some improvements. If, on the other hand, it were the
case that log4 has some improvements, but trunk also has some
different improvements, then the effect of executing my merge above
would be to add log4's improvements to trunk, but also to *remove*
the other improvements that were already on the trunk.
So it's better to work with revision numbers. Say the log4 branch was
created by making a copy of trunk in revision 74. Now we're at
revision 293. trunk has had some further development, and log4 has
had different changes. Now you want to bring log4's changes into trunk.
svn merge -r74:293 svn+ssh://localhost/home/jlynch/svnrep/branches/log4
# this is where you would test the changes
And if you now continue to make other improvements in log4, and you
later want to bring those changes into the trunk as well, then you
need to ensure that you only merge the parts that you haven't merged
before. If it's now revision 325, then:
svn merge -r293:325 svn+ssh://localhost/home/jlynch/svnrep/branches/log4
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Oct 22 23:43:27 2005