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

Checkpointing mock-up option 3 (backed by a local repo)

From: Julian Foad <julianfoad_at_apache.org>
Date: Wed, 26 Jul 2017 16:13:19 +0100

I committed an initial prototype for checkpointing backed by a local
repo embedded in the WC (the "option 3" design), on the
"shelve-checkpoint3" branch.

http://svn.apache.org/r1803046 and follow-ups.

Here is the help output:
[[[
$ svn checkpoint --help
checkpoint: Checkpoint the local changes.
usage: 0. checkpoint init
       1. checkpoint save
       2. checkpoint revert
       3. checkpoint rollback NUMBER
       4. checkpoint list|log
       5. checkpoint squash
       6. checkpoint finish|uninit

  0. Initialize checkpointing.
     ### WC must be a checkout of r1 of repo root
     ### required before using other checkpointing commands
  1. Save the working state as a new checkpoint.
  2. Revert the working state to the current checkpoint.
  3. Roll back the working state to checkpoint NUMBER.
  4. List all checkpoints.
  5. Squash all checkpoints to just a base and working state.
  6. Return to a plain WC based on the original repository.
     ### doesn't yet delete the checkpoint repo
]]]

There are more subsubcommands there than we would probably want in a
final user interface.

Here is some demo output.

[[[
$ . demo-setup.sh # creates a repo and wc with three text files
Adding config.txt
Adding hello.txt
Adding old.txt
Transmitting file data ...done
Committing transaction...
Committed revision 1.

$ svn checkpoint init
creating repo
copying base
Skipped '.svn/.svn'
Adding config.txt
Adding hello.txt
Adding old.txt
Committing transaction...
switching base

$ echo foo >> hello.txt

$ svn checkpoint save
Sending hello.txt
Transmitting file data .done
Committing transaction...
saved checkpoint 1

$ svn checkpoint list
* 1 2017-07-26T13:36

  0 2017-07-26T13:36

$ svn st

$ svn checkpoint finish
checkpointing any outstanding changes
squashing checkpoints to a working state
  (squash: updating to r1)
Updating '.':
U hello.txt
Updated to revision 1.
  (squash: merging checkpointed changes into WC)
--- Merging r2 into '.':
U hello.txt
pruning checkpoint 1
switching back to original base
destroying the checkpoints repo
  (destroying the repo is not implemented yet)

$ svn st
M hello.txt

]]]

To commit the set of changes to the original repo, you use 'finish'
(which does a 'squash' followed by 'relocate'), giving a normal modified
WC state, and use a normal commit from there.

If you read this far and get a chance to try it out, I'd love to hear
your thoughts on the overall shape and the big-picture possibilities. (I
am not so concerned about details at this stage, but mention those too
and hopefully they will spark further thoughts.)

- Julian

On 2017-07-14, Julian Foad wrote:
> I committed an initial prototype for checkpointing on the
> "shelve-checkpoint" branch. http://svn.apache.org/r1801942
>
> This prototype is of the "store snapshot patches" ("option 1") design.
[...]
Received on 2017-07-26 17:13:29 CEST

This is an archived mail posted to the Subversion Dev mailing list.