Mercurial > hg
view tests/test-empty-dir.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 | 3b165c127690 |
children |
line wrap: on
line source
$ hg init $ echo 123 > a $ hg add a $ hg commit -m "first" a $ mkdir sub $ echo 321 > sub/b $ hg add sub/b $ hg commit -m "second" sub/b $ cat sub/b 321 $ hg co 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ cat sub/b 2>/dev/null || echo "sub/b not present" sub/b not present $ test -d sub || echo "sub not present" sub not present