Often when I want rebase in histedit, I just know a symbolic name for the revision I want to base my changes on. I'd like to be able to specify it directly, without having to look it up and copy the node.
This should be easy if someone wants to tackle it (it's bugged me too, so I'd be an enthusiastic mentor if someone wants to get into hg patching)
Hey Augie, I would like to contribute, can you guide me?
Sure. I think the change needs to happen in here: def verify(self, prev, expected, seen): """ Verifies semantic correctness of the rule""" repo = self.repo ha = node.hex(self.node) try: self.node = repo[ha].node() except error.RepoError: raise error.ParseError(_('unknown changeset %s listed') % ha[:12]) if self.node is not None: self._verifynodeconstraints(prev, expected, seen) (hgext/histedit.py, around line 440). Specifically, the repo[ha].node() needs to switch to something else, probably mercurial.scmutil.revsingle(ha).node()? Then some testing needs to be added in one of the tests/test*histedit*.t files. Those test files are "literate" shell scripts - hopefully the format is self-documenting, but if it's not let me know and I'll see about documenting it some more. Is that enough to get started? Once you're ready, follow the steps on https://www.mercurial-scm.org/wiki/ContributingChanges (Phabricator is probably easiest for you, but if you want to try email that's great) to send the patch to us for review. Don't be shy about sending something that's not perfect: we've all been new to programming and still make mistakes on a regular basis, and we're happy to help you learn.
Hey Augie, I have been working on this, Just to be sure of the problem, we want to be able to do stuff like : "pick 5 adds a.py" "pick 6 adds b.py" and not just : "pick 1de6393a6654 adds a.py" "pick 8f2c447dce28 adds b.py" Am I correct?
(In reply to Sangeet Kumar Mishra from comment #4) Nope, this isn't about specifying revisions in the plan -- it's about specifying the base revision on the command line, i.e. `hg histedit REV`. That REV should be able to accept a revset.
Kevin, it's also about the `base` verb in the commands list. I think that one should take a revset, but probably not the other ones (eg pick and roll). Does that make sense?
(In reply to Kevin Bullock from comment #5) But it does accept REVSET from the command line. ie if my log history is : changeset: 2:2543d74b14d5 tag: tip user: Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> date: Wed Feb 14 00:56:56 2018 +0530 summary: adds c changeset: 1:c364c46f4a04 user: Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> date: Wed Feb 14 00:56:34 2018 +0530 summary: adds b changeset: 0:51ebae99897b user: Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> date: Wed Feb 14 00:56:03 2018 +0530 summary: added a.py Then, $hg histedit 0 | it does work!
(In reply to Augie Fackler from comment #6) Issue fixed in https://phab.mercurial-scm.org/D2394
Fixed by https://mercurial-scm.org/repo/hg/rev/3d3cff1f6bde Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> histedit: make histedit's commands accept revsets (issue5746) Earlier the code was only looking for rulehashes and neglecting all other revision identifiers, this code intercepts the fromrule function and calls scmutil.revsingle() on anything that is not a rulehash and then obtains the rulehash from the changectx object returned, rest of the pipeline follows as it was Differential Revision: https://phab.mercurial-scm.org/D2394 (please test the fix)
Bug was set to TESTING for 7 days, resolving