Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Updating the trunk from a branch using svn copy?

tcraig

Member
Normally, before we merge a branch back to the trunk, we update the
latest branch from the latest trunk version and test. Once this is complete,
the migration of the branch version to the trunk is less a merge than a
copy. The SVN book outlines a process where a user uses "svn merge"
to bring the branch version onto the trunk via

svn co $SVNREPO/trunk
svn merge $SVNREPO/base_version $SVNREPO/branch
svn commit

now the trunk has a been updated to changes from the branch. In our
example though, because the branch has been pre-updated with the
head of the trunk anyway, the merge command would look like

svn co $SVNREPO/trunk
svn merge $SVNREPO/trunk $SVNREPO/branch
svn commit

which translates to, checkout the trunk, update the trunk with the
diffs between the trunk and the branch, commit the trunk.

Instead of this process, would a simple

svn copy $SVNREPO/branch $SVNREPO/trunk

perform exactly the same operation?
 

mvr

Member
no...the command you suggest would copy the directory containing the branch to a subdirectory under ~/trunk

the idea of just replacing the trunk with the branch is probably not something we'd want anyway since we'd be replacing the trunk's history with that of the branch...

-mathew
 
Top