[PATCH 2 of 2] revset: add 'only' to DoS-safe symbols

Yuya Nishihara yuya at tcha.org
Wed Dec 3 08:37:26 CST 2014


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1417615002 -32400
#      Wed Dec 03 22:56:42 2014 +0900
# Node ID e6dcb2a7f20fd5d803efad7eb8040a21e42c8b16
# Parent  4ede62983fac23ed1a23845b1a62483da3a5fcf0
revset: add 'only' to DoS-safe symbols

There is no reason to disable it in hgweb because the same query can be
written without using 'only()'.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1798,6 +1798,7 @@ safesymbols = set([
     "min",
     "modifies",
     "obsolete",
+    "only",
     "origin",
     "outgoing",
     "p1",


More information about the Mercurial-devel mailing list