Mercurial > hg
comparison mercurial/transaction.py @ 5865:e7127f669edb
transactions: don't show a backtrace when journal exists
Now we simply print a message on how to recover.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 16 Jan 2008 11:32:25 -0600 |
parents | 6b4127c7d52a |
children | 53ed9b40cfc4 |
comparison
equal
deleted
inserted
replaced
5864:88783c8b5660 | 5865:e7127f669edb |
---|---|
15 import os | 15 import os |
16 | 16 |
17 class transaction(object): | 17 class transaction(object): |
18 def __init__(self, report, opener, journal, after=None): | 18 def __init__(self, report, opener, journal, after=None): |
19 self.journal = None | 19 self.journal = None |
20 | |
21 # abort here if the journal already exists | |
22 if os.path.exists(journal): | |
23 raise AssertionError(_("journal already exists - run hg recover")) | |
24 | 20 |
25 self.count = 1 | 21 self.count = 1 |
26 self.report = report | 22 self.report = report |
27 self.opener = opener | 23 self.opener = opener |
28 self.after = after | 24 self.after = after |