Patchwork D7145: status: move initialization closer together

login
register
mail settings
Submitter phabricator
Date Oct. 19, 2019, 7:39 a.m.
Message ID <differential-rev-PHID-DREV-ghv7hg3j7c4jtej73xau-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42492/
State Superseded
Headers show

Comments

phabricator - Oct. 19, 2019, 7:39 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The default initialization happened long before it needed to happen.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 6, 2019, 6:47 p.m.
marmoute added a comment.
marmoute accepted this revision.


  This looks simple and good

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7145/new/

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

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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6799,7 +6799,6 @@ 
         end = b'\0'
     else:
         end = b'\n'
-    copy = {}
     states = b'modified added removed deleted unknown ignored clean'.split()
     show = [k for k in states if opts.get(k)]
     if opts.get(b'all'):
@@ -6838,6 +6837,7 @@ 
 
     changestates = zip(states, pycompat.iterbytestr(b'MAR!?IC'), stat)
 
+    copy = {}
     if (
         opts.get(b'all')
         or opts.get(b'copies')