Skip to content
Snippets Groups Projects
  1. Nov 18, 2015
    • Siddharth Agarwal's avatar
      filemerge: return whether the file is deleted for nomerge internal tools · 28ee7af4
      Siddharth Agarwal authored
      We're going to support the filemerge code resolving change/delete conflicts in
      upcoming patches. Some of these resolutions require that the dirstate be
      modified. Modifying the dirstate directly from in here would be (a) a pretty
      bad layering violation and (b) wrong because all dirstate removals should
      happen before adds. So in this and upcoming patches we're instead going to pass
      whether the file is deleted up to merge.mergestate, then in there figure out
      what dirstate action needs to be taken.
      28ee7af4
    • Siddharth Agarwal's avatar
      mergestate: allow storing and retrieving change/delete conflicts · 8be0af32
      Siddharth Agarwal authored
      We introduce a new record type, 'C', to indicate change/delete conflicts. This
      is a separate record type because older versions of Mercurial will not be able
      to handle these conflicts.
      
      We aren't actually storing any change/delete conflicts yet -- that will come in
      future patches.
      8be0af32
  2. Nov 19, 2015
  3. Nov 15, 2015
    • Shubhanshu Agrawal's avatar
      strip: strip a list of bookmarks · 8279c5d1
      Shubhanshu Agrawal authored
      Currently strip works with a single bookmark,
      the changes in this patch modifies the strip module
      to work with a list of bookmarks
      
      Building on this we can take a list of bookmarks as input
      and remove all of them in a single go
      8279c5d1
  4. Nov 19, 2015
    • Pierre-Yves David's avatar
      revset: speed up '_matchfiles' · f92053df
      Pierre-Yves David authored
      File matching is done by applying the matcher to all elements in the 'file'
      field of all changesets in the repository. This requires to read/parse all
      changesets in the repository and do a lot of matching. However about 1/3 of the
      time of the function is used to create 'changectx' object and retrieve their
      'file' field.
      
      This is far too much overhead so we are skipping the changectx layer and
      directly access the data from the changelog. This provide use significant speed
      up:
      
      repository: mozilla central 252524 revisions
      command: hg perfrevset '_matchfiles("p:browser")'
      Before: 15.899687s
      After:  10.011705s
      
      Slowdown is even more significant if you have a lot of namespace that slowdown
      lookup.
      
      The time is now spent with this approximate repartition:
      
        Matcher: 20%
          regexp matching: 10%
        changelog.read: 80%
          reading revision: 60%
            checking hash: 15%
            decompression: 15%
            reading chunk: 30%
          changelog parsing: 20%
            decoding to local: 10%
      
      The next easy win is probably to have more of the changelog stack implemented
      using the CPython api.
      f92053df
  5. Nov 18, 2015
    • Siddharth Agarwal's avatar
      mergestate: handle additional record types specially · a01ecbcf
      Siddharth Agarwal authored
      This works around a bug in older Mercurial versions' handling of the v2 merge
      state.
      
      We also add a bunch of tests that make sure that
      (1) we correctly abort when the merge state has an unsupported record type
      (2) aborting the merge, rebase or histedit continues to work and clears out the
          merge state.
      a01ecbcf
  6. Nov 19, 2015
  7. Nov 18, 2015
    • liscju's avatar
      fileset: add missing() predicate (issue4925) · ceef5fb1
      liscju authored
      Help of status cmd defines status file of 'missing', what is
      called in fileset 'deleted'. To stay consistent this patch
      introduces missing() predicate which in fact is alias to
      'deleted'.
      ceef5fb1
  8. Nov 10, 2015
    • Anton Shestakov's avatar
      webutil: make _siblings into an object with __iter__ and __len__ · 0c8ef79b
      Anton Shestakov authored
      _siblings is a helper that is used for displaying changeset parents and
      children in hgweb. Before, when it was a simple generator, it couldn't tell its
      length without being consumed, and that required a special case when preparing
      data for changeset template (see 9e1f4c65f5f5).
      
      Let's make it into a class (similar to templatekw._hybrid) that allows len(...)
      without side-effects.
      0c8ef79b
  9. Nov 19, 2015
  10. Nov 18, 2015
  11. Nov 01, 2015
  12. Nov 19, 2015
    • Matt Mackall's avatar
      perf: un-bitrot perfstatus · cdc3e437
      Matt Mackall authored
      cdc3e437
    • Matt Mackall's avatar
      util: drop statmtimesec · 448cbdab
      Matt Mackall authored
      We've globablly forced stat to return integer times which agrees with
      our extension code, so this is no longer needed.
      
      This speeds up status on mozilla-central substantially:
      
      $ hg perfstatus
      ! wall 0.190179 comb 0.180000 user 0.120000 sys 0.060000 (best of 53)
      $ hg perfstatus
      ! wall 0.275729 comb 0.270000 user 0.210000 sys 0.060000 (best of 36)
      448cbdab
    • Matt Mackall's avatar
      util: disable floating point stat times (issue4836) · 341cb90f
      Matt Mackall authored
      Alternate fix for this issue which avoids putting extra function calls
      and exception handling in the fast path.
      
      For almost all purposes, integer timestamps are preferable to
      Mercurial. It stores integer timestamps in the dirstate and would thus
      like to avoid doing any float/int comparisons or conversions. We will
      continue to have to deal with 1-second granularity on filesystems for
      quite some time, so this won't significantly hinder our capabilities.
      
      This has some impact on our file cache validation code in that it
      lowers timestamp resolution. But as we still have to deal with
      low-resolution filesystems, we're not relying on this anyway.
      
      An alternate approach is to use stat[ST_MTIME], which is guaranteed to
      be an integer. But since this support isn't already in our extension,
      we can't depend on it being available without adding a hard Python->C
      API dependency that's painful for people like yours truly who have
      bisect regularly and people without compilers.
      341cb90f
  13. Nov 18, 2015
  14. Nov 19, 2015
  15. Nov 18, 2015
    • Laurent Charignon's avatar
      rebase: don't rebase obsolete commits with no successor · 5eac7ab5
      Laurent Charignon authored
      This patch avoids unnecessary conflicts to resolve during rebase for the users
      of changeset evolution.
      
      This patch modifies rebase to skip obsolete commits with no successor.
      It introduces a new rebase state 'revpruned' for these revisions that are
      being skipped and a new message to inform the user of what is happening.
      This feature is gated behind the config flag experimental.rebaseskipobsolete
      
      When an obsolete commit is skipped, the output is:
      note: not rebasing 7:360bbaa7d3ce "O", it has no successor
      5eac7ab5
    • Laurent Charignon's avatar
      rebase: fix a typo in test-rebase-obsolete · 53c668dc
      Laurent Charignon authored
      We had left a lonely single quote where it shouldn't be!
      53c668dc
  16. Nov 19, 2015
  17. Nov 01, 2015
  18. Nov 17, 2015
  19. Nov 11, 2015
  20. Nov 18, 2015
  21. Nov 17, 2015
  22. Nov 18, 2015
    • Laurent Charignon's avatar
      localrepo: put bookmark move following commit in one transaction · 4414d500
      Laurent Charignon authored
      Before this patch, making a commit on a local repo could move a bookmark and
      both operations would not be grouped as one transaction. This patch makes both
      operations part of one transaction. This is necessary to switch to the new api
      to save bookmarks repo._bookmarks.recordchange if we don't want to change the
      current behavior of rollback.
      
      Dirstate change happening after the commit is done is now part of the
      transaction mentioned above. This leads to a change in the expected output of
      several tests.
      
      The change to test-fncache happens because both lock are now released in the
      same finally clause. The lock release is made explicitly buggy in this test.
      Previously releasing lock would crash triggering release of wlock that crashes
      too. Now lock release crash does not directly result in the release of wlock.
      Instead wlock is released at garbage collection time and the error raised at
      that time "confuses" python.
      4414d500
  23. Nov 17, 2015
Loading