mercurial/localrepo.py
changeset 6877 1d38f3605b20
parent 6875 0d714a48ab53
child 6884 11229144aa01
child 7063 be2daa324ddf
equal deleted inserted replaced
6875:0d714a48ab53 6877:1d38f3605b20
   560         data = self._filter("decode", filename, data)
   560         data = self._filter("decode", filename, data)
   561         try:
   561         try:
   562             os.unlink(self.wjoin(filename))
   562             os.unlink(self.wjoin(filename))
   563         except OSError:
   563         except OSError:
   564             pass
   564             pass
   565         self.wopener(filename, 'w').write(data)
   565         if 'l' in flags:
   566         util.set_flags(self.wjoin(filename), flags)
   566             self.wopener.symlink(data, filename)
       
   567         else:
       
   568             self.wopener(filename, 'w').write(data)
       
   569             if 'x' in flags:
       
   570                 util.set_flags(self.wjoin(filename), False, True)
   567 
   571 
   568     def wwritedata(self, filename, data):
   572     def wwritedata(self, filename, data):
   569         return self._filter("decode", filename, data)
   573         return self._filter("decode", filename, data)
   570 
   574 
   571     def transaction(self):
   575     def transaction(self):