Patchwork transaction: run _writejournal unfiltered

login
register
mail settings
Submitter Pierre-Yves David
Date May 25, 2017, 12:06 a.m.
Message ID <f30e56654b53aa180a4f.1495670787@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/20889/
State Accepted
Headers show

Comments

Pierre-Yves David - May 25, 2017, 12:06 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1495669552 -7200
#      Thu May 25 01:45:52 2017 +0200
# Node ID f30e56654b53aa180a4ff9f716e1afd3becb21f6
# Parent  75544176bc28ad24405c77d592971d525aeca8b8
# EXP-Topic unfi-journal
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r f30e56654b53
transaction: run _writejournal unfiltered

The function use the length of the repository, something affected by filterin.
It seems better to use the unfiltered length here.

Credit for finding this goes to Durham Goode.
via Mercurial-devel - May 25, 2017, 6:14 a.m.
On Wed, May 24, 2017 at 5:06 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1495669552 -7200
> #      Thu May 25 01:45:52 2017 +0200
> # Node ID f30e56654b53aa180a4ff9f716e1afd3becb21f6
> # Parent  75544176bc28ad24405c77d592971d525aeca8b8
> # EXP-Topic unfi-journal
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r f30e56654b53
> transaction: run _writejournal unfiltered
>
> The function use the length of the repository, something affected by filterin.

Queuing with s/filterin/filtering/ in flight, thanks.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1120,6 +1120,7 @@  class localrepository(object):
     def undofiles(self):
         return [(vfs, undoname(x)) for vfs, x in self._journalfiles()]
 
+    @unfilteredmethod
     def _writejournal(self, desc):
         self.dirstate.savebackup(None, prefix='journal.')
         self.vfs.write("journal.branch",