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