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.
Here is the help output:
[[[
$ svn checkpoint --help
checkpoint: Checkpoint the local changes.
usage: 1. checkpoint save
2. checkpoint revert
3. checkpoint rollback NUMBER
4. checkpoint list|--list
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. A synonym for 'svn checkpoints'.
[...]
]]]
Please try it and let me know your thoughts on the directions we should
take it in, if you have a chance.
I think the next most important things it needs are:
* recognize when there are no further changes relative to the last
checkpoint, and do nothing in that case;
* see the status and diff of the WC against the current checkpoint;
* see a summary and diff of each checkpoint against the previous one.
Diffing checkpoints is quite hard (well, needs a patch-arithmetic
library) in this design. Even just determining whether two patches are
"identical". That might be a good reason for me to try the alternative
design "store checkpoints in a local repository" ("option 3") next.
- Julian
On 12/07/17, Julian Foad wrote:
> I committed an initial prototype for shelving on the "shelve-checkpoint"
> branch.
>
> Here is the help output:
> [[[
> $ svn shelve --help
> shelve: Shelve changes.
> usage: 1. shelve NAME PATH...
> 2. shelve --delete NAME
> 3. shelve --list
>
> 1. Shelve as NAME the local changes in the given PATHs.
> 2. Delete the shelved patch NAME.
> 3. List shelved patches.
> [...]
>
> $ svn unshelve --help
> unshelve: Unshelve changes.
> usage: unshelve [--keep] NAME
>
> ]]]
>
> Here is an example session:
> [[[
> $ # create and commit some files
>
> $ mkdir doc; echo hello > doc/hello.txt; echo config > config
>
> $ svn add --force .; svn ci -q -m ""
> A config
> A doc
> A doc/hello.txt
>
> $ # start making some changes to docs
>
> $ echo new > doc/new.txt; svn add doc/new.txt
> A doc/new.txt
>
> $ echo more >> config
>
> $ svn st
> M config
> A doc/new.txt
>
> $ # shelve these documentation changes
>
> $ svn shelve docs .
> U config
> D doc/new.txt
> shelved 'docs'
>
> $ svn st
>
> $ svn shelve --list
> docs.patch
>
> $ # work on a quick fix and commit it
>
> $ echo Hello > doc/hello.txt
>
> $ svn ci -q -m "Fix capitalization."
>
> $ # unshelve to continue work on docs
>
> $ svn unshelve docs
> U config
> A doc/new.txt
> unshelved 'docs'
>
> $ svn st
> M config
> A doc/new.txt
>
> $ svn shelve --list
>
> ]]]
>
> If you have a chance to try it yourself, I'd love to hear your first
> impressions.
>
> - Julian
>
>
>> References:
>> [1] Shelving-Checkpointing Dev doc. (J Foad)
>> https://docs.google.com/document/d/1PVgw0BdPF7v67oxIK7B_Yjmr3p28ojabP5N1PfZTsHk/edit#
>>
>
Received on 2017-07-14 13:57:05 CEST