Changeset 5e6ef5487747…
Parent 0c7c034bd870…
by
Changes to 2 files · Browse files at 5e6ef5487747 Showing diff from parent 0c7c034bd870 Diff from another changeset...
@@ -80,7 +80,9 @@ self.patchq = QComboBox()
self.patchq.currentIndexChanged.connect(self.updatestatus)
self.patchq.addItem('repository')
- self.patchq.addItem('patches')
+ cur = hglib.getcurrentqqueue(self.repo)
+ if cur:
+ self.patchq.addItem(cur)
statbox.addWidget(self.patchq)
grid.addItem(statbox, 3, 1)
|
@@ -213,6 +213,15 @@ else:
return []
+def getcurrentqqueue(repo):
+ """Return the name of the current patch queue."""
+ if not hasattr(repo, 'mq'):
+ return None
+ cur = os.path.basename(repo.mq.path)
+ if cur.startswith('patches-'):
+ cur = cur[8:]
+ return cur
+
def diffexpand(line):
'Expand tabs in a line of diff/patch text'
if _tabwidth is None:
|
Loading...