Mercurial > hg
changeset 2832:e196aa1df169
Start using manifestflags methods
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 16 Jul 2006 03:14:17 -0500 |
parents | 0b50a580be36 |
children | d0159c5f18bf |
files | mercurial/archival.py mercurial/commands.py mercurial/dirstate.py mercurial/localrepo.py mercurial/manifest.py |
diffstat | 5 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/archival.py Sun Jul 16 02:59:20 2006 -0500 +++ b/mercurial/archival.py Sun Jul 16 03:14:17 2006 -0500 @@ -169,6 +169,6 @@ write('.hg_archival.txt', 0644, 'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node))) for filename, filenode in mf: - write(filename, mff[filename] and 0755 or 0644, + write(filename, mff.execf(filename) and 0755 or 0644, repo.file(filename).read(filenode)) archiver.done()
--- a/mercurial/commands.py Sun Jul 16 02:59:20 2006 -0500 +++ b/mercurial/commands.py Sun Jul 16 03:14:17 2006 -0500 @@ -2026,7 +2026,8 @@ files.sort() for f in files: - ui.write("%40s %3s %s\n" % (hex(m[f]), mf[f] and "755" or "644", f)) + ui.write("%40s %3s %s\n" % (hex(m[f]), + mf.execf(f) and "755" or "644", f)) def merge(ui, repo, node=None, **opts): """Merge working directory with another revision
--- a/mercurial/dirstate.py Sun Jul 16 02:59:20 2006 -0500 +++ b/mercurial/dirstate.py Sun Jul 16 03:14:17 2006 -0500 @@ -238,8 +238,8 @@ self.clear() umask = os.umask(0) os.umask(umask) - for f, mode in files: - if mode: + for f in files: + if files.execf(f): self.map[f] = ('n', ~umask, -1, 0) else: self.map[f] = ('n', ~umask & 0666, -1, 0)
--- a/mercurial/localrepo.py Sun Jul 16 02:59:20 2006 -0500 +++ b/mercurial/localrepo.py Sun Jul 16 03:14:17 2006 -0500 @@ -481,9 +481,8 @@ for f in files: try: t = self.wread(f) - tm = util.is_exec(self.wjoin(f), mfm.get(f, False)) + mfm.set(f, util.is_exec(self.wjoin(f), mfm.execf(f))) r = self.file(f) - mfm[f] = tm (entry, fp1, fp2) = self.checkfilemerge(f, t, r, m1, m2) if entry: @@ -562,7 +561,7 @@ for f in commit: self.ui.note(f + "\n") try: - mf1[f] = util.is_exec(self.wjoin(f), mf1.get(f, False)) + mf1.set(f, util.is_exec(self.wjoin(f), mf1.execf(f))) t = self.wread(f) except IOError: self.ui.warn(_("trouble committing %s!\n") % f) @@ -806,7 +805,7 @@ else: t = self.file(f).read(m[f]) self.wwrite(f, t) - util.set_exec(self.wjoin(f), mf[f]) + util.set_exec(self.wjoin(f), mf.execf(f)) self.dirstate.update([f], "n") def copy(self, source, dest, wlock=None): @@ -1737,7 +1736,7 @@ for f in added + modified + unknown: mw[f] = "" - mfw[f] = util.is_exec(self.wjoin(f), mfw.get(f, False)) + mfw.set(f, util.is_exec(self.wjoin(f), mfw.execf(f))) if moddirstate and not wlock: wlock = self.wlock() @@ -1777,7 +1776,7 @@ self.ui.debug(_(" %s versions differ, resolve\n") % f) # merge executable bits # "if we changed or they changed, change in merge" - a, b, c = mfa.get(f, 0), mfw[f], mf2[f] + a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) mode = ((a^b) | (a^c)) ^ a merge[f] = (m1.get(f, nullid), m2[f], mode) s = 1 @@ -1796,9 +1795,9 @@ if not s and mfw[f] != mf2[f]: if force: self.ui.debug(_(" updating permissions for %s\n") % f) - util.set_exec(self.wjoin(f), mf2[f]) + util.set_exec(self.wjoin(f), mf2.execf(f)) else: - a, b, c = mfa.get(f, 0), mfw[f], mf2[f] + a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) mode = ((a^b) | (a^c)) ^ a if mode != b: self.ui.debug(_(" updating permissions for %s\n") @@ -1898,7 +1897,7 @@ self.ui.note(_("getting %s\n") % f) t = self.file(f).read(get[f]) self.wwrite(f, t) - util.set_exec(self.wjoin(f), mf2[f]) + util.set_exec(self.wjoin(f), mf2.execf(f)) if moddirstate: if branch_merge: self.dirstate.update([f], 'n', st_mtime=-1)
--- a/mercurial/manifest.py Sun Jul 16 02:59:20 2006 -0500 +++ b/mercurial/manifest.py Sun Jul 16 03:14:17 2006 -0500 @@ -48,7 +48,7 @@ return map def readflags(self, node): - if node == nullid: return {} # don't upset local cache + if node == nullid: return manifestflags() # don't upset local cache if not self.mapcache or self.mapcache[0] != node: self.read(node) return self.mapcache[2]