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

Re: [PATCH] Make vanilla switch capable of changing the repository root

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 27 Aug 2008 19:46:35 -0400

Karl Fogel wrote:
> "C. Michael Pilato" <cmpilato_at_collab.net> writes:
>> I was expect, actually, that it doesn't. I'm guessing that 'svn switch
>> -rBASE' will turn BASE into a revision number based on the evaluation of the
>> revision at which the TARGET sits, and then do a whole-revision update to
>> that revision (whatever it may be). That's not quite the same operation as
>> an update-less URL tweak. And maybe the answer to that is, "Just use
>> --relocate."
> If we apply Vlad's patch, then we want to formally obsolete the
> '--relocate' option, I think. We certainly don't want to keep it but
> have it mean "Just like switch, but don't update anything."
> No one -- not even us -- would ever be able to keep that straight. It
> would be a meaning entirely unrelated to the name of the option. We
> have enough troubles with people misunderstanding what the '--relocate'
> option is for already; let's not make the problem even worse.

I agree, but deprecating functionality (at least, this functionality) as
well is a non-starter. We need a way to prevent the switch (which was
originally defined to be a sort of update) from doing an update. A new
option (such as --no-update) would be the obvious solution there.

[Tending towards a new topic in the following]

I *was* thinking that this new option could also serve another purposes --
restoring locally-deleted-but-not-svn-deleted files (which 'svn update' and
'svn switch' do today as a first step before performing the actual update.
'svn update --no-update' isn't the most intuitive UI, of course. But maybe
if the option had a name like --maintain-revs or somesuch, it could serve
that dual purpose:

   'svn switch --maintain-revs' does the URL switch, restoring "missing"
   files, but not updating anything.

   'svn update --maintain-revs' restores missing files, but doesn't really

On the other hand, that 'svn update' restores missing files at all is sorta
weird. Perhaps we should have just had update/switch fail due to a weird WC
state, and let 'svn revert' restore the missing items (possibly leaving
directories marked as "incomplete", since they aren't lying about on disk
for easy restoration).

Or another line of thought: 'svn update' is supposed to preserve
uncommitted local mods, right? Well, missing files/dirs are local mods,
too. Maybe 'svn update' should all along have simply ignored missing stuff
(knowing that 'svn status' would still report them as such). We have the
plumbing to handle such cases already.

[Okay. Now I'm confident I'm off-topic.]

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2008-08-28 01:46:50 CEST

This is an archived mail posted to the Subversion Dev mailing list.

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