[PATCH 13 of 17 V4] histedit: access status fields by name rather than index

Martin von Zweigbergk martinvonz at gmail.com
Sun Oct 12 00:44:30 CDT 2014


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1412482784 25200
#      Sat Oct 04 21:19:44 2014 -0700
# Node ID a284585424ccf449ddde8ae5be2a7141f808af03
# Parent  088cb7b401bbeeb889178a8183ae736374b0aa89
histedit: access status fields by name rather than index

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -688,8 +688,8 @@
 
     # Commit dirty working directory if necessary
     new = None
-    m, a, r, d = repo.status()[:4]
-    if m or a or r or d:
+    s = repo.status()
+    if s.modified or s.added or s.removed or s.deleted:
         # prepare the message for the commit to comes
         if action in ('f', 'fold', 'r', 'roll'):
             message = 'fold-temp-revision %s' % currentnode


More information about the Mercurial-devel mailing list