# HG changeset patch # User Augie Fackler # Date 2014-10-10 18:09:37 # Node ID 03602f76deeed259044e96b1a0600d2ca19b58d3 # Parent da2758c0aca04fe20fef2797f80c6079099afca5 manifest: rename ambiguously-named set to setflag Just makes it a little clearer what this method does. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1063,7 +1063,7 @@ class committablectx(basectx): 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 @@ class workingctx(committablectx): 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] diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1407,7 +1407,7 @@ class localrepository(object): 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 diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -21,7 +21,8 @@ class manifestdict(dict): 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))