merge: change the merge state serialisation to use a record based logic
The format of the file is unchanged. But we are preparing a new file with a new
format that would be record based. So we change all the read/write logic to
handle a list of record until a very low level. This will allow simple plugging
of the new format in the current code.
merge: move merge state file path into a constant
We are about to change the format. Having the file path in a single place make
it easier to update the filename for the new version.
revset: changed spanset __add__ implementation to work lazily
$ time hg log -qr "first(0:tip or draft())"
...
real 0m1.032s
user 0m0.841s
sys 0m0.179s
$ time ./hg log -qr "first(0:tip or draft())"
...
real 0m0.378s
user 0m0.291s
sys 0m0.085s
revset: changed lazyset __add__ implementation to work lazily
Performance Benchmarking:
$ time hg log -qr "first(author(mpm) or branch(default))"
0:
9117c6561b0b
real 0m3.875s
user 0m3.818s
sys 0m0.051s
$ time ./hg log -qr "first(author(mpm) or branch(default))"
0:
9117c6561b0b
real 0m0.213s
user 0m0.174s
sys 0m0.038s
obsstore: add a __len__ method
We can already use "for mark in store:" it make sense to allow
"len(store)" too.
obsstore: `create` method return True if a marker is actually added
The obsstore method now have a return value. This informs caller about the
actual creation of a new markers. No new markers are created if it would have
been a duplicate.