I'm starting to re-implement "unshelve" using the new WC editor API. Here's 
what "unshelve" looks like now:

for each node-change found by shelf_status_walk(shelf-storage):
  if it's "delete": call svn_wc_delete4(path,...)
  if it's "modify": wc_file_merge(path,...)
  etc.

What I'll want to do now is drive a WC-mods-editor with the changes found:

for each node-change found in shelf-storage:
  drive wc_editor so as to "walk" from last visited path to this path
  switch (mod-kind):
    case "delete": call wc_editor->delete(...)
    case "modify": call wc_editor->apply_textdelta(...)
    etc.

I could write that code manually but it's a re-usable pattern. We already have 
a walker that takes a static list of paths to visit:
  svn_delta_path_driver2(editor, ... paths, ... callback)

We should have a similar walker that takes the paths to visit one at a time, 
performing one "step" for each one. That would make writing this code easier.

I'll augment svn_delta_path_driver2() to support one-step-at-a-time walking.

-- 
- Julian

Reply via email to