Patchwork dirstate: Fix invalid reference to self.ui

login
register
mail settings
Submitter James Mills
Date Oct. 19, 2015, 9:20 p.m.
Message ID <d2694dcdf7eb8bd4643c.1445289608@ryanprince-mbp.local.dhcp.thefacebook.com>
Download mbox | patch
Permalink /patch/11178/
State Accepted
Headers show

Comments

James Mills - Oct. 19, 2015, 9:20 p.m.
# HG changeset patch
# User James Mills <prologic@fb.com>
# Date 1445281637 25200
#      Mon Oct 19 12:07:17 2015 -0700
# Node ID d2694dcdf7eb8bd4643c4ed1d0bd15772abbb375
# Parent  df1a29ec45bfaee30f974b06a0214a3359b369aa
dirstate: Fix invalid reference to self.ui
Sean Farley - Oct. 19, 2015, 9:54 p.m.
James Mills <prologic@fb.com> writes:

> # HG changeset patch
> # User James Mills <prologic@fb.com>
> # Date 1445281637 25200
> #      Mon Oct 19 12:07:17 2015 -0700
> # Node ID d2694dcdf7eb8bd4643c4ed1d0bd15772abbb375
> # Parent  df1a29ec45bfaee30f974b06a0214a3359b369aa
> dirstate: Fix invalid reference to self.ui

Nice catch. Minor nit: the first word after ':' shouldn't be capitalized
as listed in the new contributor's guide (first bullet point):

https://www.mercurial-scm.org/wiki/ContributingChanges

I would hope the person that queues this can fix it for you.
Matt Mackall - Oct. 19, 2015, 10:50 p.m.
On Mon, 2015-10-19 at 14:20 -0700, James Mills wrote:
> # HG changeset patch
> # User James Mills <prologic@fb.com>
> # Date 1445281637 25200
> #      Mon Oct 19 12:07:17 2015 -0700
> # Node ID d2694dcdf7eb8bd4643c4ed1d0bd15772abbb375
> # Parent  df1a29ec45bfaee30f974b06a0214a3359b369aa
> dirstate: Fix invalid reference to self.ui

Queued, thanks. Nice spotting and congratulations on your first
Mercurial patch.
James Mills - Oct. 20, 2015, 3:19 a.m.
On Mon, Oct 19, 2015 at 3:50 PM, Matt Mackall <mpm@selenic.com> wrote:

> Queued, thanks. Nice spotting and congratulations on your first
> Mercurial patch.
>

Thank you :)


James Mills / prologic

E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -662,7 +662,7 @@ 
         filename = self._filename
         if tr is False: # not explicitly specified
             if (self._ui.configbool('devel', 'all-warnings')
-                or self.ui.configbool('devel', 'check-dirstate-write')):
+                or self._ui.configbool('devel', 'check-dirstate-write')):
                 self._ui.develwarn('use dirstate.write with '
                                    'repo.currenttransaction()')