D6586: automv: access status fields by name, not index

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Jun 28 21:13:33 UTC 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/automv.py

CHANGE DETAILS

diff --git a/hgext/automv.py b/hgext/automv.py
--- a/hgext/automv.py
+++ b/hgext/automv.py
@@ -81,8 +81,8 @@
 
     """
     stat = repo.status(match=matcher)
-    added = stat[1]
-    removed = stat[2]
+    added = stat.added
+    removed = stat.removed
 
     copy = copies.pathcopies(repo['.'], repo[None], matcher)
     # remove the copy files for which we already have copy info



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


More information about the Mercurial-devel mailing list