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

Re: Why is merging in Subversion (not) harder than in CVS?

From: <kfogel_at_collab.net>
Date: 2004-03-22 16:01:42 CET

Erik, I'd be +1 if you wanted to turn this into a FAQ item. It *is*,
in actual fact, a Frequently Asked Question :-). And your list of
examples is a good answer.

-K

"Erik Huelsmann" <e.huelsmann@gmx.net> writes:
> The last weeks there have been a number of issues about merging being harder
> in Subversion than in CVS. Most of them seem to have to do with the ability
> to be able to tag or name revisions (in CVS) and calculate differences
> between tags.
>
> So I went and did some experiments. The results are shown below. As you can
> see, I succeeded in merging from a branch without remembering one revision
> number. I suppose the other way around should be possible too.
>
> $ svnadmin create ./repos
> $ svn co file://`pwd`/repos wc
>
> # do initial setup
> $ cd wc
> $ mkdir trunk tags branches tags/{branch_traces,releases}
> $ cd trunk
> $ echo -e "some \n file \n content" > foo.txt
> $ cd ../../
> $ svn add wc/*
> $ svn ci wc -m "Initial setup"
>
> # the initial content is there now
>
> # setup the branches and tags to trace
> # branch development
>
> # tags are setup for braching back to trunk
> # the other way around is possible too
> # ofcourse
>
> $ svn cp file://`pwd`/repos/{trunk,branches/bar_branch} -m "start or bar
> branch"
> $ svn cp
> file://`pwd`/repos/{branches/bar_branch,tags/branch_traces/bar_last_merge} -m "start"
>
> # branch and tags setup; now setup working copy on branch
> $ rm -rf wc
> $ svn co file://`pwd`/repos/branches/bar_branch wc
> $ cd wc
>
> # edit foo.txt file and checkin
> $ echo yo >>foo.txt
> $ svn ci -m ""
>
> # switch to trunk and merge
> 1039 cd ..
> 1040 svn switch file://`pwd`/repos/trunk wc
> 1041 cd wc
> # svn switch file://`pwd`/../repos/trunk won't work so hop up one level
> # and get back after switching.
>
> # do the merge from the branch
> $ cd ..
> $ svn merge
> file:///`pwd`/repos/{tags/branch_traces/bar_last_merge,branches/bar_branch} wc
> $ cd wc
> # and check the file content
> $ cat foo.txt
>
>
> Hope this helps someone!
>
> bye,
>
> Erik.
>
> --
> +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
> 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
>
>
> ---------------------------------------------------------------------
> 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 Mon Mar 22 17:11:53 2004

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.