Mercurial > hg-stable
comparison hgext/convert/subversion.py @ 5705:4e400863c5ac
convert/svn: use util.set_flags
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 27 Dec 2007 22:29:17 -0600 |
parents | b63ef7b1441c |
children | 0145f9afb0e7 |
comparison
equal
deleted
inserted
replaced
5704:5049bbf988e1 | 5705:4e400863c5ac |
---|---|
763 if created: | 763 if created: |
764 hook = os.path.join(created, 'hooks', 'pre-revprop-change') | 764 hook = os.path.join(created, 'hooks', 'pre-revprop-change') |
765 fp = open(hook, 'w') | 765 fp = open(hook, 'w') |
766 fp.write(pre_revprop_change) | 766 fp.write(pre_revprop_change) |
767 fp.close() | 767 fp.close() |
768 util.set_exec(hook, True) | 768 util.set_flags(hook, "x") |
769 | 769 |
770 xport = transport.SvnRaTransport(url=geturl(path)) | 770 xport = transport.SvnRaTransport(url=geturl(path)) |
771 self.uuid = svn.ra.get_uuid(xport.ra) | 771 self.uuid = svn.ra.get_uuid(xport.ra) |
772 | 772 |
773 def wjoin(self, *names): | 773 def wjoin(self, *names): |
790 # On filesystems not supporting execute-bit, there is no way | 790 # On filesystems not supporting execute-bit, there is no way |
791 # to know if it is set but asking subversion. Setting it | 791 # to know if it is set but asking subversion. Setting it |
792 # systematically is just as expensive and much simpler. | 792 # systematically is just as expensive and much simpler. |
793 was_exec = 'x' not in flags | 793 was_exec = 'x' not in flags |
794 | 794 |
795 util.set_exec(self.wjoin(filename), 'x' in flags) | 795 util.set_flags(self.wjoin(filename), flags) |
796 if was_exec: | 796 if was_exec: |
797 if 'x' not in flags: | 797 if 'x' not in flags: |
798 self.delexec.append(filename) | 798 self.delexec.append(filename) |
799 else: | 799 else: |
800 if 'x' in flags: | 800 if 'x' in flags: |