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

Shelving v3 started

From: Julian Foad <julianfoad_at_apache.org>
Date: Tue, 12 Feb 2019 10:34:18 +0000

On the 'shelving-v3' branch:

* shelving uses a separate 'real' WC to store each shelf

* copying local modifications between the (main) WC and a shelf is, at last, done the Right Way using an Editor API:
    - "open(user's WC).replay_local_mods()" piped to "open(shelf-storage-wc).local_mods_editor()".

Benefits:

* every kind of committable change will be supported

* no shelf-specific code for storing and manipulating changes, just high level glue code

Problems:

* bug in reverting shelved changes from the main WC after shelving them:
    - added nodes don't get deleted from disk, even with 'svn revert --remove-added'
    - https://issues.apache.org/jira/browse/SVN-4798
    - causing XFAIL in shelf_tests 18 "shelve mkdir" and 20 "shelve replace dir"

* unshelve doesn't attempt to merge
    - assumes it's writing to a WC that matches the shelf base state
    - causing XFAIL in shelf_tests for merge and conflict tests (25, 26, 27, 28, 30)

* copying the WC base state is crude, space-inefficient
    - currently using a simple recursive copy of the entire WC dir including '.svn' metadata
    - currently puts shelves outside the main WC, in a sibling dir named, "<wc-dir>.shelves";
      that's just to avoid infinite recursion when doing the recursive dir copy, and could be
      changed to "<wc-dir>/.svn/experimental/shelves/v3" with a little tweak.

The only reason this is committed to a branch rather than trunk is that it is writing to a directory outside the WC. It would be worth tweaking that back inside ".svn" as soon as possible, in order to move the development back onto trunk.

Julian Foad wrote on 2019-02-01:
[...]
> Baby steps, in order:
> (1) Shelve committable changes, with very simple capture of WC base
> state (maybe assumes single-revision, for example): a good enough first
> step.

Yay, working!

> (2) Better capture of base state.
> (3) Better replay of "copy" operations, reading WC local storage to
> fetch their base rather than contacting the repo.
> (4) Support some uncommittable changes such as "local move".
[...]

-- 
- Julian
Received on 2019-02-12 11:34:26 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.