comparison hgext/convert/subversion.py @ 6877:1d38f3605b20

util: set_flags shouldn't know about repo flag formats
author Matt Mackall <mpm@selenic.com>
date Sun, 10 Aug 2008 21:55:06 -0500
parents c6bb8fae3bd2
children 11229144aa01 b1a4f67b98d0
comparison
equal deleted inserted replaced
6875:0d714a48ab53 6877:1d38f3605b20
997 if created: 997 if created:
998 hook = os.path.join(created, 'hooks', 'pre-revprop-change') 998 hook = os.path.join(created, 'hooks', 'pre-revprop-change')
999 fp = open(hook, 'w') 999 fp = open(hook, 'w')
1000 fp.write(pre_revprop_change) 1000 fp.write(pre_revprop_change)
1001 fp.close() 1001 fp.close()
1002 util.set_flags(hook, "x") 1002 util.set_flags(hook, False, True)
1003 1003
1004 xport = transport.SvnRaTransport(url=geturl(path)) 1004 xport = transport.SvnRaTransport(url=geturl(path))
1005 self.uuid = svn.ra.get_uuid(xport.ra) 1005 self.uuid = svn.ra.get_uuid(xport.ra)
1006 1006
1007 def wjoin(self, *names): 1007 def wjoin(self, *names):
1024 # On filesystems not supporting execute-bit, there is no way 1024 # On filesystems not supporting execute-bit, there is no way
1025 # to know if it is set but asking subversion. Setting it 1025 # to know if it is set but asking subversion. Setting it
1026 # systematically is just as expensive and much simpler. 1026 # systematically is just as expensive and much simpler.
1027 was_exec = 'x' not in flags 1027 was_exec = 'x' not in flags
1028 1028
1029 util.set_flags(self.wjoin(filename), flags) 1029 util.set_flags(self.wjoin(filename), False, 'x' in flags)
1030 if was_exec: 1030 if was_exec:
1031 if 'x' not in flags: 1031 if 'x' not in flags:
1032 self.delexec.append(filename) 1032 self.delexec.append(filename)
1033 else: 1033 else:
1034 if 'x' in flags: 1034 if 'x' in flags: