[PATCH 1 of 4 nullrev] revset: drop unnecessary calls of getall() with empty argument

Yuya Nishihara yuya at tcha.org
Wed Mar 4 15:19:33 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1420875696 -32400
#      Sat Jan 10 16:41:36 2015 +0900
# Node ID a72a044114ebbbd63b6128b4784c34bddd0b7b4d
# Parent  4464f1ebd182587c44153ce7ec7d104aaccbcdc7
revset: drop unnecessary calls of getall() with empty argument

If x is None, getall(repo, subset, x) == subset.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -746,7 +746,7 @@ def destination(repo, subset, x):
     if x is not None:
         sources = getset(repo, fullreposet(repo), x)
     else:
-        sources = getall(repo, fullreposet(repo), x)
+        sources = fullreposet(repo)
 
     dests = set()
 
@@ -1347,7 +1347,7 @@ def origin(repo, subset, x):
     if x is not None:
         dests = getset(repo, fullreposet(repo), x)
     else:
-        dests = getall(repo, fullreposet(repo), x)
+        dests = fullreposet(repo)
 
     def _firstsrc(rev):
         src = _getrevsource(repo, rev)


More information about the Mercurial-devel mailing list