martinvonz abandoned this revision. martinvonz added a comment.
I think I've now convinced myself that this won't work. Consider these statements: 1. A revset should resolve to the same revisions whatever command it's passed to 2. `hg co X` should check out the "best" node with name X 3. `hg co X^` should check out the parent of the commit checked out by `hg co X` 4. `hg log -r X` should include all commits in X It doesn't seem to me like we can have all of them. We currently have 1, 2, and 3. I think I originally would have made it so we had 1, 3, and 4 (because `singlenode()` picked the highest revision returned from `namemap()`). Then I sent https://phab.mercurial-scm.org/D3852 because I wanted to preserve 2, but then I realized that that would instead break 3 (because it would be calling `singlenode()` directly from `revsingle()`, but calling `namemap()` from the revset code). I really don't want to break 1. We could break 2 by requiring a revset to have exactly one revision in `revsingle()`. Imagine we have a `best(name)` revset that resolved to the best node given the name (so e.g. `best(stable)` would find the highest revision on unclosed heads of the stable branch). One would then have to do `hg co 'best(stable)'`, or we could use a `~` suffix (as Yuya suggested for the opposite thing). I think that sounds pretty reasonable, but we obviously can't do that because of BC. Therefore, my conclusion is that we'll have to live with breaking 4 (as we already do), so I'll abandon this patch. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3715 To: martinvonz, #hg-reviewers, durin42 Cc: yuja, durin42, smf, lothiraldan, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel