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-18 16:22:13


On Sun, Mar 18, 2012 at 9:14 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
> AMDG
>
> On 03/18/2012 04:52 AM, Beman Dawes wrote:
>> The boost/filesystem directory currently looks like this:
>>
>> v2
>>     config.hpp  // actual header
>>     convenience.hpp
>>     exception.hpp
>>     fstream.hpp
>>     operations.hpp
>>     path.hpp
>> v3
>>     config.hpp  // actual header
>>     convenience.hpp
>>     exception.hpp
>>     fstream.hpp
>>     operations.hpp
>>     path.hpp
>> config.hpp  // forwards to v2/config.hpp or v3/config.hpp
>> convenience.hpp
>> exception.hpp
>> fstream.hpp
>> operations.hpp
>> path.hpp
>>
>> It is time to remove the dual version support.
>>
>> What I'd like to do is:
>>
>> * create a branch,
>> * switch to it,
>> * delete the top level forwarding headers,
>> * move the v3 headers up to boost/filesystem,
>> * delete the v2 and v3 directories,
>> * modify the headers as needed,
>> * merge back to trunk.
>>
>> At the completion of the merge, the history for the boost/filesystem
>> headers should include the full history of what were the
>> boost/filesystem/v3 headers.
>>
>> What are the svn commands to accomplish that?
>>
>
> 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"

OK, thanks! I'll give it a try.

> FWIW, if you're doing this in one go, there's
> no good reason to create a branch.

The actual steps are somewhat more complex because there are a
parallel set of changes to libs/filesystem. I'll do some testing along
the way. Using Git on other projects, I've gotten used to creating
branches more often and doing commits along the way. Makes partial
rollbacks much easier and leaves the trunk ("master" on Git) in a
clean state until I'm 100% certain the changeover is ready for prime
time.

--Beman


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