[PATCH 1 of 6] keyword: rename variable "cfiles" to "changed" for clarity

Christian Ebert blacktrash at gmx.net
Thu Sep 30 19:24:40 CDT 2010


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1285892011 -7200
# Node ID feb6e0d08eb9af5cb01e922ef3eb9b4ddb14ee5b
# Parent  0f83a402faa0c0a099962cb6627a0863dbb38e4b
keyword: rename variable "cfiles" to "changed" for clarity

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -191,10 +191,10 @@
         Caveat: localrepository._link fails on Windows.'''
         return self.match(path) and not 'l' in flagfunc(path)
 
-    def overwrite(self, ctx, candidates, iswctx, expand, cfiles):
+    def overwrite(self, ctx, candidates, iswctx, expand, changed):
         '''Overwrites selected files expanding/shrinking keywords.'''
-        if cfiles is not None:
-            candidates = [f for f in candidates if f in cfiles]
+        if changed is not None:
+            candidates = [f for f in candidates if f in changed]
         candidates = [f for f in candidates if self.iskwfile(f, ctx.flags)]
         if candidates:
             restrict = self.restrict
@@ -510,13 +510,13 @@
             wlock = repo.wlock()
             try:
                 if not dryrun:
-                    cfiles = self['.'].files()
+                    changed = self['.'].files()
                 ret = super(kwrepo, self).rollback(dryrun)
                 if not dryrun:
                     ctx = self['.']
                     modified, added = super(kwrepo, self).status()[:2]
-                    kwt.overwrite(ctx, added, True, False, cfiles)
-                    kwt.overwrite(ctx, modified, True, True, cfiles)
+                    kwt.overwrite(ctx, added, True, False, changed)
+                    kwt.overwrite(ctx, modified, True, True, changed)
                 return ret
             finally:
                 wlock.release()


More information about the Mercurial-devel mailing list