by
Changes to 7 files · Browse files at 8ada4f4e59d8 Showing diff from parent 2c0e887d8052 82fa505dabaa Diff from another changeset...
@@ -335,8 +335,12 @@ opts=diffopts):
buf.write(p)
buf.seek(0)
- header = record.parsepatch(buf)[0]
- return [header] + header.hunks
+ chunks = record.parsepatch(buf)
+ if chunks:
+ header = chunks[0]
+ return [header] + header.hunks
+ else:
+ return []
@pyqtSlot(QString, QString)
def displayFile(self, file, status):
|
@@ -169,10 +169,18 @@ self.contents = u''.join(out)
if not sactual:
sstatedesc = 'removed'
- self.flabel += _(' <i>(is a %s sub-repository)</i>' % sstatedesc)
+ lbl = {
+ 'changed': _('(is a changed sub-repository)'),
+ 'dirty': _('(is a dirty sub-repository)'),
+ 'new': _('(is a new sub-repository)'),
+ 'removed': _('(is a removed sub-repository)'),
+ 'changed and dirty': _('(is a changed and dirty sub-repository)'),
+ 'new and dirty': _('(is a new and dirty sub-repository)')
+ }[sstatedesc]
+ self.flabel += ' <i>' + lbl + '</i>'
if sactual:
- lbl = u' <a href="subrepo:%s">%s...</a>'
- self.flabel += lbl % (hglib.tounicode(srepo.root), _('open'))
+ lbl = _(' <a href="subrepo:%s">open...</a>')
+ self.flabel += lbl % hglib.tounicode(srepo.root)
except (EnvironmentError, error.RepoError, util.Abort), e:
self.error = _('Error previewing subrepo: %s') % \
hglib.tounicode(str(e))
|
@@ -398,6 +398,8 @@ self.goto(rev)
def revisionSelected(self, rev):
+ if rev is None or rev not in self.filerevmodel.graph.nodesdict:
+ return
if self.sender() is self.tableView_revisions_right:
side = 'right'
else:
|
@@ -46,7 +46,7 @@
self.createActions()
- self.doubleClicked.connect(self.fileActivated)
+ self.doubleClicked.connect(self.vdiff)
self._diff_dialogs = {}
self._nav_dialogs = {}
@@ -113,6 +113,8 @@
def fileActivated(self, index, alternate=False):
selFile = self.model().fileFromIndex(index)
+ if not self._actions['navigate'].isEnabled():
+ return
if alternate:
self.navigate(selFile)
else:
|
@@ -1080,7 +1080,7 @@ a.setIcon(qtlib.getmenuicon(icon))
a.triggered.connect(cb)
menu.addAction(a)
-
+
if 'transplant' in self.repo.extensions():
a = QAction(_('Transplant Selected to local'), self)
a.setIcon(qtlib.getmenuicon('hg-transplant'))
|
@@ -74,6 +74,10 @@ # ensure the patch contents are re-read
self._mtime = 0
+ @property
+ def substate(self):
+ return {} # unapplied patch won't include .hgsubstate
+
def __contains__(self, key):
return key in self._files
|
Loading...