Patchwork revset: fixed bug where log -f was taking too long to return

login
register
mail settings
Submitter Lucas Moscovicz
Date Feb. 21, 2014, 9:17 p.m.
Message ID <ee2cb5dc57bce1196732.1393017446@dev1037.prn2.facebook.com>
Download mbox | patch
Permalink /patch/3733/
State Accepted
Commit fe220013e4db910d84bd052cd0a37a30b78bab15
Headers show

Comments

Lucas Moscovicz - Feb. 21, 2014, 9:17 p.m.
# HG changeset patch
# User Lucas Moscovicz <lmoscovicz@fb.com>
# Date 1393017377 28800
#      Fri Feb 21 13:16:17 2014 -0800
# Node ID ee2cb5dc57bce1196732071070309e03f112b2e1
# Parent  9ad6dae67845b3d106f233b16bdc207389ee9d19
revset: fixed bug where log -f was taking too long to return
Matt Mackall - Feb. 21, 2014, 9:32 p.m.
On Fri, 2014-02-21 at 13:17 -0800, Lucas Moscovicz wrote:
> # HG changeset patch
> # User Lucas Moscovicz <lmoscovicz@fb.com>
> # Date 1393017377 28800
> #      Fri Feb 21 13:16:17 2014 -0800
> # Node ID ee2cb5dc57bce1196732071070309e03f112b2e1
> # Parent  9ad6dae67845b3d106f233b16bdc207389ee9d19
> revset: fixed bug where log -f was taking too long to return

Queued for default, thanks.

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2197,9 +2197,13 @@ 
                 self._hiddenrevs)
 
     def __and__(self, x):
+        if isinstance(x, baseset):
+            x = x.set()
         return lazyset(self, lambda r: r in x)
 
     def __sub__(self, x):
+        if isinstance(x, baseset):
+            x = x.set()
         return lazyset(self, lambda r: r not in x)
 
     def __add__(self, x):