comparison contrib/convert-repo @ 4006:67982d3ee76c

symlinks: add flags param to wwrite Now wwrite can set symlink and exec for files
author Matt Mackall <mpm@selenic.com>
date Fri, 29 Dec 2006 20:04:31 -0600
parents 2b87d3c5ab8e
children 705d0792dbf2
comparison
equal deleted inserted replaced
4005:656e06eebda7 4006:67982d3ee76c
349 def getheads(self): 349 def getheads(self):
350 h = self.repo.changelog.heads() 350 h = self.repo.changelog.heads()
351 return [ hg.hex(x) for x in h ] 351 return [ hg.hex(x) for x in h ]
352 352
353 def putfile(self, f, e, data): 353 def putfile(self, f, e, data):
354 self.repo.wfile(f, "w").write(data) 354 self.repo.wwrite(f, data, e and 'x' or '')
355 if self.repo.dirstate.state(f) == '?': 355 if self.repo.dirstate.state(f) == '?':
356 self.repo.dirstate.update([f], "a") 356 self.repo.dirstate.update([f], "a")
357
358 util.set_exec(self.repo.wjoin(f), e)
359 357
360 def delfile(self, f): 358 def delfile(self, f):
361 try: 359 try:
362 os.unlink(self.repo.wjoin(f)) 360 os.unlink(self.repo.wjoin(f))
363 #self.repo.remove([f]) 361 #self.repo.remove([f])