convert: ignore svn:executable for subversion targets without exec bit support
authorMads Kiilerich <mads@kiilerich.com>
Sun, 24 Jun 2012 17:06:47 +0200
changeset 17031 f17b561cc473
parent 17030 ec5ef276077f
child 17032 7dd82e0c43ea
convert: ignore svn:executable for subversion targets without exec bit support Calling propset/propdel with subversion 1.6 on FAT gave abort: svn exited with status 256 and made test-convert-hg-svn.t and test-convert-svn-sink.t fail. 1.7 worked. This is a rework of fdee5d614fcc but ignores the executable bit when it isn't supported instead of using an approximation.
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Fri Jun 22 02:39:52 2012 +0200
+++ b/hgext/convert/subversion.py	Sun Jun 24 17:06:47 2012 +0200
@@ -1091,20 +1091,13 @@
             self.wopener.write(filename, data)
 
             if self.is_exec:
-                was_exec = self.is_exec(self.wjoin(filename))
-            else:
-                # On filesystems not supporting execute-bit, there is no way
-                # to know if it is set but asking subversion. Setting it
-                # systematically is just as expensive and much simpler.
-                was_exec = 'x' not in flags
-
-            util.setflags(self.wjoin(filename), False, 'x' in flags)
-            if was_exec:
-                if 'x' not in flags:
-                    self.delexec.append(filename)
-            else:
-                if 'x' in flags:
-                    self.setexec.append(filename)
+                if self.is_exec(self.wjoin(filename)):
+                    if 'x' not in flags:
+                        self.delexec.append(filename)
+                else:
+                    if 'x' in flags:
+                        self.setexec.append(filename)
+                util.setflags(self.wjoin(filename), False, 'x' in flags)
 
     def _copyfile(self, source, dest):
         # SVN's copy command pukes if the destination file exists, but