On Wed, Oct 12, 2016 at 04:49:55PM +0200, Bert Huijben wrote: > > > > -----Original Message----- > > From: Stefan Sperling [mailto:s...@elego.de] > > Sent: woensdag 12 oktober 2016 16:37 > > To: Patrick Steinhardt <patrick.steinha...@elegosoft.com> > > Cc: Subversion <email@example.com> > > Subject: Re: [PATCH] Reject checkouts to existing directory > > > > On Wed, Oct 12, 2016 at 04:28:05PM +0200, Patrick Steinhardt wrote: > > > Hi, > > > > > > attached is a patch to reject checkouts to already existing > > > directories when `--force` is not given. This is according to > > > `svn co --help`. > > > > > > [[ > > > Reject checkout to existing paths without force > > > > > > * subversion/svn/checkout-cmd.c: > > > - (svn_cl__checkout): Reject checkout to existing directory > > > without --force > > > ]] > > > > Nice catch. > > It's odd that the actual behaviour and help string don't line up. > > I'm not sure if the behavior you see is actually a bug. The --force flag is > already used for processing in the update editor and there are cases where I > would like to turn an existing directory in a checkout, while not invoking > that behavior. (I prefer conflicts, over just assuming that every file is > just a modified version of the files already in the directory; the current > behavior triggered by --force) > > I can see that you might want to have a warning when there is already a > directory, but I don't think it is the right way to use the --force option > for this.
Yeah, I'd definitly want a prompt or be required to set a flag when checking out to an existing repository as I've already cloned into existing directories multiple times by accident. > And then there is the feature that svn checkout is restartable when it fails > after some part of the checkout (just like update)... with this patch > applied that would also stop being supported. > > Bert > I guess a new flag would be the most obvious thing to do here. No idea though what this flag should be called. `--allow-clone-to-existing-dir` is really long, `--force-existing` may be mistaken for requiring an existing directory. Any ideas? Regards -- Patrick Steinhardt, Entwickler elego Software Solutions GmbH, http://www.elego.de Gebäude 12 (BIG), Gustav-Meyer-Allee 25, 13355 Berlin, Germany Sitz der Gesellschaft: Berlin, USt-IdNr.: DE 163214194 Handelsregister: Amtsgericht Charlottenburg HRB 77719 Geschäftsführer: Olaf Wagner
Description: PGP signature