view tests/test-xdg.t @ 35565:bdae51a83dfb

clonebundle: make it possible to retrieve the initial bundle through largefile By setting the default path early enough, we make it possible to retrieve a clone bundle as a largefile from the repository we are cloning. But... why? Clone bundle is a great feature to speeds up clone of large repository. However one of the main obstacle for clone bundle deployment is the authentication scheme. For non public project, just putting a static file on some random CDN is not an option as we have to make sure people have the proper permission to retrieves the bundle. On the other hand, 'largefiles' already have all the necessary logic to serve arbitrary binary files -after- an authentication checks. So reusing an existing large file infrastructure can be a significant shortcut to clone bundle in this kind of closed environment. The idea might seems strange, but the necessary update to the large file extensions are quite small while the benefits are huge. In addition, since all the extra logic live in the 'largefiles' extensions, core does not have to know anything about it.
author Boris Feld <boris.feld@octobus.net>
date Thu, 21 Dec 2017 13:58:11 +0100
parents 7d8da7b54dc0
children a4b3b8dee0a8
line wrap: on
line source

#if no-windows no-osx

  $ mkdir -p xdgconf/hg
  $ echo '[ui]' > xdgconf/hg/hgrc
  $ echo 'username = foobar' >> xdgconf/hg/hgrc
  $ XDG_CONFIG_HOME="`pwd`/xdgconf" ; export XDG_CONFIG_HOME
  $ unset HGRCPATH
  $ hg config ui.username 2>/dev/null
  foobar

#endif