Since http://svn.apache.org/r1831908 the "svn status" command can operate 
directly on a shelf.

$ svn shelves -q
foo
$ svn st --cl svn:shelf:foo 
--- Changelist 'svn:shelf:foo':
A       D1
A       new-file
MM      config.txt
D       hello.txt
A       D1/D2

The main WC state for those paths may be unmodified, or modified in a 
completely different way:

$ svn st
A  +    D1
M       config.txt

This, to me, is the beginning of the more exciting side of shelving, when it is 
no longer doing just what a simple add-on script could do, but is becoming more 
deeply integrated into the work flows and commands that users are already 
familiar with.

Limitations of this initial experiment include: it only accesses the latest 
version of a shelf, and it doesn't support extended status such as that shown 
by --verbose and --show-updates.

An obvious CLI enhancement would be translate a new "--shelf=SHELF" to 
"--cl=svn:shelf:SHELF" and translate "--- Changelist 'svn:shelf:SHELF'" to "--- 
Shelf 'SHELF'".

More interesting to me is to evaluate how well this new meaning fits the 
'changelist' dimension of the existing UI. It's not the name 'changelist' that 
matters at this point, it's how it relates to other dimensions like 'revision' 
-- is it orthogonal, for example.

An alternative is to extend the 'revision specifier' dimension instead, as I 
mentioned before, like this (made-up example, not implemented):

$ svn diff --summarize -r foo
--- Shelf 'foo':
A       D1
A       new-file
MM      config.txt
D       hello.txt
A       D1/D2

At first sight, the 'revision' dimension looks more appropriate: "don't look at 
a committed change, look at a shelved change attached to the local WC instead".

The 'changelist' interface usage in existing Subversion means "select a subset 
of possible files" and that doesn't sound right at first. But note I have in 
mind to make the changelist concept more like a shelf (in particular, having a 
log message, and supporting directories), and shelving/unshelving will be 
moving the complete changelist  (its name, its changes, its log msg etc) 
to/from the 'shelf' area. So that might still fit; I'm keeping that option open 
to explore it a bit more.

This particular interface, like all of shelving so far, is new and 
experimental. Constructive feedback is greatly appreciated.

- Julian

Reply via email to