mercurial/localrepo.py
changeset 5865 e7127f669edb
parent 5814 dd5a501cb97f
child 5907 afb7bdf11a61
--- a/mercurial/localrepo.py	Wed Jan 16 11:14:51 2008 -0600
+++ b/mercurial/localrepo.py	Wed Jan 16 11:32:25 2008 -0600
@@ -519,6 +519,10 @@
         if self._transref and self._transref():
             return self._transref().nest()
 
+        # abort here if the journal already exists
+        if os.path.exists(self.sjoin("journal")):
+            raise repo.RepoError(_("journal already exists - run hg recover"))
+
         # save dirstate for rollback
         try:
             ds = self.opener("dirstate").read()