[PATCH 2 of 2] Add qtip and qbase to mq qlookup

Brendan Cully brendan at kublai.com
Thu Jul 20 18:57:50 UTC 2006


# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1153421548 25200
# Node ID 967a2a40e33a390fec906e445944cf121129e3f7
# Parent  78debb310c11deb7e601ca63219c4b3780e18526
Add qtip and qbase to mq qlookup.

diff -r 78debb310c11 -r 967a2a40e33a hgext/mq.py
--- a/hgext/mq.py	Thu Jul 20 11:52:28 2006 -0700
+++ b/hgext/mq.py	Thu Jul 20 11:52:28 2006 -0700
@@ -1279,6 +1279,15 @@ def reposetup(ui, repo):
             return oldlookup(key)
         except hg.RepoError:
             q = repomap[repo]
+
+            qpatchnames = { 'qtip': -1, 'qbase': 0 }
+            if key in qpatchnames:
+                if len(q.applied) == 0:
+                    self.ui.warn('No patches applied\n')
+                    raise
+                patch = q.applied[qpatchnames[key]].split(':')[0]
+                return revlog.bin(patch)
+
             patch = q.isapplied(key)
             if not patch:
                 raise





More information about the Mercurial mailing list