changeset 22942:03602f76deee

manifest: rename ambiguously-named set to setflag Just makes it a little clearer what this method does.
author Augie Fackler <raf@durin42.com>
date Fri, 10 Oct 2014 14:09:37 -0400
parents da2758c0aca0
children 117e81871113
files mercurial/context.py mercurial/localrepo.py mercurial/manifest.py
diffstat 3 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sun Oct 12 08:29:31 2014 -0700
+++ b/mercurial/context.py	Fri Oct 10 14:09:37 2014 -0400
@@ -1063,7 +1063,7 @@
                 orig = copied.get(f, f)
                 man[f] = getman(orig).get(orig, nullid) + i
                 try:
-                    man.set(f, ff(f))
+                    man.setflag(f, ff(f))
                 except OSError:
                     pass
 
@@ -1389,7 +1389,7 @@
         modified, added, removed = s[0:3]
         for f in modified + added:
             mf[f] = None
-            mf.set(f, self.flags(f))
+            mf.setflag(f, self.flags(f))
         for f in removed:
             if f in mf:
                 del mf[f]
--- a/mercurial/localrepo.py	Sun Oct 12 08:29:31 2014 -0700
+++ b/mercurial/localrepo.py	Fri Oct 10 14:09:37 2014 -0400
@@ -1407,7 +1407,7 @@
                             added.append(f)
                             m[f] = self._filecommit(fctx, m1, m2, linkrev,
                                                     trp, changed)
-                            m.set(f, fctx.flags())
+                            m.setflag(f, fctx.flags())
                     except OSError, inst:
                         self.ui.warn(_("trouble committing %s!\n") % f)
                         raise
--- a/mercurial/manifest.py	Sun Oct 12 08:29:31 2014 -0700
+++ b/mercurial/manifest.py	Fri Oct 10 14:09:37 2014 -0400
@@ -21,7 +21,8 @@
         return self._flags.get(f, "")
     def withflags(self):
         return set(self._flags.keys())
-    def set(self, f, flags):
+    def setflag(self, f, flags):
+        """Set the flags (symlink, executable) for path f."""
         self._flags[f] = flags
     def copy(self):
         return manifestdict(self, dict.copy(self._flags))