Skip to content
Snippets Groups Projects
  1. Aug 14, 2017
  2. Aug 04, 2017
    • Jun Wu's avatar
      phabricator: add --amend option to phabsend · fa3aa6c9
      Jun Wu authored
      Previously `hg phabsend` was imitating `hg email` and won't mutate
      changesets. That works fine with reviewer-push workflow, reviewers run
      `phabread`, `import`.
      
      However, it does not work well with author-push workflow. Namely, the author
      needs to run extra commands to get the right commit message, and remove the
      local tag after push.
      
      This patch solves those issues by adding the `--amend` option, so local
      changesets will have the right commit message, and tags become unnecessary.
      
      Test Plan:
      Given the following DAG:
      
        o  17
        o  16
        | o  15
        | @  14
        |/
        o  13
        o  12
      
      Run `hg phabsend '(13::)-17'  --amend`, check the new DAG looks like:
      
      
        o  21
        | o  20
        | @  19
        |/
        o  18
        | o  17
        | x  16
        | x  13
        |/
        o  12
      
      And commit messages are updated to contain the `Differential Revision` lines.
      Use `phabread` to make sure Phabricator has the amended node recorded.
      
      Also check `phabsend .` followed by a `phabsend . --amend`, the commit
      message will be updated and the tag will be removed.
      
      Differential Revision: https://phab.mercurial-scm.org/D122
      fa3aa6c9
  3. Aug 11, 2017
    • Jun Wu's avatar
      rebase: rewrite core algorithm (issue5578) (issue5630) · 09755061
      Jun Wu authored
      "defineparents" is the core algorithm of rebase. The old code has too many
      tech debts (like outdated comments, confusing assertions, etc) and is very
      error-prone to be improved. This patch rewrites "defineparents" to make the
      code easier to reason about, and solve a bunch of issues, including:
      
        - Assertion error: no base found (demonstrated by D212, issue5578)
        - Asymmetric result (demonstrated by D211, "F with one parent")
        - Wrong new parent (demonstrated by D262, "C':A'A'")
        - "revlog index out of range" (demonstrated by D262, issue5630)
        - "nothing to merge" (demonstrated by D262)
      
      As a side effect, merge base decision has been made more solid - rebase now
      prints out explicitly what could go wrong when it cannot find a unique
      suitable merge base.
      
      .. fix:: Issue 5578, Issue 5630
      
         Core rebase algorithm has been rewritten to be more robust.
      
      Differential Revision: https://phab.mercurial-scm.org/D21
      09755061
  4. Aug 13, 2017
  5. Aug 12, 2017
  6. Aug 03, 2017
  7. Aug 04, 2017
  8. Aug 03, 2017
  9. Aug 04, 2017
  10. Aug 03, 2017
  11. Aug 02, 2017
    • Pulkit Goyal's avatar
      morestatus: move fb extension to core by plugging to `hg status --verbose` · 96f43981
      Pulkit Goyal authored
      morestatus extension in fbext use to show more context about the state of the
      repo like the repository is in a unfinished merge state, or a rebase is going
      on, or histedit is going on, listing the files which need to be resolved and
      also suggesting ways to handle the situation.
      
      This patch moves the extension directly to core by plugging it into the
      --verbose flag of the status command. So now if you are in any unfinished state
      and you do hg status -v, it will show you details and help related to the state.
      
      The extension in fbext also shows context about unfinished update state
      which is not ported to core as that plug in hooks to update command which need
      to be tackled somewhat differently.
      
      The following configuration will turn the behaviour on by default
      
      [commands]
      status.verbose = 1
      
      You can also skip considering some states like bisect as follows:
      
      [commands]
      status.skipstates=bisect
      
      This patch also adds test for the feature.
      
      .. feature::
      
         ``hg status -v`` can now show unfinished state. For example, when in
         an unfinished rebase state, ``hg status -v`` might show::
      
         # The repository is in an unfinished *rebase* state.
         # No unresolved merge conflicts.
         # To continue:                hg rebase --continue
         # To abort:                   hg rebase --abort
      
      Differential Revision: https://phab.mercurial-scm.org/D219
      96f43981
  12. Aug 09, 2017
  13. Aug 10, 2017
    • Jun Wu's avatar
      fsmonitor: correct an error message · dd35abc4
      Jun Wu authored
      Without the change, the error looks like:
      
        warning: Watchman unavailable: "watchman" executable not in PATH (%s),
        while executing [Errno 2] No such file or directory
      
      With the change, it now looks like:
      
        warning: Watchman unavailable: "watchman" executable not in PATH
        ([Errno 2] No such file or directory)
      
      Differential Revision: https://phab.mercurial-scm.org/D322
      dd35abc4
  14. Aug 11, 2017
    • Gregory Szorc's avatar
      sshpeer: make instance attributes and methods internal · 82d564d5
      Gregory Szorc authored
      Peer types are supposed to conform to a formal interface defined by
      peer.peerrepository and wireproto.wirepeer. Every "public" attribute on
      *peer types makes it harder to understand what attributes are part
      of the interface and what are instance specific.
      
      This commit converts a number of "public" instance attributes and
      methods on sshpeer to internal so they can't be confused to be part of
      the peer API.
      
      The URL-related instance attributes were introduced in 876333a295ff
      in 2005. AFAICT most of them aren't used and could potentially be
      removed. But I kept them around anyway.
      
      I also reorded some code to make things slightly easier to read.
      
      .. api::
      
         Rename attributes on sshpeer to reflect peer API
      
      Differential Revision: https://phab.mercurial-scm.org/D331
      82d564d5
  15. Aug 10, 2017
    • Gregory Szorc's avatar
      peer: remove non iterating batcher (API) · b47fe973
      Gregory Szorc authored
      The last use of this API was removed in b6e71f8af5b8 in 2016. While
      not formally deprecated, as of the last commit the code is no longer
      explicitly tested. I think the new API has existed long enough for
      people to transition to it.
      
      I also have plans to more formalize the peer API and removing batch()
      makes that work easier.
      
      I'm not convinced the current client-side API around batching is
      great. But it's the best we have at the moment.
      
      .. api:: remove peer.batch()
      
         Replace with peer.iterbatch().
      
      Differential Revision: https://phab.mercurial-scm.org/D320
      b47fe973
    • Gregory Szorc's avatar
      wireproto: overhaul iterating batcher code (API) · 4c706037
      Gregory Szorc authored
      The remote batching code is difficult to read. Let's improve it.
      
      As part of the refactor, the future returned by method calls on
      batchiter() instances is now populated. However, you still need to
      consume the results() generator for the future to be set.  But at
      least now we can stuff the future somewhere and not have to worry
      about aligning method call order with result order since you can
      use a future to hold the result.
      
      Also as part of the change, we now verify that @batchable generators
      yield exactly 2 values. In other words, we enforce their API.
      
      The non-iter batcher has been unused since b6e71f8af5b8. And to my
      surprise we had no explicit unit test coverage of it! test-batching.py
      has been overhauled to use the iterating batcher.
      
      Since the iterating batcher doesn't allow non-batchable method
      calls nor local calls, tests have been updated to reflect reality.
      The iterating batcher has been used for multiple releases apparently
      without major issue. So this shouldn't cause alarm.
      
      .. api::
      
         @peer.batchable functions must now yield exactly 2 values
      
      Differential Revision: https://phab.mercurial-scm.org/D319
      4c706037
    • Gregory Szorc's avatar
      wireproto: remove support for local results in @batchable (API) · e2fc2122
      Gregory Szorc authored
      @peer.batchable decorated generator functions have two forms:
      
          yield value, None
      
      and
      
          yield args, future
          yield value
      
      These forms have been present since the decorator was introduced.
      
      There are currently no in-repo consumers of the first form. So this
      commit removes support for it.
      
      Note that remoteiterbatcher.submit() asserts the 2nd form. And
      b6e71f8af5b8 removed the last user of remotebatcher, forcing everyone
      to remoteiterbatcher. So anything relying on this in the wild would
      have been broken since b6e71f8af5b8.
      
      .. api::
      
         @peer.batchable can no longer emit local values
      
      Differential Revision: https://phab.mercurial-scm.org/D318
      e2fc2122
    • Gregory Szorc's avatar
      wireproto: properly implement batchable checking · 297d1b70
      Gregory Szorc authored
      remoteiterbatcher (unlike remotebatcher) only supports batchable
      commands. This claim can be validated by comparing their
      implementations of submit() and noting how remoteiterbatcher assumes
      the invoked method has a "batchable" attribute, which is set by
      @peer.batchable.
      
      remoteiterbatcher has a custom __getitem__ that was trying to
      validate that only batchable methods are called. However, it was only
      validating that the called method exists, not that it is batchable.
      
      This wasn't a big deal since remoteiterbatcher.submit() would raise
      an AttributeError attempting to `mtd.batchable(...)`.
      
      Let's fix the check and convert it to ProgrammingError, which may
      not have been around when this was originally implemented.
      
      Differential Revision: https://phab.mercurial-scm.org/D317
      297d1b70
    • Gregory Szorc's avatar
      largefiles: remove remotestore.batch() · dcdc1755
      Gregory Szorc authored
      This method was added in 9e1616307c4c. AFAICT it didn't do anything at
      inception. If it did, there was no test coverage for it because
      changing it to raise doesn't fail any tests at that revision.
      
      b6e71f8af5b8 later refactored all remote.batch() calls to
      remote.iterbatch(). So if this was somehow used, it isn't called
      any more because there are no calls to .batch() remaining in the
      repo.
      
      I suspect the original patch author got confused by the distinction
      between the peer/remote interface and the largefiles store. The lf
      store is a gateway to a peer instance. It exposes additional
      lf-specific methods to execute against a peer. However, it is not
      a peer and doesn't need to implement batch() because peer itself
      does that.
      
      Differential Revision: https://phab.mercurial-scm.org/D316
      dcdc1755
  16. Aug 11, 2017
  17. Jul 31, 2017
  18. May 21, 2017
  19. Jul 31, 2017
  20. Jun 30, 2017
Loading