# HG changeset patch
# User Mads Kiilerich <mad...@unity3d.com>
# Date 1476726516 -7200
#      Mon Oct 17 19:48:36 2016 +0200
# Node ID 50a7bbe82bd3b63a934640b1480ee643cf14ec5f
# Parent  5cb830801855dbb63e98b948e355bc995d295bf3
revset: optimize for destination() being "inefficient"

destination() will scan through the whole subset and read extras for each
revision to get its source.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2594,7 +2594,7 @@ def _optimize(x, small):
         f = getsymbol(x[1])
         wa, ta = _optimize(x[2], small)
         if f in ('author', 'branch', 'closed', 'date', 'desc', 'file', 'grep',
-                 'keyword', 'outgoing', 'user'):
+                 'keyword', 'outgoing', 'user', 'destination'):
             w = 10 # slow
         elif f in ('modifies', 'adds', 'removes'):
             w = 30 # slower
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to