Boris Feld <boris.feld@octobus.net> [Thu, 21 Dec 2017 13:58:11 +0100] rev 35565
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.
Boris Feld <boris.feld@octobus.net> [Thu, 21 Dec 2017 13:57:57 +0100] rev 35564
largefiles: add support for 'largefiles://' url scheme
This changesets allows Mercurial to transparently download content from the
configured largefile store. This handle all authentication and largefile
protocol details.
The target usecase is to leverage largefile infrastructure for clone bundle. See
next changeset for details
Boris Feld <boris.feld@octobus.net> [Thu, 21 Dec 2017 13:53:26 +0100] rev 35563
largefiles: add a 'debuglfput' command to put largefile into the store
We add a new debug command able to add arbitrary new files into the largefile
store. This will be useful for debugging, testing and other unholy usecase.
Boris Feld <boris.feld@octobus.net> [Fri, 15 Dec 2017 09:30:16 +0100] rev 35562
debug: add a 'debugdownload' command
This command resolve and fetch and URL through the Mercurial logic. Mercurial
logic add various headers (including authentication) while resolving an URL so
the commands helps with building the same request Mercurial would be doing.
A new test file is created because we'll add more logic regarding Mercurial
download logic and it will grow to a reasonable size.
Yuya Nishihara <yuya@tcha.org> [Sat, 01 Apr 2017 17:12:48 +0900] rev 35561
revsetlang: raise ParseError to report invalid format character
It's more common in revset and templater than raising Abort.
I have a couple more patches to address exceptions caused by bad format string
passed to revset() template function.
Yuya Nishihara <yuya@tcha.org> [Sat, 01 Apr 2017 17:04:49 +0900] rev 35560
revsetlang: use iterator to track current argument in formatspec()
Yuya Nishihara <yuya@tcha.org> [Sat, 01 Apr 2017 16:56:47 +0900] rev 35559
revsetlang: unnest "if True" in formatrevspec()
Yuya Nishihara <yuya@tcha.org> [Sat, 01 Apr 2017 16:55:28 +0900] rev 35558
revsetlang: use str.find() to scan expr in formatspec()
There should be no need to walk character one by one in Python.
Yuya Nishihara <yuya@tcha.org> [Sat, 01 Apr 2017 16:50:11 +0900] rev 35557
revsetlang: avoid string concatenation in formatspec()
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Jan 2018 12:30:55 +0900] rev 35556
test-glog: hook cmdutil.getlogrevs() so -frREV is rewritten accordingly
Before, these tests didn't match the real behavior of "log -frREV".
Yuya Nishihara <yuya@tcha.org> [Wed, 03 Jan 2018 17:12:30 +0900] rev 35555
test-glog: dump computed set
It's more important than the revset expression built from command options.
Yuya Nishihara <yuya@tcha.org> [Wed, 03 Jan 2018 17:09:16 +0900] rev 35554
test-glog: drop uninteresting nodes from AST output
This makes future test changes more readable.
Matt Harbison <matt_harbison@yahoo.com> [Sun, 07 Jan 2018 01:14:52 -0500] rev 35553
lfs: remove the verification option when writing to the local store
This partially reverts 417e8e040102 and bb6a80fc969a. But since there's now a
dedicated download function, there's no functional change. The last sentence in
the commit message of the latter is wrong- write() didn't need the one time hash
check if verification wasn't requested. I suspect I missed 'read()' in there
("... but _read()_ also needs to do a one time check..."), because that did fail
without the hash check before linking to the usercache. The write() method
simply took the same check for consistency.
While here, clarify that the write() method is *only* for storing content
directly from filelog, which has already checked the hash.
If someone can come up with a way to bridge the differences between writing to a
file and sending a urlreq.request across the wire, we can create an upload()
function and cleanup read() in a similar way. About the only common thread I
see is an open() that verifies the content before returning a file descriptor.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Dec 2017 21:20:00 -0500] rev 35552
lfs: use the localstore download method to transfer from remote stores
Both gitlfsremote and file based remotes benefit from not requiring the whole
file in memory (though the whole file is still loaded when passing through the
revlog interface). With a method specific to downloading from a remote store,
the misleading 'use hg verify' hint is removed. The behavior is otherwise
unchanged, in that a download from both remote store types will yield a copy of
the blob via util.atomictempfile.
There's no response payload defined for the non 'download' actions, but the
previous code attempted to read the payload in this case anyway. This
refactored code made that more obvious, so any payload is printed as a debug
message, just in case.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Dec 2017 18:56:04 -0500] rev 35551
lfs: introduce a localstore method for downloading from remote stores
The current local.write() method requires the full data, which means
concatenating file chunks in memory when downloading from a git server. The
dedicated method downloads in chunks, verifies the content on the fly, and
creates the usercache hardlink if successful. It can also be used for the file
system based remotestore.
An explicit division of labor between downloading from a remote store (which
should be verified) and writing to the store because of a commit or similar
(which doesn't need verification), seems clearer. I can't figure out how to
make a similar function for upload, because for a file remote store, it's a
simple open/read/write operation. For a gitremote store, it's open the file
and a urlreq.request(), and process that.
Yuya Nishihara <yuya@tcha.org> [Tue, 02 Jan 2018 12:14:08 +0900] rev 35550
win32: do not call GetVolumePathName() with the minimum buffer length
It fails on Windows XP even though the doc says "a safer but slower way to
set the size of the return buffer is to call the GetFullPathName function,
and then make sure that the buffer size is at least the same size as the full
path that GetFullPathName returns."
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364996(v=vs.85).aspx
Well, more "safe" way would be to simply rely on MAX_PATH for common scenarios.
Yuya Nishihara <yuya@tcha.org> [Tue, 02 Jan 2018 12:02:25 +0900] rev 35549
win32: allocate buffer of maximum length for GetVolumeInformation()
It's documented that "the maximum buffer size is MAX_PATH+1", which is
slightly larger than 256.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Oct 2017 22:49:11 +0900] rev 35548
log: drop unused expr from return value of getlogrevs()
Future patches will move some processing of the --follow option out of
_makelogrevset(), where the returned 'expr' value will be less consistent
with the 'revs'. So let's remove it from the public interface.
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Jan 2018 12:00:18 +0900] rev 35547
log: don't expand aliases in revset built from command options
Only -rREV should be rewritten with user aliases.
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Oct 2017 22:52:36 +0900] rev 35546
graphlog: remove redundant check for empty revs
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Oct 2017 22:38:16 +0900] rev 35545
log: remove redundant handling of --limit
A returned 'revs' set is pre-filtered by cmdutil.getlogrevs(). The result
of displayer.flush() isn't used anymore, so removed.
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Oct 2017 23:04:07 +0900] rev 35544
log: use smartset.slice() to limit number of revisions to be displayed
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Jan 2018 10:51:41 +0900] rev 35543
log: merge getlogrevs() and getgraphlogrevs()
cmdutil.graphlog() is updated to receive (revs, filematcher) as arguments
to make sure that opts['graph'] is set when getlogrevs() is invoked.
Yuya Nishihara <yuya@tcha.org> [Sat, 30 Dec 2017 17:55:23 +0900] rev 35542
revset: parse x^:: as (x^):: (issue5764)
We have to make '::' a valid primary expression to parse 'x^::' as '(x)^(::)'
first, but that doesn't change the language because a prefix operator '::y'
precedes a primary '::'.
I can't think of an intuitive meaning of '::', so it's just rejected. Given
'x::y' can be considered to default to {x = roots(), y = heads()}, '::' could
be 'roots()::heads()', which seems not any useful.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Jan 2018 21:48:29 -0500] rev 35541
lfs: add a comment to describe subtle local blobstore open() behavior
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Jan 2018 11:53:33 -0800] rev 35540
tests: make #testcase available as env var in test
It can be useful for e.g. helper functions to behave differently
depending on which test case is being executed. This patch helps with
that by making the #testcase case available as a TESTCASE environment
variable.
Differential Revision: https://phab.mercurial-scm.org/D1816
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 05 Jan 2018 19:30:37 +0530] rev 35539
archive: add support to specify hidden revs if directaccess config is set
Differential Revision: https://phab.mercurial-scm.org/D1812
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 05 Jan 2018 19:23:30 +0530] rev 35538
annotate: add support to specify hidden revs if directaccess config is set
Differential Revision: https://phab.mercurial-scm.org/D1811
Anton Shestakov <av6@dwimlabs.net> [Fri, 05 Jan 2018 19:30:30 +0800] rev 35537
hgweb: stop adding strings to innerHTML of #graphnodes and #nodebgs (BC)
There's nothing that uses this functionality anymore, since all HTML is
generated server-side now. Changeset entries are still accessible in JS via
DOM (that's how we set left padding), so it's still possible to do something
unusual by overriding Graph.prototype.vertex().
Anton Shestakov <av6@dwimlabs.net> [Fri, 05 Jan 2018 19:22:05 +0800] rev 35536
spartan: make actual changeset entries have backgrounds on /graph
This patch removes a separate container for backgrounds only and puts
backgrounds on changeset elements themselves. This makes it so that JS code
doesn't need to create background elements separately anymore.
There's a bit of manipulating positions of elements: every changeset entry has
a "fg" element that gets a higher z-index than <canvas> element. This
prioritizes text information, so that even if it somehow gets close to the
graph drawn on <canvas> (which has z-index of 5), it'll still be on top of it.
This can happen if commit message has a long first line and browser window is
narrow, for example.