[PATCH] revset: introduce feature revset for tracking in-progress work (issue4968)
Andrew Halberstadt
halbersa at gmail.com
Tue Dec 1 00:02:47 UTC 2015
On 30/11/15 06:39 PM, Durham Goode wrote:
> On 11/26/15 5:31 PM, Andrew Halberstadt wrote:
>> # HG changeset patch
>> # User Andrew Halberstadt <ahalberstadt at mozilla.com>
>> # Date 1448490626 18000
>> # Wed Nov 25 17:30:26 2015 -0500
>> # Node ID 3545b0234e4884f57dac44fd4e443deac5b9d673
>> # Parent 61fbf5dc12b23e7a2a30cf04ebd9f096c42a1f61
>> revset: introduce feature revset for tracking in-progress work
>> (issue4968)
>>
>> The revset "only(<rev>) and not public()" is often used to track wip
>> features.
>> But this approach is simplistic and doesn't take things like merges,
>> obsolescence and bookmarks into account. This change formalizes a
>> 'feature()'
>> revset that can turn a set of revision specifications into all the
>> commits
>> within their associated feature branches.
>>
>> A commit C is in the feature ending at revision R if all of the
>> following
>> conditions are true:
>>
>> 1. C is R or C is an ancestor of R
>> 2. C is not public
>> 3. C is not a merge commit
>> 4. C is not obsolete
>> 5. no bookmarks exist in [C, R) for C != R
>> 6. all commits in (C, R) are also within R for C != R
>>
> This is awfully specific. What are the use cases that you want to use
> this revset for?
>
> #3 why exclude merge commits if they met all the other criteria?
> #5 this implies a certain usage of bookmarks (depending on what your
> use cases for feature() are)
Yeah, timeless is pretty much dead on with my reasoning. You're also
right about #5, it was designed to be used specifically with an
extension [1] I wrote for enabling a particular bookmark based workflow.
I understand if there's a desire to make the definition in core a little
less strict, e.g by dropping the bookmarks/merge bits. Though for me
personally, the bookmarks requirement is also the most useful part.
See the README of bookbinder for examples, but I use this regularly for
log, rebase, graft, incoming/outgoing + all the evolve commands.
[1] https://bitbucket.org/halbersa/bookbinder
More information about the Mercurial-devel
mailing list