Add qtip and qbase to mq qlookup.
authorBrendan Cully <brendan@kublai.com>
Thu, 20 Jul 2006 11:52:28 -0700
changeset 2664 9b8df8dceeed
parent 2663 96950d39171d
child 2665 2efcd2b4c9fe
child 2702 133811a7688b
Add qtip and qbase to mq qlookup.
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 @@
             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