View Issue Details

IDProjectCategoryView StatusLast Update
0000553Other Unix PortBugpublic2012-12-12 08:52
ReporterSteven Levine Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformeCS/OS2OSeComstation or OS/2OS Version1.x 2.x or 4.5
Summary0000553: hg mercurial fails with attempts to change attribute of open file
DescriptionThe attached patches to lib\site-packages\mercurial\util.py and transaction.py avoid aborts caused by attempts to change permissions of an open file.
Tagshg, mercurial
Attached Files
util.py-20121210-shl.diff (571 bytes)   
Generated by diffux -z .saved\util-20120107-1600.py util.py on 12-10-12 23:24:56

--- .saved/util-20120107-1600.py	2012-01-07 16:00:42.000000000 -0800
+++ util.py	2012-12-05 16:47:16.000000000 -0800
@@ -850,7 +850,9 @@
     def _fixfilemode(self, name):
         if self.createmode is None:
             return
-        os.chmod(name, self.createmode & 0666)
+        # 2012-12-05 SHL
+        if os.name != 'os2':
+            os.chmod(name, self.createmode & 0666)
 
     def __call__(self, path, mode="r", text=False, atomictemp=False):
         self.audit_path(path)
util.py-20121210-shl.diff (571 bytes)   
transaction.py-20121210-shl.diff (558 bytes)   
Generated by diffux -z .saved\transaction-20120107-1600.py transaction.py on 12-10-12 23:59:12

--- .saved/transaction-20120107-1600.py	2012-01-07 16:00:42.000000000 -0800
+++ transaction.py	2012-12-05 16:49:04.000000000 -0800
@@ -54,7 +54,9 @@
 
         self.file = open(self.journal, "w")
         if createmode is not None:
-            os.chmod(self.journal, createmode & 0666)
+            # 2012-12-05 SHL
+            if os.name != 'os2':
+                os.chmod(self.journal, createmode & 0666)
 
     def __del__(self):
         if self.journal:

Activities

Steven Levine

2012-12-11 08:03

manager   ~0002366

transaction.py-20121210-shl.diff implements a similar fix for transaction.py

psmedley

2012-12-12 08:06

administrator   ~0002367

These should probably be checked in to the netlabs ports repository. Do you have write access there? If not, I can checkin.

Steven Levine

2012-12-12 08:52

manager   ~0002368

My plan was to offer them a full diff once we have python and hg sufficiently stabilized. This is what I did for stunnel and it seems to have worked out well.

They currently are distributing an antique hg with an oldish python. A clean diff will allow them to upgrade the rpms to something more current.

Issue History

Date Modified Username Field Change
2012-12-11 08:00 Steven Levine New Issue
2012-12-11 08:00 Steven Levine File Added: util.py-20121210-shl.diff
2012-12-11 08:03 Steven Levine Note Added: 0002366
2012-12-11 08:04 Steven Levine File Added: transaction.py-20121210-shl.diff
2012-12-11 08:04 Steven Levine Tag Attached: mercurial hg
2012-12-11 08:05 Steven Levine Tag Detached: mercurial hg
2012-12-11 08:05 Steven Levine Tag Attached: hg
2012-12-11 08:05 Steven Levine Tag Attached: mercurial
2012-12-11 08:06 Steven Levine Summary mercurial fails with attempt to change attribute of open file => hg mercurial fails with attempts to change attribute of open file
2012-12-11 08:06 Steven Levine Description Updated
2012-12-12 08:06 psmedley Note Added: 0002367
2012-12-12 08:52 Steven Levine Note Added: 0002368