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

[RFC] Make "svn switch" say "Switched" instead of "Updated" or "At"

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Mon, 05 Sep 2011 10:38:02 +0100

The final message from "svn switch" is exactly the same as for "svn
update" -- either:

  $ svn sw file://.../repo/X wc
  A wc/foo
  Updated to revision 4.

or:

  $ svn sw file://.../repo/X wc
  At revision 4.

depending on whether there was a change of content. To the user who
requested a switch, I think both of those are a bit cryptic. We can
make the message much more reassuring:

  * If the new URL is different from the old one, as is usually
expected, then say "Switched" instead of "Updated" or "At".

  * When we say "Switched", say the target URL as well as the revision.

  * If the new URL is the same as the old one then the operation
degenerates to an update, so say "Updated" or "At" depending on whether
there was a change of content, just as we do at present. And maybe warn
the user that the WC is already at that URL, because that's usually
unexpected in interactive use.

So:

  $ svn sw ... # URL change, content change
  [...]
  Switched to file://.../repo/X, revision 4.

  $ svn sw ... # URL change, no content change
  Switched to file://.../repo/X, revision 4.

  $ svn sw ... # No URL change, content change
  [...]
  Updated to revision 4.

  $ svn sw ... # No URL change, no content change
  At revision 4.

Or, if we like the option of being more vocal when there's no URL
change, I think the best way to present that would be an additional
message just before the current "Updated" or "At" message:

  $ svn sw ... # No URL change, content change
  [...]
  Already at URL file://.../repo/X.
  Updated to revision 4.

  $ svn sw ... # No URL change, no content change
  Already at URL file://.../repo/X.
  At revision 4.

I'm not currently coding this, it's just something I noticed today that
we could improve. Agree?

- Julian
Received on 2011-09-05 11:39:07 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.