Patchwork treemanifest: fix a "treeinmem" case

login
register
mail settings
Submitter via Mercurial-devel
Date Nov. 4, 2016, 8:53 p.m.
Message ID <b69b0c25c1acacee1512.1478292838@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/17341/
State Accepted
Headers show

Comments

via Mercurial-devel - Nov. 4, 2016, 8:53 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1478292555 25200
#      Fri Nov 04 13:49:15 2016 -0700
# Node ID b69b0c25c1acacee1512009188953eedc3425b49
# Parent  14c1b24e087e0e725e3572e0dd746b560660f423
treemanifest: fix a "treeinmem" case

f2c5b9d48b29 (manifest: make treemanifestctx store the repo,
2016-10-18) broke most tests when run with treeinmem=True. The
treeinmem mode can not be enabled by the user, so this did not break
anything in practice, but it's useful to have it working for testing
the treemanifest code.
Augie Fackler - Nov. 9, 2016, 4:48 p.m.
On Fri, Nov 04, 2016 at 01:53:58PM -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1478292555 25200
> #      Fri Nov 04 13:49:15 2016 -0700
> # Node ID b69b0c25c1acacee1512009188953eedc3425b49
> # Parent  14c1b24e087e0e725e3572e0dd746b560660f423
> treemanifest: fix a "treeinmem" case

Queued this, thanks.

>
> f2c5b9d48b29 (manifest: make treemanifestctx store the repo,
> 2016-10-18) broke most tests when run with treeinmem=True. The
> treeinmem mode can not be enabled by the user, so this did not break
> anything in practice, but it's useful to have it working for testing
> the treemanifest code.
>
> diff -r 14c1b24e087e -r b69b0c25c1ac mercurial/manifest.py
> --- a/mercurial/manifest.py	Sun Oct 23 10:40:33 2016 -0700
> +++ b/mercurial/manifest.py	Fri Nov 04 13:49:15 2016 -0700
> @@ -1376,7 +1376,7 @@
>                  m.setnode(self._node)
>                  self._data = m
>              else:
> -                text = revlog.revision(self._node)
> +                text = rl.revision(self._node)
>                  arraytext = array.array('c', text)
>                  rl.fulltextcache[self._node] = arraytext
>                  self._data = treemanifest(dir=self._dir, text=text)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r 14c1b24e087e -r b69b0c25c1ac mercurial/manifest.py
--- a/mercurial/manifest.py	Sun Oct 23 10:40:33 2016 -0700
+++ b/mercurial/manifest.py	Fri Nov 04 13:49:15 2016 -0700
@@ -1376,7 +1376,7 @@ 
                  m.setnode(self._node)
                  self._data = m
              else:
-                text = revlog.revision(self._node)
+                text = rl.revision(self._node)
                  arraytext = array.array('c', text)
                  rl.fulltextcache[self._node] = arraytext
                  self._data = treemanifest(dir=self._dir, text=text)