1. 01 Jul, 2020 1 commit
  2. 16 Oct, 2020 1 commit
  3. 23 Oct, 2020 1 commit
  4. 16 Oct, 2020 7 commits
  5. 15 Oct, 2020 1 commit
  6. 09 Sep, 2020 1 commit
  7. 04 Oct, 2020 1 commit
    • Yuya Nishihara's avatar
      scmutil: move walkchangerevs() from cmdutil · 508dfd1c18df
      Yuya Nishihara authored
      It's no longer a command-level function, but a pure helper to walk revisions
      in a windowed way. This change will help eliminate reverse dependency of
      revset.py -> grep.py -> cmdutil.py in future patches.
  8. 09 Sep, 2020 7 commits
  9. 10 Sep, 2020 3 commits
  10. 12 Sep, 2020 1 commit
    • Yuya Nishihara's avatar
      log: introduce struct that carries log traversal options · c1d0f83d62c4
      Yuya Nishihara authored
      I tried to refactor logcmdutil.getrevs() without using an options struct,
      but none of these attempts didn't work out. Since every stage of getrevs()
      needs various log command options (e.g. both matcher and revset query need
      file patterns), it isn't possible to cleanly split getrevs() into a command
      layer and a core logic.
      So, this patch introduces a named struct to carry command options in slightly
      abstracted way, which will be later used by "hg grep" and "hg churn". More
      fields will be added to the walkopt struct.
      Type hints aren't verified. I couldn't figure out how to teach pytype to
      load its own attr type stubs in place of our .thirdparty.attr. Conditional
      import didn't work. s/^from \.thirdparty // is the only way I found pytype
      could parse the @attr.ib decorator.
  11. 21 Sep, 2020 2 commits
  12. 18 Sep, 2020 2 commits
  13. 09 Jul, 2020 1 commit
  14. 23 Jun, 2020 1 commit
  15. 02 Jun, 2020 1 commit
    • Yuya Nishihara's avatar
      graft: fix --base value to be saved in state file · 2dc5ae953c4a
      Yuya Nishihara authored
      'True' just works because it is treated as an integer revision '1' and
      only the truthiness of the basectx is important. If multiple source revisions
      were supported with --base, the resumed graft operation would go wrong.
      branch : stable
  16. 26 May, 2020 1 commit
  17. 10 Sep, 2020 2 commits
  18. 09 Sep, 2020 1 commit
    • Yuya Nishihara's avatar
      grep: fix hash(linestate) to not include linenum · e47385ef4e17
      Yuya Nishihara authored
      linestate.__eq__() just compares the line values whereas __hash__() does
      hash both self.line and self.linenum, which violates the rule. __hash__()
      was added at fb502719c75c, "python 2.6 compatibility: add __hash__ to
      classes that have __eq__" with no additional remarks, so this would probably
      be a simple mistake.
      The test output changed because difflib.SequenceMatcher() internally uses
      a dict. As you can see, the line "export" is unchanged at the revision 2,
      so the new output is correct.
  19. 10 Aug, 2020 1 commit
    • Pulkit Goyal's avatar
      mergestate: use _stateextras instead of merge records for commit related info · 0652a533fe3c
      Pulkit Goyal authored
      There is a set of information related to a merge which is needed on commit. We
      want to store such information in the mergestate so that we can read it while
      For this purpose, we are using merge records and introduced a merge
      entry state for that. However this won't scale and is not clean way to implement
      This patch reworks the existing logic related to this to use _stateextras and
      read from it.
      Right now the information stored is not very descriptive but it will be in next
      Using _stateextras also makes MERGE_RECORD_MERGED_OTHER useless and only to be
      kept for BC.
      Differential Revision: https://phab.mercurial-scm.org/D8920
  20. 11 Aug, 2020 1 commit
    • Martin von Zweigbergk's avatar
      revert: remove dangerous `parents` argument from `cmdutil.revert()` · 8c466bcb0879
      Martin von Zweigbergk authored
      As we found out the hard way (thanks to spectral@ for figuring it
      out!), `cmdutil.revert()`'s `parents` argument must be
      `repo.dirstate.parents()` or things may go wrong. We had an extension
      that passed in the target commit as the first parent. The `hg split`
      command from the evolve extension seems to have made the same mistake,
      but I haven't looked carefully.
      The problem is that `cmdutil._performrevert()` calls
      `dirstate.normal()` on reverted files if the commit to revert to
      equals the first parent. So if you pass in `ctx=foo` and
      `parents=(foo.node(), nullid)`, then `dirstate.normal()` will be
      called for the revert files, even though they might not be clean in
      the working copy.
      There doesn't seem to be any reason, other than a tiny performance
      benefit, to passing the `parents` around instead of looking them up
      again in `cmdutil._performrevert()`, so that's what this patch does.
      Differential Revision: https://phab.mercurial-scm.org/D8925
  21. 28 Jul, 2020 1 commit
  22. 16 Jul, 2020 1 commit
  23. 14 Apr, 2020 1 commit