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

Re: Adopting unversioned directory on svn up

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Sun, 4 Dec 2016 18:27:48 +0100

On Sun, Dec 4, 2016 at 11:32 AM, Olaf van der Spek <ml_at_vdspek.org> wrote:
> On Sun, Dec 4, 2016 at 1:04 AM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
>> I think the most annoying consequence of accidentally checking out
>> over an existing directory, without any conflict detection (if the
>> --force behaviour would be the default), would be that you cannot
>> easily undo the operation. You haven't lost any unversioned data, but
>> you can not easily remove the checkout again and "rollback" to the
>> state before the checkout.
>
> Happened yesterday, I checked out into / instead of /etc.. svn behaves
> slightly different then rsync I guess.
>
>> Suppose you have files a and b locally. And the checkout
>> "incorporates" a and b (say they become unmodified because they are
>> the same as the repository version) and adds c, d, e, f, g, ... Oops,
>> the checkout was accidental. Now how do I remove it again? I don't
>> know which files were there before and which were added by the
>> checkout. Now imagine this happening with a complex tree structure
>> with 10,000 directories and 100,000 files.
>
> Does svn have a command to delete all versioned items?
> If not you still have to 'manually' figure out which directories /
> files came from the checkout and which ones existed before.

I guess you can easily use some output of svn status to find all
versioned items (ignoring the '?' lines, i.e. the unversioned items).
But I don't see how that helps for undoing an accidental "forced"
checkout. The files that were there before your forced checkout might
now be versioned items (i.e. they got a 'E' notification). It's
impossible to say now which files were there before, and which were
added by the checkout (OK, the unversioned items were certainly "local
files", but the versioned ones ... who knows? Except if you kept the
notification output of the checkout, so you can select all files with
a 'E' notification as "those files should be kept when I remove the
checkout).

So do you agree that the --force behaviour (just blindly incorporating
local files, without any warning) should *not* be the default?

FWIW, I agree it would be nice for the conflict resolver to be able to
do this. But as Stefan said, it can't at the moment. If it would have
that functionality, I guess your main request would be fulfilled,
right? Whether --force should be the default for checkout looks like a
secondary question to me (and as I said, I don't think that's a good
idea).

-- 
Johan
Received on 2016-12-04 18:28:17 CET

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.