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

Re: branch efficiency

From: <kmradke_at_rockwellcollins.com>
Date: 2007-11-06 21:35:13 CET

"Hari Kodungallur" <hkodungallur@gmail.com> wrote on 11/06/2007 02:14:55
PM:
> On Nov 6, 2007 11:57 AM, Andrew Sasak <sasakand@msu.edu> wrote:
> I am wondering if the "cheap copies" are used when merging changes
> from a modified file on a branch to an unmodified file on the trunk
> (or vice versa). Since my question might not be clear consider the
> following scenario:
> (I acknowledge that this is an extreme example)
> A branch is created.
> Changes are made to a relatively small number of files (lets say 1
> file) and committed to the branch.
> Time goes by with 100's of files changed/added on the trunk.
> Meanwhile the branch has been untouched.
> The branch creator wants to continue using the branch, but would
> like to merge all the changes from the trunk into the branch.
>
> Does this merge use "cheap copies" to create the new revisions of
> the files on the branch, or does branching prevent the usage of
hardlinks?
>
> I think it depends on the change. For files and directories that are
> added in the trunk, they are cheap copies. But any modification to
> an existing file is a local change to the file after the merge. That
> is they are not cheap copies.

To continue to be a "cheap copy", you could "delete and then recopy"
the changed files from the trunk to the branch. This is a real pain,
and could be made a lot easier if svn supported a "merge, but just use
theirs"
operation. A good script could probably make this operation much easier.

It is unfortunate that the side effect of branches as cheap copies has
made this concept that is trivial in other CM systems to be something more
involved in Subversion.

Most times, people just recommend you restructure your code to allow
the "common" code to be in a shared common directory, which in general
is the "correct" way, but in practice can be quite hard.

Kevin R.
Received on Tue Nov 6 21:35:57 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.