##// END OF EJS Templates
rename util.set_flags to setflags
Adrian Buehlmann -
r14232:df239966 default
parent child Browse files
Show More
@@ -1011,7 +1011,7 b' class svn_sink(converter_sink, commandli'
1011 fp = open(hook, 'w')
1011 fp = open(hook, 'w')
1012 fp.write(pre_revprop_change)
1012 fp.write(pre_revprop_change)
1013 fp.close()
1013 fp.close()
1014 util.set_flags(hook, False, True)
1014 util.setflags(hook, False, True)
1015
1015
1016 output = self.run0('info')
1016 output = self.run0('info')
1017 self.uuid = self.uuid_re.search(output).group(1).strip()
1017 self.uuid = self.uuid_re.search(output).group(1).strip()
@@ -1038,7 +1038,7 b' class svn_sink(converter_sink, commandli'
1038 # systematically is just as expensive and much simpler.
1038 # systematically is just as expensive and much simpler.
1039 was_exec = 'x' not in flags
1039 was_exec = 'x' not in flags
1040
1040
1041 util.set_flags(self.wjoin(filename), False, 'x' in flags)
1041 util.setflags(self.wjoin(filename), False, 'x' in flags)
1042 if was_exec:
1042 if was_exec:
1043 if 'x' not in flags:
1043 if 'x' not in flags:
1044 self.delexec.append(filename)
1044 self.delexec.append(filename)
@@ -99,7 +99,7 b' def snapshot(ui, repo, files, node, tmpr'
99 else:
99 else:
100 wopener.write(wfn, data)
100 wopener.write(wfn, data)
101 if 'x' in fctx.flags():
101 if 'x' in fctx.flags():
102 util.set_flags(dest, False, True)
102 util.setflags(dest, False, True)
103 if node is None:
103 if node is None:
104 fns_and_mtime.append((dest, repo.wjoin(fn),
104 fns_and_mtime.append((dest, repo.wjoin(fn),
105 os.lstat(dest).st_mtime))
105 os.lstat(dest).st_mtime))
@@ -369,7 +369,7 b' def updatedir(ui, repo, patches, similar'
369 if gp.op == 'ADD' and not os.path.lexists(dst):
369 if gp.op == 'ADD' and not os.path.lexists(dst):
370 flags = (isexec and 'x' or '') + (islink and 'l' or '')
370 flags = (isexec and 'x' or '') + (islink and 'l' or '')
371 repo.wwrite(gp.path, '', flags)
371 repo.wwrite(gp.path, '', flags)
372 util.set_flags(dst, islink, isexec)
372 util.setflags(dst, islink, isexec)
373 addremove(repo, cfiles, similarity=similarity)
373 addremove(repo, cfiles, similarity=similarity)
374 files = patches.keys()
374 files = patches.keys()
375 files.extend([r for r in removes if r not in files])
375 files.extend([r for r in removes if r not in files])
@@ -659,7 +659,7 b' class localrepository(repo.repository):'
659 else:
659 else:
660 self.wopener.write(filename, data)
660 self.wopener.write(filename, data)
661 if 'x' in flags:
661 if 'x' in flags:
662 util.set_flags(self.wjoin(filename), False, True)
662 util.setflags(self.wjoin(filename), False, True)
663
663
664 def wwritedata(self, filename, data):
664 def wwritedata(self, filename, data):
665 return self._filter(self._decodefilterpats, filename, data)
665 return self._filter(self._decodefilterpats, filename, data)
@@ -336,7 +336,7 b' def applyupdates(repo, action, wctx, mct'
336 updated += 1
336 updated += 1
337 else:
337 else:
338 merged += 1
338 merged += 1
339 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags)
339 util.setflags(repo.wjoin(fd), 'l' in flags, 'x' in flags)
340 if (move and repo.dirstate.normalize(fd) != f
340 if (move and repo.dirstate.normalize(fd) != f
341 and os.path.lexists(repo.wjoin(f))):
341 and os.path.lexists(repo.wjoin(f))):
342 repo.ui.debug("removing %s\n" % f)
342 repo.ui.debug("removing %s\n" % f)
@@ -370,7 +370,7 b' def applyupdates(repo, action, wctx, mct'
370 repo.ui.warn(" %s\n" % nf)
370 repo.ui.warn(" %s\n" % nf)
371 elif m == "e": # exec
371 elif m == "e": # exec
372 flags = a[2]
372 flags = a[2]
373 util.set_flags(repo.wjoin(f), 'l' in flags, 'x' in flags)
373 util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags)
374 ms.commit()
374 ms.commit()
375 u.progress(_('updating'), None, total=numupdates, unit=_('files'))
375 u.progress(_('updating'), None, total=numupdates, unit=_('files'))
376
376
@@ -48,7 +48,7 b' def is_exec(f):'
48 """check whether a file is executable"""
48 """check whether a file is executable"""
49 return (os.lstat(f).st_mode & 0100 != 0)
49 return (os.lstat(f).st_mode & 0100 != 0)
50
50
51 def set_flags(f, l, x):
51 def setflags(f, l, x):
52 s = os.lstat(f).st_mode
52 s = os.lstat(f).st_mode
53 if l:
53 if l:
54 if not stat.S_ISLNK(s):
54 if not stat.S_ISLNK(s):
@@ -87,7 +87,7 b' def sshargs(sshcmd, host, user, port):'
87 args = user and ("%s@%s" % (user, host)) or host
87 args = user and ("%s@%s" % (user, host)) or host
88 return port and ("%s %s %s" % (args, pflag, port)) or args
88 return port and ("%s %s %s" % (args, pflag, port)) or args
89
89
90 def set_flags(f, l, x):
90 def setflags(f, l, x):
91 pass
91 pass
92
92
93 def checkexec(path):
93 def checkexec(path):
General Comments 0
You need to be logged in to leave comments. Login now