Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

Merge with stable

Changeset 2c0e887d8052

Parents b4e308ec289f

Parents 05bba35d2b7a

by Steve Borho

Changes to 4 files · Browse files at 2c0e887d8052 Showing diff from parent b4e308ec289f 05bba35d2b7a Diff from another changeset...

 
159
160
161
 
162
163
164
165
166
167
 
 
168
169
170
 
159
160
161
162
163
164
165
166
 
 
167
168
169
170
171
@@ -159,12 +159,13 @@
  subrepochange, sstatedesc = genSubrepoRevChangedDescription(sparent, srev)   out += subrepochange   else: + sstatedesc = 'dirty'   if srev != sactual:   subrepochange, sstatedesc = \   genSubrepoRevChangedDescription(srev, sactual)   out += subrepochange - if data: - sstatedesc += ' and dirty' + if data: + sstatedesc += ' and dirty'   self.contents = u''.join(out)   if not sactual:   sstatedesc = 'removed'
 
19
20
21
22
 
23
24
25
 
31
32
33
34
 
 
35
36
37
 
237
238
239
240
241
242
243
 
 
 
 
 
 
 
 
 
 
 
 
244
245
 
246
247
248
 
 
249
250
251
 
19
20
21
 
22
23
24
25
 
31
32
33
 
34
35
36
37
38
 
238
239
240
 
 
 
 
241
242
243
244
245
246
247
248
249
250
251
252
253
 
254
255
 
 
256
257
258
259
260
@@ -19,7 +19,7 @@
 from tortoisehg.util import hglib  from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt import qtlib, visdiff, revert -from tortoisehg.hgqt.filedialogs import FileLogDialog, FileDiffDialog +from tortoisehg.hgqt.filedialogs import FileLogDialog, FileDiffDialog    from PyQt4.QtCore import *  from PyQt4.QtGui import * @@ -31,7 +31,8 @@
    fileSelected = pyqtSignal(QString, QString)   clearDisplay = pyqtSignal() - contextmenu = None + filecontextmenu = None + subrepocontextmenu = None     def __init__(self, parent=None):   QTableView.__init__(self, parent) @@ -237,15 +238,23 @@
  self.addAction(act)     def contextMenuEvent(self, event): - if not self.contextmenu: - self.contextmenu = QMenu(self) - for act in ['diff', 'ldiff', 'edit', 'ledit', 'revert', - 'navigate', 'diffnavigate']: + itemissubrepo = self.currentFile() in self.model()._ctx.substate.keys() + # Subrepos and regular items have different context menus + if itemissubrepo: + contextmenu = self.subrepocontextmenu + actionlist = [] + else: + contextmenu = self.filecontextmenu + actionlist = ['diff', 'ldiff', 'edit', 'ledit', 'revert', + 'navigate', 'diffnavigate'] + if not contextmenu: + contextmenu = QMenu(self) + for act in actionlist:   if act: - self.contextmenu.addAction(self._actions[act]) + contextmenu.addAction(self._actions[act])   else: - self.contextmenu.addSeparator() - self.contextmenu.exec_(event.globalPos()) + contextmenu.addSeparator() + contextmenu.exec_(event.globalPos())     def resizeEvent(self, event):   if self.model() is not None:
Show Entire File tortoisehg/​hgqt/​fileview.py Stacked
(No changes)
 
417
418
419
420
 
421
422
423
 
417
418
419
 
420
421
422
423
@@ -417,7 +417,7 @@
  wctx.dirtySubrepos.append(s)   except EnvironmentError, e:   self.showMessage.emit(hglib.tounicode(str(e))) - except (error.RepoLookupError, error.ConfigError), e: + except (error.LookupError, error.RepoError, error.ConfigError), e:   self.showMessage.emit(hglib.tounicode(str(e)))   except util.Abort, e:   if e.hint: