branching: merge with stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 14 Oct 2017 19:06:06 +0200
changeset 3071 472a67075756
parent 3070 9a223c3adb9d (current diff)
parent 3069 1893bde71ebc (diff)
child 3072 ec97e7b11119
branching: merge with stable
CHANGELOG
README
hgext3rd/evolve/obshistory.py
hgext3rd/topic/__init__.py
--- a/CHANGELOG	Sat Oct 14 18:56:42 2017 +0200
+++ b/CHANGELOG	Sat Oct 14 19:06:06 2017 +0200
@@ -8,6 +8,15 @@
 
   * topic: fix handling of bookmarks and phases while changing topics.
 
+6.7.2 -- in progress
+----------------
+
+  * pager: pager support to `obslog` and `evolve --list`
+
+topic(0.3.2)
+
+  * pager: pager support to `topics` and `stack`
+
 6.7.1 -- 2017-10-10
 -------------------
 
--- a/hgext3rd/evolve/__init__.py	Sat Oct 14 18:56:42 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Sat Oct 14 19:06:06 2017 +0200
@@ -1523,6 +1523,7 @@
     troublecategories = ['phasedivergent', 'contentdivergent', 'orphan']
     specifiedcategories = [t for t in troublecategories if opts[t]]
     if listopt:
+        compat.startpager(ui, 'evolve')
         listtroubles(ui, repo, specifiedcategories, **opts)
         return
 
--- a/hgext3rd/evolve/compat.py	Sat Oct 14 18:56:42 2017 +0200
+++ b/hgext3rd/evolve/compat.py	Sat Oct 14 19:06:06 2017 +0200
@@ -172,3 +172,8 @@
 
 if not util.safehasattr(obsolete, '_computephasedivergentset'):
     obsolete._computephasedivergentset = obsolete.cachefor('phasedivergent')(obsolete._computebumpedset)
+
+def startpager(ui, cmd):
+    """function to start a pager in case ui.pager() exists"""
+    if util.safehasattr(ui, 'pager'):
+        ui.pager(cmd)
--- a/hgext3rd/evolve/obshistory.py	Sat Oct 14 18:56:42 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Sat Oct 14 19:06:06 2017 +0200
@@ -66,6 +66,7 @@
 
     Returns 0 on success.
     """
+    compat.startpager(ui, 'obslog')
     revs = list(revs) + opts['rev']
     if not revs:
         revs = ['.']
--- a/hgext3rd/topic/__init__.py	Sat Oct 14 18:56:42 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Sat Oct 14 19:06:06 2017 +0200
@@ -462,6 +462,8 @@
         # Have some restrictions on the topic name just like bookmark name
         scmutil.checknewlabel(repo, topic, 'topic')
 
+    compat.startpager(ui, 'topics')
+
     if list:
         if clear or rev:
             raise error.Abort(_("cannot use --clear or --rev with --list"))
@@ -541,6 +543,7 @@
         topic = repo.currenttopic
     if topic is None:
         branch = repo[None].branch()
+    compat.startpager(ui, 'stack')
     return stack.showstack(ui, repo, branch=branch, topic=topic, opts=opts)
 
 @command('debugcb|debugconvertbookmark', [
--- a/hgext3rd/topic/compat.py	Sat Oct 14 18:56:42 2017 +0200
+++ b/hgext3rd/topic/compat.py	Sat Oct 14 19:06:06 2017 +0200
@@ -22,3 +22,10 @@
     getmarkers = obsolete.getmarkers
 if successorssets is None:
     successorssets = obsolete.successorssets
+
+def startpager(ui, cmd):
+    """function to start a pager in case ui.pager() exists"""
+    try:
+        ui.pager(cmd)
+    except AttributeError:
+        pass