You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"x::y"
A DAG range, meaning all commits that are descendants of x and ancestors
of y, including x and y themselves. If the first endpoint is left out,
this is equivalent to "ancestors(y)", if the second is left out it is
equivalent to "descendants(x)".
I wanted to rebase the two topmost commits back onto master. I expected the revset .^:: to be equivalent to "parent + self". Instead, I received a syntax error (I used log here, but I had the same error with rebase):
╰─○ sl log -r '.^::'
sl: parse error at 4: not a prefix: end
(.^::
^ here)
I tried to surround :: with spaces, but I had the same syntax error. The only way not to have a syntax error was to use the revset .^::..
The text was updated successfully, but these errors were encountered:
Summary:
The issue is that revset parser raised an error for `.^::`, the user's
expectation was something like `(.^)::`, but the current parser thinks `^` is
an infix in `.^::` [2], and then it tried to parse `::` as a prefix, and
eventually got the "not a prefix: end" error. I would agree with the user and
think `.^::` should be parsed as `(.^)::`.
I asked Yuya this question, the current parser can't recover from
the error while parsing. He suggested to backport a workaround from
https://www.mercurial-scm.org/repo/hg/rev/beb667c9880f.
This diff is to introduce that change to Sapling. Another potential fix might be
resolving this ambiguity in an ealier stage by checking token type after ^, so
we don't need the `_fixops` function to rewrite the tree, but that would need
more code.
Related issue: #612
Reviewed By: muirdm
Differential Revision: D45443282
fbshipit-source-id: 8eba6fbba76bdde5051342abc1d1c739eced2661
According to
sl help revset
:I wanted to rebase the two topmost commits back onto master. I expected the revset
.^::
to be equivalent to "parent + self". Instead, I received a syntax error (I used log here, but I had the same error with rebase):I tried to surround
::
with spaces, but I had the same syntax error. The only way not to have a syntax error was to use the revset.^::.
.The text was updated successfully, but these errors were encountered: