[PATCH 1 of 2] keyword: use status' names instead of index

Christian Ebert blacktrash at gmx.net
Sun Mar 7 06:15:42 CST 2010


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1267963383 -3600
# Node ID 60c6f5d985fb2d8ddd6a252e3070ed470f340ffe
# Parent  b98b6a7363ae69e0538bfc605d3e056a7b444d79
keyword: use status' names instead of index

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -265,14 +265,14 @@
         raise util.Abort(_('outstanding uncommitted merge'))
     kwt = kwtools['templater']
     status = _status(ui, repo, kwt, *pats, **opts)
-    modified, added, removed, deleted = status[:4]
+    modified, added, removed, deleted, unknown, ignored, clean = status
     if modified or added or removed or deleted:
         raise util.Abort(_('outstanding uncommitted changes'))
     wlock = lock = None
     try:
         wlock = repo.wlock()
         lock = repo.lock()
-        kwt.overwrite(None, expand, status[6])
+        kwt.overwrite(None, expand, clean)
     finally:
         release(lock, wlock)
 


More information about the Mercurial-devel mailing list