Show More
@@ -169,6 +169,6 b' def archive(repo, dest, node, kind, deco' | |||||
169 | write('.hg_archival.txt', 0644, |
|
169 | write('.hg_archival.txt', 0644, | |
170 | 'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node))) |
|
170 | 'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node))) | |
171 | for filename, filenode in mf: |
|
171 | for filename, filenode in mf: | |
172 |
write(filename, mff |
|
172 | write(filename, mff.execf(filename) and 0755 or 0644, | |
173 | repo.file(filename).read(filenode)) |
|
173 | repo.file(filename).read(filenode)) | |
174 | archiver.done() |
|
174 | archiver.done() |
@@ -2026,7 +2026,8 b' def manifest(ui, repo, rev=None):' | |||||
2026 | files.sort() |
|
2026 | files.sort() | |
2027 |
|
2027 | |||
2028 | for f in files: |
|
2028 | for f in files: | |
2029 |
ui.write("%40s %3s %s\n" % (hex(m[f]), |
|
2029 | ui.write("%40s %3s %s\n" % (hex(m[f]), | |
|
2030 | mf.execf(f) and "755" or "644", f)) | |||
2030 |
|
2031 | |||
2031 | def merge(ui, repo, node=None, **opts): |
|
2032 | def merge(ui, repo, node=None, **opts): | |
2032 | """Merge working directory with another revision |
|
2033 | """Merge working directory with another revision |
@@ -238,8 +238,8 b' class dirstate(object):' | |||||
238 | self.clear() |
|
238 | self.clear() | |
239 | umask = os.umask(0) |
|
239 | umask = os.umask(0) | |
240 | os.umask(umask) |
|
240 | os.umask(umask) | |
241 |
for f |
|
241 | for f in files: | |
242 |
if |
|
242 | if files.execf(f): | |
243 | self.map[f] = ('n', ~umask, -1, 0) |
|
243 | self.map[f] = ('n', ~umask, -1, 0) | |
244 | else: |
|
244 | else: | |
245 | self.map[f] = ('n', ~umask & 0666, -1, 0) |
|
245 | self.map[f] = ('n', ~umask & 0666, -1, 0) |
@@ -481,9 +481,8 b' class localrepository(object):' | |||||
481 | for f in files: |
|
481 | for f in files: | |
482 | try: |
|
482 | try: | |
483 | t = self.wread(f) |
|
483 | t = self.wread(f) | |
484 |
|
|
484 | mfm.set(f, util.is_exec(self.wjoin(f), mfm.execf(f))) | |
485 | r = self.file(f) |
|
485 | r = self.file(f) | |
486 | mfm[f] = tm |
|
|||
487 |
|
486 | |||
488 | (entry, fp1, fp2) = self.checkfilemerge(f, t, r, m1, m2) |
|
487 | (entry, fp1, fp2) = self.checkfilemerge(f, t, r, m1, m2) | |
489 | if entry: |
|
488 | if entry: | |
@@ -562,7 +561,7 b' class localrepository(object):' | |||||
562 | for f in commit: |
|
561 | for f in commit: | |
563 | self.ui.note(f + "\n") |
|
562 | self.ui.note(f + "\n") | |
564 | try: |
|
563 | try: | |
565 |
mf1 |
|
564 | mf1.set(f, util.is_exec(self.wjoin(f), mf1.execf(f))) | |
566 | t = self.wread(f) |
|
565 | t = self.wread(f) | |
567 | except IOError: |
|
566 | except IOError: | |
568 | self.ui.warn(_("trouble committing %s!\n") % f) |
|
567 | self.ui.warn(_("trouble committing %s!\n") % f) | |
@@ -806,7 +805,7 b' class localrepository(object):' | |||||
806 | else: |
|
805 | else: | |
807 | t = self.file(f).read(m[f]) |
|
806 | t = self.file(f).read(m[f]) | |
808 | self.wwrite(f, t) |
|
807 | self.wwrite(f, t) | |
809 |
util.set_exec(self.wjoin(f), mf |
|
808 | util.set_exec(self.wjoin(f), mf.execf(f)) | |
810 | self.dirstate.update([f], "n") |
|
809 | self.dirstate.update([f], "n") | |
811 |
|
810 | |||
812 | def copy(self, source, dest, wlock=None): |
|
811 | def copy(self, source, dest, wlock=None): | |
@@ -1737,7 +1736,7 b' class localrepository(object):' | |||||
1737 |
|
1736 | |||
1738 | for f in added + modified + unknown: |
|
1737 | for f in added + modified + unknown: | |
1739 | mw[f] = "" |
|
1738 | mw[f] = "" | |
1740 |
mfw |
|
1739 | mfw.set(f, util.is_exec(self.wjoin(f), mfw.execf(f))) | |
1741 |
|
1740 | |||
1742 | if moddirstate and not wlock: |
|
1741 | if moddirstate and not wlock: | |
1743 | wlock = self.wlock() |
|
1742 | wlock = self.wlock() | |
@@ -1777,7 +1776,7 b' class localrepository(object):' | |||||
1777 | self.ui.debug(_(" %s versions differ, resolve\n") % f) |
|
1776 | self.ui.debug(_(" %s versions differ, resolve\n") % f) | |
1778 | # merge executable bits |
|
1777 | # merge executable bits | |
1779 | # "if we changed or they changed, change in merge" |
|
1778 | # "if we changed or they changed, change in merge" | |
1780 |
a, b, c = mfa. |
|
1779 | a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) | |
1781 | mode = ((a^b) | (a^c)) ^ a |
|
1780 | mode = ((a^b) | (a^c)) ^ a | |
1782 | merge[f] = (m1.get(f, nullid), m2[f], mode) |
|
1781 | merge[f] = (m1.get(f, nullid), m2[f], mode) | |
1783 | s = 1 |
|
1782 | s = 1 | |
@@ -1796,9 +1795,9 b' class localrepository(object):' | |||||
1796 | if not s and mfw[f] != mf2[f]: |
|
1795 | if not s and mfw[f] != mf2[f]: | |
1797 | if force: |
|
1796 | if force: | |
1798 | self.ui.debug(_(" updating permissions for %s\n") % f) |
|
1797 | self.ui.debug(_(" updating permissions for %s\n") % f) | |
1799 |
util.set_exec(self.wjoin(f), mf2 |
|
1798 | util.set_exec(self.wjoin(f), mf2.execf(f)) | |
1800 | else: |
|
1799 | else: | |
1801 |
a, b, c = mfa. |
|
1800 | a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) | |
1802 | mode = ((a^b) | (a^c)) ^ a |
|
1801 | mode = ((a^b) | (a^c)) ^ a | |
1803 | if mode != b: |
|
1802 | if mode != b: | |
1804 | self.ui.debug(_(" updating permissions for %s\n") |
|
1803 | self.ui.debug(_(" updating permissions for %s\n") | |
@@ -1898,7 +1897,7 b' class localrepository(object):' | |||||
1898 | self.ui.note(_("getting %s\n") % f) |
|
1897 | self.ui.note(_("getting %s\n") % f) | |
1899 | t = self.file(f).read(get[f]) |
|
1898 | t = self.file(f).read(get[f]) | |
1900 | self.wwrite(f, t) |
|
1899 | self.wwrite(f, t) | |
1901 |
util.set_exec(self.wjoin(f), mf2 |
|
1900 | util.set_exec(self.wjoin(f), mf2.execf(f)) | |
1902 | if moddirstate: |
|
1901 | if moddirstate: | |
1903 | if branch_merge: |
|
1902 | if branch_merge: | |
1904 | self.dirstate.update([f], 'n', st_mtime=-1) |
|
1903 | self.dirstate.update([f], 'n', st_mtime=-1) |
@@ -48,7 +48,7 b' class manifest(revlog):' | |||||
48 | return map |
|
48 | return map | |
49 |
|
49 | |||
50 | def readflags(self, node): |
|
50 | def readflags(self, node): | |
51 |
if node == nullid: return |
|
51 | if node == nullid: return manifestflags() # don't upset local cache | |
52 | if not self.mapcache or self.mapcache[0] != node: |
|
52 | if not self.mapcache or self.mapcache[0] != node: | |
53 | self.read(node) |
|
53 | self.read(node) | |
54 | return self.mapcache[2] |
|
54 | return self.mapcache[2] |
General Comments 0
You need to be logged in to leave comments.
Login now