Mercurial > hg
comparison tests/test-chg.t @ 32285:fe3105e6e051
shelve: make shelvestate use simplekeyvaluefile
Currently shelvestate uses line ordering to differentiate fields. This
makes it hard for extensions to wrap shelve, since if two alternative
versions of code add a new line, correct merging is going to be problematic.
simplekeyvaluefile was introduced fot this purpose specifically.
After this patch:
- shelve will always write a simplekeyvaluefile
- unshelve will check the first line of the file for a version, and if the
version is 1, will read it in a position-based way, if the version is 2,
will read it in a key-value way
As discussed with Yuya previously, this will be able to handle old-style
shelvedstate files, but old Mercurial versions will fail on the attempt to
read shelvedstate file of version 2 with a self-explanatory message:
'abort: this version of shelve is incompatible with the version used
in this repo'
author | Kostia Balytskyi <ikostia@fb.com> |
---|---|
date | Sat, 13 May 2017 14:52:29 -0700 |
parents | ca7af5d15b21 |
children | 46ba2cdda476 |
comparison
equal
deleted
inserted
replaced
32284:16d424b97125 | 32285:fe3105e6e051 |
---|