diff mercurial/transaction.py @ 6065:53ed9b40cfc4

make the journal/undo files from transactions inherit the mode from .hg/store
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 09 Feb 2008 18:38:54 -0200
parents e7127f669edb
children c9b8f2820bc0
line wrap: on
line diff
--- a/mercurial/transaction.py	Sat Feb 09 18:38:54 2008 -0200
+++ b/mercurial/transaction.py	Sat Feb 09 18:38:54 2008 -0200
@@ -15,7 +15,7 @@
 import os
 
 class transaction(object):
-    def __init__(self, report, opener, journal, after=None):
+    def __init__(self, report, opener, journal, after=None, createmode=None):
         self.journal = None
 
         self.count = 1
@@ -27,6 +27,8 @@
         self.journal = journal
 
         self.file = open(self.journal, "w")
+        if createmode is not None:
+            os.chmod(self.journal, createmode & 0666)
 
     def __del__(self):
         if self.journal: