Skip to content
Snippets Groups Projects
  1. Sep 06, 2018
    • Matt Harbison's avatar
      lfs: ensure the blob is linked to the remote store on skipped uploads · a913d2892e17
      Matt Harbison authored
      I noticed a "missing" blob when pushing two repositories with common blobs to a
      fresh server, and then running `hg verify` as a user different from the one
      running the web server.  When pushing the second repo, several of the blobs
      already existed in the user cache, so the server indicated to the client that it
      doesn't need to upload the blobs.  That's good enough for the web server process
      to serve up in the future.  But a different user has a different cache by
      default, so verify complains that `lfs.url` needs to be set, because it wants to
      fetch the missing blobs.
      
      Aside from that corner case, it's better to keep all of the blobs in the repo
      whenever possible.  Especially since the largefiles wiki says the user cache can
      be deleted at any time to reclaim disk space- users switching over may have the
      same expectations.
      a913d2892e17
  2. Sep 05, 2018
  3. Aug 06, 2018
    • Pulkit Goyal's avatar
      narrow: add '--import-rules' flag to tracked command · ab20ee07b82d
      Pulkit Goyal authored
      This patch adds a `--import-rules` flag to tracked command provided by narrow
      extension. Using the --import-rules flag, you can pass a filename from which
      narrowspecs should be read and added to main narrowspec.
      
      A lot of times, in automation or manually also, when you are working with big
      repo, specifying each path name on commandline using '--addinclude' and
      '--addexclude' is tedious and something which can scale. So we needed something
      where we can pass a file to extend the narrowspecs.
      
      Nice thing about this is that the automations which reads some file to change
      the sparse profile, can now read the same file for changing narrowspecs too.
      
      Tests are added for the new feature.
      
      Differential Revision: https://phab.mercurial-scm.org/D4125
      ab20ee07b82d
  4. Sep 04, 2018
  5. Sep 03, 2018
  6. Aug 25, 2018
  7. Aug 31, 2018
  8. Sep 01, 2018
  9. Aug 31, 2018
  10. Jun 05, 2018
    • Boris Feld's avatar
      shelve: add an "internal" extra · 5f8282f368b2
      Boris Feld authored
      Keeping shelve changeset around increase the risk of collision with normal
      changesets. To prevent such collision and help with overall clarity, we add an
      'internal' key in extra that mark the changeset as created by "shelve".
      
      Node changes in tests are expected.
      5f8282f368b2
    • Boris Feld's avatar
      shelve: write metadata file on the fly if they are missing · 38373da1af02
      Boris Feld authored
      Keeping an explicit reference to the shelve node in order to reuse it directly
      if the unshelved is repeated (eg: unshelve --keep).
      38373da1af02
    • Boris Feld's avatar
      shelve: look for shelved node in the repository before unbundling · c67c94c0e7ae
      Boris Feld authored
      This prepares the version of shelve that would not strip the shelved node from
      the repository. If we have the node information, search for it in the
      repository and only fallback on unbundling if it is missing.
      
      To be able to find such nodes, we operate on an unfiltered repository.
      c67c94c0e7ae
    • Boris Feld's avatar
      shelve: handle shelved node on unfiltered repository · 6a71324cb68b
      Boris Feld authored
      To build a version of shelve that use hiding instead of stripping, we need
      shelve to be able to find these revisions. This it does not hurt the bundle
      version, so we introduce the necessary code in the relevant place.
      6a71324cb68b
  11. May 29, 2018
    • Boris Feld's avatar
      shelve: store shelved node in a new data file · da121c9dc0f2
      Boris Feld authored
      It is useful for a version of shelve not based on bundle and strip. Having
      more data does not hurt the bundle based case so we introduce it in all cases
      before doing more rework.
      
      We also keep storing the patch using another method.
      
      note: We could have this metadata file list all the file involved in the
      shelve and use that for cleanup. This would be more future proof than having a
      hard-coded list of file to purge. However, this is an adventure for another
      series.
      da121c9dc0f2
  12. Aug 05, 2018
    • Yuya Nishihara's avatar
      formatter: rename {abspath}/{file} to {path}, and drop relative {path} (BC) · 34ba47117164
      Yuya Nishihara authored
      Note that {path} in status is either relative-to-cwd or repository-absolute
      depending on the command argument and config knob, which can't be reproduced
      by using the {path|relpath} filter. The default template is updated to always
      use a relative path.
      
      .. bc::
      
         ``{abspath}`` and ``{file}`` in generic templates are renamed to ``{path}``.
         Any ``{path}`` is a repository-absolute path. Use ``{path|relpath}`` to
         convert it to a filesystem path.
      34ba47117164
  13. Aug 30, 2018
  14. Aug 27, 2018
    • Pulkit Goyal's avatar
      narrow: update the narrowspecs to new ones after pulling when widening · 2b8adb7ca39a
      Pulkit Goyal authored
      The ellipsis case updates the new narrowspecs at bundle2 handling code, and
      non-ellipsis widening didn't use to work and never set the new narrowpats.
      Previous pacth added server side logic for widening without ellipsis. This patch
      adds the missing repo.setnarrowpats() so that we set the new narrowpats after
      widening in non-ellipsis cases also.
      
      This makes widening with non-ellipsis case work but there are certain things
      which we can improve.
      
      Differential Revision: https://phab.mercurial-scm.org/D4384
      2b8adb7ca39a
  15. Aug 26, 2018
    • Pulkit Goyal's avatar
      narrow: add server logic to send cg while widening without ellipsis · c8e4eae84808
      Pulkit Goyal authored
      Before this patch, if you try to widen a narrow clone without ellipsis enabled,
      it will be broken and the exchange.pull() done by tracked command to widen the
      clone will be no-op because no custom logic exists for this and server sees that
      we have all csets and it says `no changes found`.
      
      The widening with ellipsis send KILL for existing changegroups and send new
      changegroups because of the change in ellipsis hash, but we can prevent that in
      non-ellipsis cases.
      
      This patch adds server side logic to send the changegroups for the changesets
      which are on the client again with filelogs and manifests for the new includes.
      This is a very starting implementation and we send changegroups and manifests
      too while we can prevent them.
      
      Following things can definitely be improved in the logic this patch adds:
      
        1) Send just the filelogs and treemanifests
        2) Send the filelogs only for the additions in the include
      
      I tried 1) here but the code is coupled tightly and the way I was able to do
      that was hacking into the changegroup generation code in a very dirty way, like
      adding conditionals and preventing the yield.
      
      This patch also adds a 'widen' kwarg to prevent other commands except widening
      to go through that codepath.
      
      The test changes demonstrate that the new implementation is correct and fixes
      things.
      
      Differential Revision: https://phab.mercurial-scm.org/D4383
      c8e4eae84808
  16. Jun 05, 2018
  17. May 29, 2018
    • Boris Feld's avatar
      shelve: rename method for data write/read · bab58b1d87c7
      Boris Feld authored
      There are no user of this code nor any code related to obsshelve in the
      extensions right now, so we rename the function before using them.
      
      Note: The shelvedfile looks a bit strange. We should probably refactor it,
      however, this is an adventure for another series.
      bab58b1d87c7
  18. Aug 22, 2018
  19. Jul 12, 2018
  20. Aug 27, 2018
  21. Aug 24, 2018
    • Matt Harbison's avatar
      lfs: add a progress bar when searching for blobs to upload · 37e56607cbb9
      Matt Harbison authored
      The search itself can take an extreme amount of time if there are a lot of
      revisions involved.  I've got a local repo that took 6 minutes to push 1850
      commits, and 60% of that time was spent here (there are ~70K files):
      
           \ 58.1%  wrapper.py:     extractpointers      line 297:  pointers = extractpointers(...
             | 57.7%  wrapper.py:     pointersfromctx    line 352:  for p in pointersfromctx(ct...
             | 57.4%  wrapper.py:     pointerfromctx     line 397:  p = pointerfromctx(ctx, f, ...
               \ 38.7%  context.py:     __contains__     line 368:  if f not in ctx:
                 | 38.7%  util.py:        __get__        line 82:  return key in self._manifest
                 | 38.7%  context.py:     _manifest      line 1416:  result = self.func(obj)
                 | 38.7%  manifest.py:    read           line 472:  return self._manifestctx.re...
                   \ 25.6%  revlog.py:      revision     line 1562:  text = rl.revision(self._node)
                     \ 12.8%  revlog.py:      _chunks    line 2217:  bins = self._chunks(chain, ...
                       | 12.0%  revlog.py:      decompressline 2112:  ladd(decomp(buffer(data, ch...
                     \  7.8%  revlog.py:      checkhash  line 2232:  self.checkhash(text, node, ...
                       |  7.8%  revlog.py:      hash     line 2315:  if node != self.hash(text, ...
                       |  7.8%  revlog.py:      hash     line 2242:  return hash(text, p1, p2)
                   \ 12.0%  manifest.py:    __init__     line 1565:  self._data = manifestdict(t...
               \ 16.8%  context.py:     filenode         line 378:  if not _islfs(fctx.filelog(...
                 | 15.7%  util.py:        __get__        line 706:  return self._filelog
                 | 14.8%  context.py:     _filelog       line 1416:  result = self.func(obj)
                 | 14.8%  localrepo.py:   file           line 629:  return self._repo.file(self...
                 | 14.8%  filelog.py:     __init__       line 1134:  return filelog.filelog(self...
                 | 14.5%  revlog.py:      __init__       line 24:  censorable=True)
      37e56607cbb9
    • Martin von Zweigbergk's avatar
      merge with stable · 5b9f116104f9
      Martin von Zweigbergk authored
      5b9f116104f9
  22. Aug 22, 2018
  23. Aug 08, 2018
  24. Aug 10, 2018
    • Gregory Szorc's avatar
      manifest: add getstorage() to manifestlog and use it globally · 73cf21b2e8a6
      Gregory Szorc authored
      It is a common pattern to obtain a directory manifest storage instance
      (a manifestrevlog) by going through manifestlog._revlog.dirlog().
      
      Why access to storage and caching of other manifests is done through
      manifestrevlog instead of manifestlog, I don't know.
      
      This commit establishes a getstorage(tree) API on manifestlog and
      imanifestlog that provides a public API for accessing manifest storage.
      
      All consumers previously using private attributes have been updated
      to use this new method.
      
      .. api:: manifestlog now has a getstorage(tree) method
      
         It should be used for obtaining an object representing the
         manifest's storage implementation. Accessing
         manifestlog._revlog should be avoided.
      
      Differential Revision: https://phab.mercurial-scm.org/D4277
      73cf21b2e8a6
  25. Aug 20, 2018
  26. Aug 09, 2018
  27. Aug 01, 2018
Loading