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

Re: svn switch to an incorrect branch deletes modified local files

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 25 Apr 2008 11:24:12 +0100

Stefan Sperling wrote:
>> This would seem to me to be a good candidate for a --dry-run type of behaviour,
>> or a verification step before actually attempting to execute the switch.
>>
>> An error message of "can't switch - [files/directories list here] would be lost
>> or damaged" would be very useful.
>
> You can (and probably should) run switch with --dry-run first.

Er, no you can't.

Subcommand 'switch' doesn't accept option '--dry-run'

> With tree-conflict detection in place (i.e. not with 1.5, nor
> trunk, but our experimental tree-conflicts branch), this will
> notify you about conflicts, i.e. you'll see directories flagged
> as 'C'. (*lightbulb* Hmmm.... we might actually want to print a
> summary of all potential conflicts of any kind after any --dry-run
> operation... Cc'ing Julian Foad. Julian, do think this would be
> a good idea?)

So, in the scenario where you "merge" or "switch" or "update" with "--dry-run"
(let's say that were supported), and get thousands of "M"od, "D"el, and "A"dd
notifications, and perhaps a few "C"onflicts as well, you want to see at least
something like:

[[[
$ svn <merge|switch|update|whatever> --dry-run ...
M a.c
M b.c
C c.c
[...]
D foo
M bar
M baz
svn: There were conflicts.
]]]

(and maybe more detail)?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-25 12:24:36 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.