Please check out the revset feature

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Tue Jun 8 09:00:27 CDT 2010


On Tue, Jun 8, 2010 at 3:23 PM, Peter Arrenbrecht
<peter.arrenbrecht at gmail.com> wrote:
> On Tue, Jun 8, 2010 at 3:06 PM, Peter Arrenbrecht
> <peter.arrenbrecht at gmail.com> wrote:
>> On Mon, Jun 7, 2010 at 6:16 PM, Matt Mackall <mpm at selenic.com> wrote:
>>> Last week I pushed the revset feature to default. It's available
>>> wherever revision ranges were previously supported. It's quite complex
>>> and needs some testing. (And yes, there are currently no tests or docs!)
>>> ...
>>>  x - y  -> x & !y
>>
>> This seems to break branch names with dashes in them, as in:
>>
>>  hg glog --rev p-root:tip
>
> I wonder if the following diff suggests that this will not be treated
> as a regression.
>
> $ hg diff -c e581f3ac tests
> diff --git a/tests/test-bookmarks b/tests/test-bookmarks
> --- a/tests/test-bookmarks
> +++ b/tests/test-bookmarks
> @@ -82,7 +82,7 @@
>  hg bookmarks
>
>  echo % look up stripped bookmark name
> -hg log -r 'x  y'
> +hg log -r '"x  y"'
>
>  echo % reject bookmark name with newline
>  hg bookmark '

Just chatted with hstuart a bit. Ideas:

* Require spaces around operators.

* Make 'with-dash' first look up the name "with-dash". If there is no
such name, fall back on the expression 'with - dash'. To be on the
safe side, one could use spaces to force ' - ' to be an operator.

* Accept this as changed behaviour, but at least explicitly specify _
to never become an operator.

-parren


More information about the Mercurial-devel mailing list