Mercurial > hg
view tests/test-revlog-v2.t @ 41051:bad05a6afdc8
pull: fix inconsistent view of bookmarks during pull (issue4700)
I had a share where a pull apparently pulled a bookmark but not the
revision pointed to by the bookmark, which I suspect is due to this
(and if not, we might as well remove known issues in this area).
I do this by combining doing all the queries that could read the
bookmarks in one round trip.
I had to change the handling of the case where the server doesn't
support the lookup query, because if it fails, it would otherwise make
fremotebookmark.result() block forever. This is due to
wireprotov1peer.peerexecutor.sendcommands's behavior (it fills a
single future if any query fails synchronously and leaves all other
futures unchanged), but I don't know if the fix is to cancel all other
futures, or to keep going with the other queries.
Differential Revision: https://phab.mercurial-scm.org/D5449
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Thu, 20 Dec 2018 22:28:39 -0500 |
parents | a0886a4d6dce |
children | e7a2cc84dbc0 |
line wrap: on
line source
#require reporevlogstore A repo with unknown revlogv2 requirement string cannot be opened $ hg init invalidreq $ cd invalidreq $ echo exp-revlogv2.unknown >> .hg/requires $ hg log abort: repository requires features unknown to this Mercurial: exp-revlogv2.unknown! (see https://mercurial-scm.org/wiki/MissingRequirement for more information) [255] $ cd .. Can create and open repo with revlog v2 requirement $ cat >> $HGRCPATH << EOF > [experimental] > revlogv2 = enable-unstable-format-and-corrupt-my-data > EOF $ hg init empty-repo $ cd empty-repo $ cat .hg/requires dotencode exp-revlogv2.0 fncache sparserevlog store $ hg log Unknown flags to revlog are rejected >>> with open('.hg/store/00changelog.i', 'wb') as fh: ... fh.write(b'\x00\x04\xde\xad') and None $ hg log abort: unknown flags (0x04) in version 57005 revlog 00changelog.i! [255] $ cd .. Writing a simple revlog v2 works $ hg init simple $ cd simple $ touch foo $ hg -q commit -A -m initial $ hg log changeset: 0:96ee1d7354c4 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: initial Header written as expected (changelog always disables generaldelta) $ f --hexdump --bytes 4 .hg/store/00changelog.i .hg/store/00changelog.i: 0000: 00 01 de ad |....| $ f --hexdump --bytes 4 .hg/store/data/foo.i .hg/store/data/foo.i: 0000: 00 03 de ad |....|