# HG changeset patch # User David Soria Parra # Date 1380622829 -7200 # Node ID eddc2a2d57e6395eca2d6564192c45a863f03cab # Parent 57479e0d203d0006b09bf386f538424ca74d8509 localrepo: make report level in repo.transaction configurable repo.transaction always writes to stderr when a transaction aborts. In order to be able to abort a transaction quietly (e.g shelve needs a temporary view on the repo) we need to make the report level configurable. diff -r 57479e0d203d -r eddc2a2d57e6 mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Oct 01 17:00:03 2013 -0700 +++ b/mercurial/localrepo.py Tue Oct 01 12:20:29 2013 +0200 @@ -813,7 +813,7 @@ def wwritedata(self, filename, data): return self._filter(self._decodefilterpats, filename, data) - def transaction(self, desc): + def transaction(self, desc, report=None): tr = self._transref and self._transref() or None if tr and tr.running(): return tr.nest() @@ -825,8 +825,8 @@ self._writejournal(desc) renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] - - tr = transaction.transaction(self.ui.warn, self.sopener, + rp = report and report or self.ui.warn + tr = transaction.transaction(rp, self.sopener, self.sjoin("journal"), aftertrans(renames), self.store.createmode)