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

Re: "Repair Move" for splitting one file into multiple files

From: Simon Large <simon.tortoisesvn_at_gmail.com>
Date: Thu, 29 Sep 2011 08:56:20 +0100

On 28 September 2011 11:48, Andy Levy <andy.levy_at_gmail.com> wrote:
> On Tue, Sep 27, 2011 at 17:05, Karl Hendrikse <karlhendrikse_at_gmail.com> wrote:
>> Frequently I perform refactoring tasks that involve splitting one source file into many smaller source files. I just do this in Visual Studio, then correct the ancestry later with TortoiseSVN before committing. My process is this:
>>
>>  1. (Not using SVN commands) Split Foo.h to Bar0.h, Bar1.h, Bar2.h and Bar3.h.
>>  2. Open the TortoiseSVN commit dialog. Foo.h is now "missing", BarX.h are all "non-versioned".
>>  3. Select Foo.h and Bar1.h, right click and choose "Repair Move". Foo.h is now "deleted", Bar1.h is now "added (+)".
>>  4. Right click Foo.h, choose "Revert". Foo.h disappears from the list.
>>  5. Browse to Foo.h using Windows Explorer, and delete the file (not SVN delete).
>>  6. Hit F5 to refresh the commit dialog. Foo.h is "missing" again.
>>  7. Repeat steps 3-6 for Bar2.h, Bar3.h and Bar4.h.
>>
>> There has got to be a better way to achieve this. Instead of the "Repair Move" command requiring one "missing" file and one "unversioned" file, it should work with one "missing" file and any number (>= 1) "unversioned" files. This would make splitting a file into smaller files very easy. The steps would be this:
>>
>>  1. (Not using SVN commands) Split Foo.h to Bar0.h, Bar1.h, Bar2.h and Bar3.h.
>>  2. Open the TortoiseSVN commit dialog. Foo.h is now "missing", BarX.h are all "non-versioned".
>>  3. Select Foo.h and all the BarX.h, right click and choose "Repair Move". Foo.h is now "deleted", all the BarX.h are now "added (+)".
>
> Install AnkSVN, the SVN plugin for Visual Studio. All your moves,
> deletes, etc. should be handled then. You're making it harder on
> yourself by using a tool which doesn't tell the WC about your file
> changes.

If I'm refactoring I generally do a right-click "SVN copy and rename"
of the original file in explorer (and possibly a TSVN->rename of the
original too) and then delete the parts I don't want from each one. I
suppose it would be marginally more convenient just to Save-As in my
editor and do the repair afterwards, but there's not a lot in it. I'm
not using VS so AnkhSVN isn't appropriate for me.

I can see the use case, and on the face of it it seems like something
that could be implemented as a simple extension of the current repair
move, but I'm not sure how much real use it would get. It could be
just another opportunity for a bug to creep in. Also, as 1.7 is now so
close it is unlikely that you would see this until the 1.8 release.

Simon

-- 
:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2847588
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-09-29 09:56:25 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.