histselect.py currently relies on the default format for `hg log`
being unchanged. I tried fixing this by passing the --template option
to _do_hg_cmd(). Then I fixed the latter's handling of options (were
simply ignored). However, when launched from the "Browse..." button in
the update dialog, it now only shows history starting from current
tip, not the entire history. This is because the --rev option is now
actually used in _do_hg_cmd().

What's the grand picture behind passing a rev range to this dialog?

Here's the patch so far:

diff --git a/hggtk/histselect.py b/hggtk/histselect.py
--- a/hggtk/histselect.py
+++ b/hggtk/histselect.py
@@ -125,7 +125,11 @@
     def _get_hg_history(self, rev=None, limit=10):
         # get history
         options = {}
-        if rev: options['rev'] = [rev]
+        options['template'] = ('changeset: {rev}:{node|short}\n' +
+                               '{branches}{tags}{parents}user: {author}\n' +
+                               'date: {date|date}\n' +
+                               'summary: {desc|firstline}\n\n')
+        if rev: options['rev'] = rev
         if limit: options['limit'] = limit
         self._do_hg_cmd('log', options)

@@ -177,7 +181,10 @@
         try:
             q = Queue.Queue()
             args = [cmd] + [os.path.join(self.root, x) for x in self.files]
-            hglib.hgcmd_toq(self.root, q, *args, **{})
+            for name, value in options.items():
+                args.append("--%s" % name)
+                args.append("%s" % value)
+            hglib.hgcmd_toq(self.root, q, *args)
             out = ''
             while q.qsize(): out += q.get(0)
             self.hgout = out

-parren

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to