D3532: wireprotov2: define and implement "rawstorefile" command

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri May 11 20:21:35 EDT 2018


martinvonz added inline comments.

INLINE COMMENTS

> wireprotov2server.py:548-549
> +
> +    with repo.lock():
> +        topfiles = list(repo.store.topfiles())
> +

I understand that you don't want to lock the repo for the entire operation, but I assume that also means that the result may fail `hg verify`? If changelog is always sent before the manifest (is it?), then you might have some orphan entries in the manifest if it had been written while the changelog was read.

> wireprotov2server.py:554
> +
> +    for name, encodedname, size in topfiles:
> +        if what.startswith(b'changelog') and name.startswith(b'00changelog'):

tree manifest support might be as easy as also iterating over data files, stripping leading 'meta/' and trailing '00manifest.[id]' and testing against repo.narrowmatch().visitdir()

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3532

To: indygreg, #hg-reviewers
Cc: martinvonz, mercurial-devel


More information about the Mercurial-devel mailing list