by
Changes to 4 files · Browse files at 9ace2e1fb761 Showing diff from parent a51b7122e2ce 0864d6ac64c5 Diff from another changeset...
@@ -150,16 +150,7 @@ out.append(_('New subrepository') + u'\n\n')
elif srev != sactual:
sstatedesc = 'changed'
- out.append(_('Revision has changed from:') + u'\n\n')
- opts = {'date':None, 'user':None, 'rev':[srev]}
- _ui.pushbuffer()
- commands.log(_ui, srepo, **opts)
- out.append(hglib.tounicode(_ui.popbuffer()))
- out.append(_('To:') + u'\n')
- opts['rev'] = [sactual]
- _ui.pushbuffer()
- commands.log(_ui, srepo, **opts)
- out.append(hglib.tounicode(_ui.popbuffer()))
+ out += genSubrepoRevChangedDescription(srev, sactual)
self.contents = u''.join(out)
self.flabel += _(' <i>(is a %s sub-repository)</i>' % sstatedesc)
lbl = u' <a href="subrepo:%s">%s...</a>'
|
@@ -101,17 +101,18 @@
# Add the list of modified subrepos to the top of the list
if not isinstance(self._ctx, patchctx.patchctx):
- from mercurial import subrepo
- for s, sd in self._ctx.substate.items():
- srev = self._ctx.substate.get(s, subrepo.nullstate)[1]
- sp1rev = self._ctx.p1().substate.get(s, subrepo.nullstate)[1]
- sp2rev = ''
- if ismerge:
- sp2rev = self._ctx.p2().substate.get(s, subrepo.nullstate)[1]
- if srev != sp1rev or (sp2rev != '' and srev != sp2rev):
- wasmerged = ismerge and s in ctxfiles
- files.append({'path': s, 'status': 'S', 'parent': parent,
- 'wasmerged': wasmerged})
+ if ".hgsubstate" in ctxfiles or ".hgsub" in ctxfiles:
+ from mercurial import subrepo
+ for s, sd in self._ctx.substate.items():
+ srev = self._ctx.substate.get(s, subrepo.nullstate)[1]
+ sp1rev = self._ctx.p1().substate.get(s, subrepo.nullstate)[1]
+ sp2rev = ''
+ if ismerge:
+ sp2rev = self._ctx.p2().substate.get(s, subrepo.nullstate)[1]
+ if srev != sp1rev or (sp2rev != '' and srev != sp2rev):
+ wasmerged = ismerge and s in ctxfiles
+ files.append({'path': s, 'status': 'S', 'parent': parent,
+ 'wasmerged': wasmerged})
if self._fulllist and ismerge:
func = lambda x: True
|
@@ -438,7 +438,6 @@ self.setContextMenuPolicy(Qt.CustomContextMenu)
self.customContextMenuRequested.connect(self.menuRequested)
self.setTextElideMode(Qt.ElideLeft)
- self.setItemDelegate(WctxItemDelegate())
def scrollTo(self, index, hint=QAbstractItemView.EnsureVisible):
# don't update horizontal position by selection change
@@ -723,18 +722,6 @@ def getChecked(self):
return self.checked.copy()
-class WctxItemDelegate(QItemDelegate):
- '''Draw treeview checkboxes like standard QCheckBoxes'''
- def drawCheck(self, painter, option, rect, state):
- option.rect = rect
- if state == Qt.Unchecked:
- option.state |= QStyle.State_Off
- elif state == Qt.Checked:
- option.state |= QStyle.State_On
- style = QApplication.style()
- primitive = QStyle.PE_IndicatorCheckBox
- return style.drawPrimitive(primitive, option, painter, None)
-
def statusMessage(status, mst, upath):
tip = ''
if status in statusTypes:
|
Loading...