mercurial/patch.py
changeset 3066 035fd2029575
parent 3057 d16b93f4a6ca
child 3096 f422c8265ae5
--- a/mercurial/patch.py	Thu Sep 07 14:01:00 2006 +0200
+++ b/mercurial/patch.py	Thu Sep 07 14:12:39 2006 +0200
@@ -502,7 +502,10 @@
                     header.append('deleted file mode %s\n' % mode)
             else:
                 omode = gitmode(mmap.execf(f))
-                nmode = gitmode(util.is_exec(repo.wjoin(f), mmap.execf(f)))
+                if node2:
+                    nmode = gitmode(mmap2.execf(f))
+                else:
+                    nmode = gitmode(util.is_exec(repo.wjoin(f), mmap.execf(f)))
                 addmodehdr(header, omode, nmode)
             r = None
             if dodiff: