Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repomodel: catch util.Abort from context methods

wctx.user() can raise an Abort if ui.username is not set. It's probably best that
a user's first experience isn't to see thg log implode.

Changeset 7517f1afa52e

Parent 7c16e57ec305

by Steve Borho

Changes to one file · Browse files at 7517f1afa52e Showing diff from parent 7c16e57ec305 Diff from another changeset...

 
14
15
16
17
 
18
19
20
 
111
112
113
114
 
 
 
 
115
116
117
 
14
15
16
 
17
18
19
20
 
111
112
113
 
114
115
116
117
118
119
120
@@ -14,7 +14,7 @@
 # this program; if not, write to the Free Software Foundation, Inc.,  # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.   -from mercurial import error +from mercurial import util, error    from tortoisehg.util.util import tounicode, Curry   @@ -111,7 +111,10 @@
  col = index.column()   if (row, col, role) in self._datacache:   return self._datacache[(row, col, role)] - result = meth(self, index, role) + try: + result = meth(self, index, role) + except util.Abort: + result = nullvariant   if result is not nullvariant:   self._datacache[(row, col, role)] = result   return result