[PATCH 2 of 3 v2] tests: use histedit helpers
timeless
timeless at gmail.com
Tue Mar 1 14:26:16 EST 2016
Augie Fackler wrote:
> Hm. Your heart is in the right place,
I did it because there's another patch where I'm rewriting most of
these hashes...
> but I'm not crazy about the specific implementation.
> We've talked about /having/ limited undocumented revset support
> in histedit - would you be interested in doing that work
I like the general idea, but don't have the focus for it now.
> and then moving most (but not all, as we still need some tests
> that use hashes explicitly)
I left a couple of tests with explicit hashes (very very very few)
> of the tests to that without the helpers?
At some future point...
I'd have to think about it a bit more. One problem is that the
"primary" ui for histedit is a text editor, where it doesn't really
make sense to use a revset (revsets can be surprising, as I learned
when I tried to use them here).
> As an alternative, I'd be interested in some sort of plan filter
> helper, that did something like:
>
> while read line ; do
> action=`cut -d' ' -f 1 $line`
> revset=`cut -d' ' -f 2 $line`
> revsision=`hg log -r "$revset" --template '{node}'`
> echo $action $revision
> done
>
> That is, write a filter that does revset->hash transformation on a
> flat file, rather than having this stateful-shell-function-helper
> shenanigans. What do you think?
This seems reasonable. Is it ok for it to be shell?
More information about the Mercurial-devel
mailing list