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

Re: shelve is (surprisingly) sensitive to working directory

From: James McCoy <jamessan_at_jamessan.com>
Date: Wed, 3 Jan 2018 23:28:31 -0500

On Tue, Jan 02, 2018 at 12:06:47PM +0000, Julian Foad wrote:
> James McCoy wrote:
> Fixed in http://svn.apache.org/r1819804
>
> Please could you check it.

Much better, thanks.

> The working directory still needs to be within the WC for all the shelving
> commands.

That seems like a reasonable restriction for an initial, experimental
release especially if it's documented. The intention is to get feedback
to help shape the remaining functionality.

> When you specify a path ("svn shelve foo path-to-wc/...") this is
> counter-intuitive, and probably should be changed: it should check all given
> paths (default: ".") are in the same WC and use that WC.

Yes, this would be better.

> The other commands, "svn unshelve foo", "svn shelve --delete foo" and "svn
> shelves" don't currently accept paths but maybe they could.

I don't really see the use for that. I referenced git's stash
implementation, since I somewhat regularly use that, and was surprised
to learn that it supports specifying paths when creating and listing
stashes.

> When listing shelves, maybe we should list only those that affect paths
> entirely within the given path(s), or only those that affect at least some
> paths within the given path(s). E.g. (just thinking out loud):

I would wait for more feedback before going down that route.

> It would be good to hear any thoughts you have about how to improve it.

The only other improvement that comes to mind is for "svn shelves" to
show the (WC or curdir) relative file path. Currently, it just shows the file
name with the common parent directories elided.

[[[
jamessan_at_freya:~/src/apache.org/subversion/trunk$ ./subversion/svn/svn shelves
single 2 mins old 636 bytes 1 paths changed

 shelve.c | 1 +
 1 file changed, 1 insertion(+)

multi 0 mins old 1107 bytes 2 paths changed

 libsvn_client/shelve.c | 1 +
 svn/shelve-cmd.c | 1 +
 2 files changed, 2 insertions(+)
]]]

The "single" shelf should be showing subversion/libsvn_client/shelve.c
as the path, while "multi" should be showing that and
subversion/svn/shelve-cmd.c.

Cheers,

-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB
Received on 2018-01-04 05:28:39 CET

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.