mercurial/localrepo.py
changeset 16253 17f179805297
parent 16236 97efd26eb957
parent 16243 b9c4302310e5
child 16361 6097ede2be4d
--- a/mercurial/localrepo.py	Wed Mar 07 01:02:12 2012 +0100
+++ b/mercurial/localrepo.py	Mon Mar 12 17:05:42 2012 -0500
@@ -781,11 +781,12 @@
         self.opener.write("journal.desc",
                           "%d\n%s\n" % (len(self), desc))
 
-        bkname = self.join('bookmarks')
-        if os.path.exists(bkname):
-            util.copyfile(bkname, self.join('journal.bookmarks'))
-        else:
-            self.opener.write('journal.bookmarks', '')
+        try:
+            bk = self.opener.read("bookmarks")
+        except IOError:
+            bk = ""
+        self.opener.write("journal.bookmarks", bk)
+
         phasesname = self.sjoin('phaseroots')
         if os.path.exists(phasesname):
             util.copyfile(phasesname, self.sjoin('journal.phaseroots'))