Skip to content
Snippets Groups Projects
  1. Mar 24, 2017
  2. Mar 12, 2017
    • Durham Goode's avatar
      rebase: move state serialization to use unfiltered repo · 91ddb33d
      Durham Goode authored
      Now that rebasestate is serialized as part of the transaction, the repo state it
      sees is the version at the end of the transaction, which may have hidden nodes.
      Therefore, it's possible parts of the rebase commit set are no longer visible by
      the time the transaction is closing, which causes a filtered revision error in
      this code. I don't think state serialization should be blocked from accessing
      commits it knows exist, especially if all it's trying to do is get the hex of
      them, so let's use an unfiltered repo here.
      
      Unfortunately, the only known repro is with the fbamend Facebook extension, so
      I'm not sure how to repro it in core Mercurial for a test.
      91ddb33d
  3. Mar 24, 2017
  4. Mar 20, 2017
  5. Mar 24, 2017
  6. Mar 19, 2017
  7. Mar 23, 2017
  8. Mar 19, 2017
  9. Mar 23, 2017
  10. Mar 24, 2017
  11. Mar 23, 2017
  12. Mar 20, 2017
    • Matt Harbison's avatar
      pager: fix the invocation of `more` on Windows · c5d924e5
      Matt Harbison authored
      After 9335dc6b2a9c, with 'shell' being (mostly) set to False, invoking `more` no
      longer worked.  Instead, a warning was printed and the pager was disabled.
      Invoking `more.com` works.  Since a user may have configured 'pager.pager=more',
      do this substitution at the end.  Surprisingly, `more` does allow for arguments,
      so those are preserved.  This also allows `more` to work in MSYS.
      
      Setting 'shell=False' runs the executable via CreateProcess(), which has rather
      wonky rules for resolving an executable without an extension [1].  Resolving to
      *.com is not among them.  Since 'shell=True' yields a cryptic error for a bad
      $PAGER, and a *.exe program will work without specifying the extension, sticking
      with current 'shell=False' seems like the right thing to do.  I don't think
      there are any other *.com pagers out there, so this one special case seems OK.
      
      If somebody wants to do something crazy that requires cmd.exe, I was able to get
      normal paged output with 'pager.pager="cmd.exe /c more"'.  I assume you can
      replace `more` with *.bat, *.vbs or various other creatures listed in $PATHEXT.
      
      [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx
      c5d924e5
  13. Mar 22, 2017
    • Martin von Zweigbergk's avatar
      help: format ``commands`` heading correctly · 2c02bb7f
      Martin von Zweigbergk authored
      The number of dashes under it needs to match exactly for it to be
      rendered as a heading. Without this change, the dashes end up on the
      same line as "commands", and "hg help config.commands" does not work.
      2c02bb7f
    • David Soria Parra's avatar
      convert: fix the handling of empty changlist descriptions in P4 · 78ac8acf
      David Soria Parra authored
      Empty changelist descriptions are valid in Perforce. If we encounter one of
      them we are currently running into an IndexError. In case of empty commit
      messages set the commit message to **empty changelist description**, which
      follows Perforce terminology.
      78ac8acf
    • Martin von Zweigbergk's avatar
      status: support commands.status.relative config · 7e3b145f
      Martin von Zweigbergk authored
      When the config is set to true, status output becomes relative to the
      working directory. This has bugged me since I started using hg and it
      turns it is sillily simple to support it (unless I missed something,
      of course).
      
      We could also add a --relative flag, but I would personally always
      want that on, and I haven't heard any use for having it sometimes on,
      so this patch only lets you enable it via config.
      7e3b145f
    • Martin von Zweigbergk's avatar
      plain: ignore [commands] config · 37a0ad66
      Martin von Zweigbergk authored
      We only have commands.{update,rebase}.requiredest so far. We should
      clearly ignore those two if HGPLAIN is in effect, and it seems like we
      should ignore any future config that will be added in [commands] since
      that is about changing the behavior of commands.
      
      Thanks to Yuya for suggesting to centralize the code in ui.py.
      
      While at it, remove the unnecessary False values passed to
      ui.configbool() for the aforementioned config options.
      37a0ad66
  14. Mar 24, 2017
    • Gregory Szorc's avatar
      changegroup: store old heads as a set · ed5b2587
      Gregory Szorc authored
      Previously, the "oldheads" variable was a list. On a repository at
      Mozilla with 46,492 heads, profiling revealed that list membership
      testing was dominating execution time of applying small changegroups.
      
      This patch converts the list of old heads to a set. This makes
      membership testing significantly faster. On the aforementioned
      repository with 46,492 heads:
      
      $ hg unbundle <file with 1 changeset>
      before: 18.535s wall
      after:   1.303s
      
      Consumers of this variable only check for truthiness (`if oldheads`),
      length (`len(oldheads)`), and (most importantly) item membership
      (`h not in oldheads` - which occurs twice). So, the change to a set
      should be safe and suitable for stable.
      
      The practical effect of this change is that changegroup application
      and related operations (like `hg push`) no longer exhibit an O(n^2)
      CPU explosion as the number of heads grows.
  15. Mar 21, 2017
    • Pierre-Yves David's avatar
      checkheads: extract obsolete post processing in its own function · df82f375
      Pierre-Yves David authored
      The checkheads function is long and complex, extract that logic in a subfunction
      is win in itself. As the comment in the code says, this postprocessing is
      currently very basic and either misbehave or fails to detect valid push in many
      cases. My deeper motive for this extraction is to be make it easier to provide
      extensive testing of this case and strategy to cover them. Final test and logic
      will makes it to core once done.
      df82f375
  16. Mar 22, 2017
  17. Mar 23, 2017
    • Yuya Nishihara's avatar
      similar: use cheaper hash() function to test exact matches · 985a98c6
      Yuya Nishihara authored
      We just need a hash table {fctx.data(): fctx} which doesn't keep fctx.data()
      in memory. Let's simply use hash(fctx.data()) to put data out from memory,
      and manage collided fctx objects by list.
      
      This isn't significantly faster than using sha1, but is more correct as we
      know SHA-1 collision attack is getting practical.
      
      Benchmark with 50k added/removed files, on tmpfs:
      
        $ hg addremove --dry-run --time -q
      
        previous:   real 12.420 secs (user 11.120+0.000 sys 1.280+0.000)
        this patch: real 12.350 secs (user 11.210+0.000 sys 1.140+0.000)
      985a98c6
    • Yuya Nishihara's avatar
      similar: take the first match instead of the last · 2efd9771
      Yuya Nishihara authored
      It seems more natural. This makes the next patch slightly cleaner.
      2efd9771
    • Yuya Nishihara's avatar
      similar: do not look up and create filectx more than once · 2e254165
      Yuya Nishihara authored
      Benchmark with 50k added/removed files, on tmpfs:
      
        $ hg addremove --dry-run --time -q
      
        previous:   real 16.070 secs (user 14.470+0.000 sys 1.580+0.000)
        this patch: real 12.420 secs (user 11.120+0.000 sys 1.280+0.000)
      2e254165
Loading