diff mercurial/localrepo.py @ 4007:20da40cc1c73

symlinks: minimal support for symlinks in merge/update This will get angry, confused, and sad if you try to merge a symlink with a regular file.
author Matt Mackall <mpm@selenic.com>
date Fri, 29 Dec 2006 20:04:31 -0600
parents 67982d3ee76c
children dfe87137ed14 c3864dfb7812
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Dec 29 20:04:31 2006 -0600
+++ b/mercurial/localrepo.py	Fri Dec 29 20:04:31 2006 -0600
@@ -508,7 +508,10 @@
     def wwrite(self, filename, data, flags):
         data = self._filter("decode", filename, data)
         if "l" in flags:
-            os.unlink(self.wjoin(filename))
+            try:
+                os.unlink(self.wjoin(filename))
+            except OSError:
+                pass
             os.symlink(data, self.wjoin(filename))
         else:
             try: