Boost logo

Boost :

Subject: Re: [boost] [filesystem] [svn] How to remove V2 files without loss of V3 history?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-03-23 05:44:33


On Tue, Mar 20, 2012 at 6:49 PM, Frank Birbacher <bloodymir.crap_at_[hidden]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi!
>
> I've read the discussion and want to provide some words of caution.
>
> Am 18.03.12 14:14, schrieb Steven Watanabe:
>> cd boost/filesystem svn cp ^/trunk/boost/filesystem
>> ^/branches/filesystem_v3/boost/filesystem svn switch
>> ^/trunk/boost/filesystem svn rm *.hpp svn mv v3/*.hpp . svn rm v2
>> v3 # modify headers svn commit -m "Remove Filesystem V2" svn switch
>> ^/trunk/boost/filesystem svn merge --reintegrate
>> ^/branches/filesystem_v3/boost/filesystem svn commit -m "Merge back
>> to trunk"
>
> The --reintegrate option requires a merge of trunk to the branch
> beforehand if there have been commits to trunk since creation of the
> branch. Simply not using this option will merge the changes into the
> trunk correctly here.

Thanks for the heads up on this. There haven't been any changes
filesystem in trunk since the branch was created, so no problem there.

> Using a separate branch to do the work will encourage a single merge
> into the trunk at the end.

Yes, and that's part of the objective, along with retaining history.

> The commit "Merge back to trunk" will
> delete files and create moved files in their place. This triggers the
>  git move problem Daniel mentioned.

IIUC, you are saying that in svn, deleting a file and then moving
another in its place in a single commit will lose the history of the
new file. Also that git would have the same problem.

I can confirm that did indeed happen in svn. The history was OK on the
branch, but was badly whacked after merging back to the trunk working
copy.

> You can merge two times, though,
> by first merging just up to that revision that deleted the files and
> then merging the rest.

Nuts. I didn't happen to do branch commits at exactly the right point
in the process.

I'll repeat the process per your suggestion, and report back.

> Creating the branch from /trunk enables working on /boost/filesystem
> and /libs/filesystem at the same time at no additional costs with svn.

And allowed testing along the way. That was important as a number of
issues came up that had to be dealt with.

Thanks,

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk