Skip to content
Snippets Groups Projects
  1. Aug 18, 2018
  2. Jul 31, 2018
    • Martijn Pieters's avatar
      manifest: persist the manifestfulltext cache · 0a57945aaf7f
      Martijn Pieters authored
      Reconstructing the manifest from the revlog takes time, so much so that there
      already is a LRU cache to avoid having to load a manifest multiple times.
      
      This patch persists that LRU cache in the .hg/cache directory, so we can re-use
      this cache across hg commands. Commit benchmark (run on Macos 10.13 on a
      2017-model Macbook Pro with Core i7 2.9GHz and flash drive), testing without
      and with patch run 5 times, baseline is r2a227782e754:
      
      * committing to an existing file, against the mozilla-central repository.
        Baseline real time average 1.9692, with patch 1.3786.
      
      A new debugcommand "hg debugmanifestfulltextcache" lets you inspect the cache,
      clear it, or add specific manifest nodeids to it. When calling
      repo.updatecaches(), the manifest(s) for the working copy parents are added to
      the cache.
      
      The hg perfmanifest command has an additional --clear-disk switch to clear this
      cache when testing manifest loading performance.
      
      Using this command to test performance on the firefox repository for revision
      f947d902ed91, whose manifest has a delta chain length of 60540, we see:
      
      $ hg perfmanifest f947d902ed91 --clear-disk
      ! wall 0.972253 comb 0.970000 user 0.850000 sys 0.120000 (best of 10)
      $ hg debugmanifestfulltextcache -a `hg log --debug -r f947d902ed91 | grep manifest | cut -d: -f3`
      Cache contains 1 manifest entries, in order of most to least recent:
      id: 0294517df4aad07c70701db43bc7ff24c3ce7dbc, size 25.6 MB
      Total cache data size 25.6 MB, on-disk 0 bytes
      $ hg perfmanifest f947d902ed91
      ! wall 0.036748 comb 0.040000 user 0.020000 sys 0.020000 (best of 100)
      
      Worst-case scenario: a manifest text loaded from a single delta; in the firefox
      repository manifest node 9a1246ff762e is the chain base for the manifest
      attached to revision f947d902ed91. Loading this from a full cache file is just
      as fast as without the cache; the extra node ids ensure a big full cache:
      
      $ for node in 9a1246ff762e 1a1922c14a3e 54a31d11a36a 0294517df4aa; do
      >   hgd debugmanifestfulltextcache -a $node > /dev/null
      > done
      $ hgd perfmanifest -m 9a1246ff762e
      ! wall 0.077513 comb 0.080000 user 0.030000 sys 0.050000 (best of 100)
      $ hgd perfmanifest -m 9a1246ff762e --clear-disk
      ! wall 0.078547 comb 0.080000 user 0.070000 sys 0.010000 (best of 100)
      0a57945aaf7f
  3. Jun 05, 2018
  4. Jun 04, 2018
  5. May 24, 2018
    • Denis Laxalde's avatar
      transaction-summary: show phase changes statistics in pull/unbundle · eb9835014d20
      Denis Laxalde authored
      Upon pull or unbundle, we display a message with the number of
      changesets which phase became public. Noticeably, this new message would
      appear even if no new changeset were added (below the "no changes found"
      message), thus indicating that something actually happened to the local
      repository.
      eb9835014d20
  6. May 01, 2018
  7. Dec 11, 2017
    • Matt Harbison's avatar
      tests: remove (glob) annotations that were only for '\' matches · 4441705b7111
      Matt Harbison authored
      # skip-blame because this was mechanically rewritten the following script.  I
      ran it on both *.t and *.py, but none of the *.py changes were proper.  All *.t
      ones appear to be, and they run without addition failures on both Windows and
      Linux.
      
        import argparse
        import os
        import re
      
        ap = argparse.ArgumentParser()
        ap.add_argument('path', nargs='+')
        opts = ap.parse_args()
      
        globre = re.compile(r'^(.*) \(glob\)(.*)$')
      
        for p in opts.path:
            tmp = p + '.tmp'
            with open(p, 'rb') as src, open(tmp, 'wb') as dst:
                for line in src:
                    m = globre.match(line)
                    if not m or '$LOCALIP' in line or '*' in line:
                        dst.write(line)
                        continue
                    if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
                        dst.write(line)
                        continue
                    dst.write(m.group(1) + m.group(2) + '\n')
            os.unlink(p)
            os.rename(tmp, p)
      4441705b7111
  8. Aug 22, 2017
  9. Jul 15, 2017
    • Boris Feld's avatar
      share: share 'cachevfs' with the source clone (issue5108) · 460733327640
      Boris Feld authored
      Share extension now also share caches reads and writes. Not sharing caches
      results in costly caches recomputations which can takes up to minutes when
      using shares on large repositories.
      
      There are a couple of file in the '.hg/cache/' that depends of the current
      visibility. Visibility can be affected by the working copy location, something
      which is specific to each share. We ignores them for this series because they:
      
      * are the minority,
      * already have a good fallback to other precomputed caches,
      * are only affected when people use the experimental evolution feature.
      460733327640
  10. Jul 02, 2017
  11. Apr 12, 2017
  12. Apr 01, 2017
  13. Mar 02, 2017
  14. Feb 13, 2017
    • Dan Villiom Podlaski Christiansen's avatar
      share: add --relative flag to store a relative path to the source · 23080c03a604
      Dan Villiom Podlaski Christiansen authored
      Storing a relative path the source repository is useful when exporting
      repositories over the network or when they're located on external
      drives where the mountpoint isn't always fixed.
      
      Currently, Mercurial interprets paths in `.hg/shared` relative to
      $PWD. I suspect this is very much unintentional, and you have to
      manually edit `.hg/shared` in order to trigger this behaviour.
      
      However, on the off chance that someone might rely on it, I added a
      new capability called 'relshared'. In addition, this makes earlier
      versions of Mercurial fail with a graceful error.
      
      I should note that I haven't tested this patch on Windows.
      23080c03a604
  15. Feb 20, 2017
    • Katsunori FUJIWARA's avatar
      bookmarks: check HG_PENDING strictly · 0332b8fafd05
      Katsunori FUJIWARA authored
      Before this patch, checking HG_PENDING in bookmarks.py might cause
      unintentional reading unrelated '.hg/bookmarks.pending' in, because it
      just examines existence of HG_PENDING environment variable.
      
      This patch uses txnutil.trypending() to check HG_PENDING strictly.
      
      This patch also changes share extension.
      
      Enabling share extension (+ bookmark sharing) makes
      bookmarks._getbkfile() receive repo to be shared (= "srcrepo"). On the
      other hand, HG_PENDING always refers current working repo (=
      "currepo"), and bookmarks.pending is written only into currepo.
      
      Therefore, we should try to read .hg/bookmarks.pending of currepo in
      at first. If it doesn't exist, we try to read .hg/bookmarks of srcrepo
      in.
      
      Even after this patch, an external hook spawned in currepo can't see
      pending changes in currepo via srcrepo, even though such changes
      become visible after closing transaction, because there is no easy and
      cheap way to know existence of pending changes in currepo via srcrepo.
      
      Please see https://www.mercurial-scm.org/wiki/SharedRepository, too.
      
      BTW, this patch may cause failure of bisect in the repository of
      Mercurial itself, if examination at bisecting assumes that an external
      hook can see all pending changes while nested transactions across
      repositories.
      
      This invisibility issue will be fixed by subsequent patch, which
      allows HG_PENDING to refer multiple repositories.
      0332b8fafd05
  16. Jun 08, 2015
  17. Dec 13, 2014
    • Ryan McElroy's avatar
      share: add option to share bookmarks · cd79fb4d75fd
      Ryan McElroy authored
      This patch adds the -B/--bookmarks option to the share command added by the
      share extension. All it does for now is create a marker, 'bookmarks.shared',
      that will be used by future code to implement the sharing functionality.
      cd79fb4d75fd
    • Ryan McElroy's avatar
      share: implement shared bookmark functionality · 141baca16059
      Ryan McElroy authored
      This does not cause any behavioral change unless a 'bookmarks.shared' marker
      file exists. A future change will add UI to create this file when a repository
      is shared.
      141baca16059
  18. Aug 06, 2014
  19. Sep 12, 2012
  20. Jun 21, 2012
    • kiilerix's avatar
      tests: prepare get-with-headers.py for MSYS · 953faba28e91
      kiilerix authored
      get-with-headers.py took the http GET parameter as a command line parameter
      that had to start with '/'. MSYS on windows will mangle such paths.
      
      Instead of applying a workaround everywhere (such as an extra '/') we let
      get-with-headers.py add the mandatory '/'. That is consistent with the
      url path handling in the Mercurial url class.
      
      A few tests sent 'GET ?cmd=...' which is invalid. They will now send 'GET
      /?cmd=...'.
      
      This will not enable any tests for being run on windows - only remove one
      reason they were disabled.
      953faba28e91
  21. Jun 10, 2012
    • kiilerix's avatar
      tests: add missing trailing 'cd ..' · f2719b387380
      kiilerix authored
      Many tests didn't change back from subdirectories at the end of the tests ...
      and they don't have to. The missing 'cd ..' could always be added when another
      test case is added to the test file.
      
      This change do that tests (99.5%) consistently end up in $TESTDIR where they
      started, thus making it simpler to extend them or move them around.
      f2719b387380
  22. Nov 07, 2011
  23. Sep 15, 2011
    • Greg Ward's avatar
      share: allow trailing newline on .hg/sharedpath. · a21ccf4412d5
      Greg Ward authored
      This is extremely handy for those occasional circumstances where you
      need to edit .hg/sharedpath manually, since modern Unix text editors
      make it surprisingly difficult to create a text file with no trailing
      newline.
      a21ccf4412d5
  24. Aug 12, 2011
  25. Oct 09, 2010
  26. Sep 26, 2010
  27. Feb 14, 2010
  28. Dec 16, 2009
  29. Dec 15, 2009
  30. Dec 13, 2009
  31. Dec 01, 2009
Loading