This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Page tree
Skip to end of metadata
Go to start of metadata


A summary of the experimental Shelving feature added in Subversion 1.10.


(For a summary of the latest development of shelving and checkpointing, see Shelving in Svn-trunk. For an index of all pages in this topic, see Shelving and Checkpointing.)

Summary

This initial version of shelving is based on patch files.

Shelving is roughly equivalent to using "svn diff" to write local changes to a patch file, followed by reverting the shelved changes. Unshelving is roughly equivalent to using "svn patch" to apply a patch file.

The kinds of change that can be shelved and unshelved are the same kinds that "svn diff" and "svn patch" support – basically that is changes to text files and properties. Details are below.

Functionality

Command-Line UI

see Shelving v1 CLI

  • shelve name [paths/changelist]: save a WC diff

    • reverts the successfully shelved changes from the WC

  • unshelve [name]: apply specified (or newest) shelved patch to WC

    • removes the patch (or rather renames to '*.bak' so not shown in list)

    • can apply to any revision or branch

  • list shelved patches

  • delete a shelved patch

Kinds of change that can be shelved


WC State or Change

Shelving v1

committable changes

file text, file delete/add, most properties

yes

mergeinfo changes

yes

copies and moves

no

directories (mkdir/rmdir/...)

no

binary files & properties

no

uncommittable state

unresolved conflicts

no

changelist assignment

no

unversioned items (git stash -u/-a)

no

inconsistent WC states (missing/obstructed)

no

base state

WC base state (rev, URL, switched, depth)

no

Conflicts and Error Handling

When 'shelve' encounters any unshelvable state ... [TODO]

When 'unshelve' encounters any conflict, it is handled just like 'svn patch'. That means, in most cases, printing a warning message and creating a '*.svnpatch.rej' file.

Implementation

  • library functions implemented in libsvn_client
  • not exposed through bindings (SWIG, JavaHL, etc.)

Client-level support (user interfaces):

  • 'svn' command-line UI
  • TortoiseSVN (for Windows)
  • Cornerstone (for Mac)

Shelves are stored as standard svn patch files in WC metadata dir '.svn/shelves/'.

  • No labels