SVN Shelve utility by Oleg Vorkunov on CodeProject

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SVN Shelve utility by Oleg Vorkunov on CodeProject

Julian Foad-5
(A quick review of an existing "Shelve" utility.)

A reader kindly emailed me to point out the existence of an "SVN Shelve"
utility on CodeProject.com,

  https://www.codeproject.com/Articles/29599/SVN-Shelve

in case there is anything I could learn from it. So I took a look.

It was created by Oleg Vorkunov in 2008 and runs on Windows. This is the
essence of its design, according to the description and screen shots. (I
didn't try it or look at the source code; the explanation was enough.)

  * Terminology: Each snapshot is "a shelf".

  * Shelving: You select a versioned folder and provide a description.
"All the modified files will be copied into a folder you dedicated for
shelving, under a GUID-like folder name. [Then] you will be prompted
about reverting all the changes you have done to the source folder."

  * Unshelving: It lists the description and date of each shelf. On
clicking "Restore", "The original folder will be updated to a revision
the shelf was created from, and all the files from the selected shelf
will be copied back to the original folder the way they were before you
shelved it. At the end of the operation, you will be prompted to delete
the shelf."

  * Storage: A specified folder on the local disk. It is suggested that
you might want to version-control this folder, in order to back up
and/or to share your shelved changes.

So, simple but effective. I don't know how well it dealt with changes
other than simple file content changes, but that isn't important now.

Suggestions I might learn from this are:

  * On shelving, reverting the changes is optional; on unshelving,
deleting the shelf is optional. My prototype command-line UI already has
these options, both defaulting to "yes"; it is good to see this also in
another implementation.

  * On unshelving, it first updates the WC to the original base
revision. Therefore it does not have to be concerned with merging or
patching or conflicts. It might be good for us to offer that mode of
operation as an option. It is conceptually similar to git's option to
apply a stash onto a new branch.

  * This simple implementation was useful enough to attract some
positive comments from other users.

- Julian