Sat, 18 Nov 2017 12:54:06 -0500 test-lfs: add tests demonstrating the interaction with largefiles
Matt Harbison <matt_harbison@yahoo.com> [Sat, 18 Nov 2017 12:54:06 -0500] rev 35102
test-lfs: add tests demonstrating the interaction with largefiles Obviously the original series needs to be accepted first, but there are concerns about how well these extensions will play together before proceeding. It looks like the answer is surprisingly well. There are some merge surprises (largefiles seems to combine the choice of "keep tracking as a large/normal file" with taking the content of the large/normal file) and some existing diff weirdness (largefiles diffs the standins, not the large file). Converting the repo to normal files seemlessly transitions to lfs on the fly. I didn't test going the other way, because I'm not sure why anyone would want to do that. I flagged the lack of a repo requirement after converting, because some of the unsubmitted changes I have add a requirement on commit, but this somehow misses the convert case. I flagged an issue where devel-warnings are emitted on convert, which is a separate issue.
Tue, 14 Nov 2017 01:09:48 -0500 test-lfs: cast the flags printed to an int
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Nov 2017 01:09:48 -0500] rev 35101
test-lfs: cast the flags printed to an int On Windows, the flag values in the subsequent tests were printing with a 'L' suffix.
Tue, 14 Nov 2017 01:03:22 -0500 lfs: register config options
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Nov 2017 01:03:22 -0500] rev 35100
lfs: register config options I'm not sure at what point we can get rid of the deprecated options, but for the sake of making progress, they are registered too.
Tue, 14 Nov 2017 00:14:52 -0500 lfs: quiesce check-module-import warnings
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Nov 2017 00:14:52 -0500] rev 35099
lfs: quiesce check-module-import warnings Specifically, 'symbol import follows non-symbol import: mercurial.i18n'
Tue, 14 Nov 2017 00:06:23 -0500 lfs: import the Facebook git-lfs client extension
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Nov 2017 00:06:23 -0500] rev 35098
lfs: import the Facebook git-lfs client extension The purpose of this is the same as the built-in largefiles extension- to handle huge files outside of the normal storage system, generally to keep the amount of data cloned to a lower amount. There are several benefits of implementing the git-lfs protocol, instead of using the largefiles extension: - Bitbucket and Github support (and probably wider support in 3rd party hosting sites in general). [1][2] - The number of hg internals monkey patched are several orders of magnitude lower, so it will be easier to reason about and maintain. Future commands will likely just work, without requiring various wrappers. - The "standin" files are only written to the filelog, not the disk. That should avoid weird edge cases where the largefile and standin files get out of sync. [3] It also avoids the occasional printing of the "hidden" standin file in various messages. - Filesets like size() will work, even if the file isn't present. (It always says 41 bytes for largefiles, whether present or not.) The only place that I see where largefiles comes out on top is that it works with `hg serve` for simple sharing, without external infrastructure. Getting lfs-test-server working was a hassle, and took awhile to figure out. Maybe we can do something to make it work in the future. Long term, I expect that this will be highly preferred over largefiles. But if we are to recommend this to largefile users, there are some UI issues to bikeshed. Until they are resolved, I've marked this experimental, and am not putting a pointer to this in the largefiles help. The (non exhaustive) list of issues I've seen so far are: - It isn't sufficient to just enable the largefiles extension- you have to explicitly add a file with --large before it will pay attention to the configured sizes and patterns on future adds. The justification being that once you use it, you're stuck with it. I've seen people confused by this, and haven't liked it myself. But it's also saved me a few times. Should we do something like have a specific enabling config setting that must be set in the local repo config, so that enabling this extension in the user or system hgrc doesn't silently start storing lfs files? - The largefiles extension adds a repo requirement when the first largefile is committed, so that the extension must always be enabled in the future. This extension is not doing that, and since I only enabled it locally to avoid infecting other repos, I got a cryptic error about missing flag processors when I cloned. Is there no repo requirement due to shallow/narrow clone considerations (or other future advanced things)? - In the (small amount of) reading I've done about the git implementation, it seems that the files and sizes are stored in a tracked .gitattributes file. I think a tracked file for this would be extremely useful for consistency across developers, but this kind of touches on the tracked hgrc file proposal a few months back. - The git client can specify file patterns, not just sizes. - The largefiles extension has a cache directory in the local repo, but also a system wide one. We should probably implement a system wide cache too, so that multiple clones don't have to refetch the files from the server. - Jun mentioned other missing features, like SSH authentication, gc, etc. The code corresponds to c0492b73c7ef in hg-experimental. [4] The only tweaks are to load the extension in the tests with 'lfs=' instead of 'lfs=$TESTDIR/../hgext3rd/lfs', change the import in the *.py test to hgext (from hgext3rd), add the 'testedwith' declaration, and mark it experimental for now. The infinite-push, p4fastimport, and remotefilelog tests were left behind. The devel-warnings for unregistered config options are not corrected yet, nor are the import check warnings. [1] https://www.mercurial-scm.org/pipermail/mercurial/2017-November/050699.html [2] https://bitbucket.org/site/master/issues/3843/largefiles-support-bb-3903 [3] https://bz.mercurial-scm.org/show_bug.cgi?id=5738 [4] https://bitbucket.org/facebook/hg-experimental
Sat, 18 Nov 2017 16:12:00 +0900 run-tests: outputdir also has to be changed if $TESTDIR is not $PWD
Matthieu Laneuville <matthieu.laneuville@octobus.net> [Sat, 18 Nov 2017 16:12:00 +0900] rev 35097
run-tests: outputdir also has to be changed if $TESTDIR is not $PWD Following a18eef03d879, running run-tests.py from outside tests/ would lead to the creation of .testtimes and test-*.t.err in $PWD instead of $TESTDIR. This patch fixes that and updates the relevant test.
Mon, 20 Nov 2017 21:59:00 +0800 hgweb: use webutil.commonentry() for nodes (but not for jsdata yet) in /graph
Anton Shestakov <av6@dwimlabs.net> [Mon, 20 Nov 2017 21:59:00 +0800] rev 35096
hgweb: use webutil.commonentry() for nodes (but not for jsdata yet) in /graph This makes graphdata() simpler by using existing code that gets common changeset properties for showing in hgweb. graphdata() is a nested function in graph() that prepares entries for /graph view, but there are two different lists of changesets prepared: "jsdata" for JavaScript-rendered graph and "nodes" for everything else. For "jsdata", properties "node", "user", "age" and "desc" are passed through various template filters because we don't have these filters in JavaScript, so the data has to be prepared server-side. But now that commonentry() is used for producing "nodes" list (and it doesn't apply any filters), these filters need to be added to the appropriate templates (only raw at this moment, everything else either doesn't implement graph or uses JavaScript). This is a bit of refactoring that will hopefully simplify future patches. The end result is to have /graph that only renders the actual graph with nodes and vertices in JavaScript, and the rest is done server-side. This way server-side code can focus on showing a list of changesets, which is easy because we already have /log, /shortlog, etc, and JavaScript code can be simplified, making it easier to add obsolescence graph and other features.
Mon, 20 Nov 2017 21:47:11 +0800 hgweb: check changeset's original branch in graphdata()
Anton Shestakov <av6@dwimlabs.net> [Mon, 20 Nov 2017 21:47:11 +0800] rev 35095
hgweb: check changeset's original branch in graphdata() This piece of code checks if a changeset is the tip of its branch, but as can be seen above in the context, "branch" was prepared for being displayed in hgweb by making it unicode and passing it through url.escape. It's better to use the original ctx.branch().
Sun, 19 Nov 2017 14:02:50 +0800 hgweb: show instabilities of a commit
Anton Shestakov <av6@dwimlabs.net> [Sun, 19 Nov 2017 14:02:50 +0800] rev 35094
hgweb: show instabilities of a commit In paper, coal, gitweb and monoblue a new "tag" (or multiple, if there are many instabilities) is added to the same line that has phase, branch, etc of a changeset; in gitweb and monoblue this element has a light red background, in paper and coal the element is black and underlined. In spartan theme instabilities are shown on a separate line. While test-obsolete.t uses first(phasedivergent()) revset to pick a changeset to test, that particular changeset is also an orphan, so two different instability tags are displayed.
Sun, 19 Nov 2017 13:18:54 +0800 context: add instabilities() method to basefilectx
Anton Shestakov <av6@dwimlabs.net> [Sun, 19 Nov 2017 13:18:54 +0800] rev 35093
context: add instabilities() method to basefilectx This method is now used in webutils.commonentry(), which adds common data items (commit hash, author, date, etc) for rendering changesets in hgweb. Usually, commonentry() is given a changectx as ctx; but in views related to files (e.g. file view, diff, annotate) it's replaced by a filectx, so the latter also needs to have instabilities() method.
Sun, 19 Nov 2017 04:11:21 +0100 run-test: drop 'execfile' usage for 'common-pattern.py' file
Boris Feld <boris.feld@octobus.net> [Sun, 19 Nov 2017 04:11:21 +0100] rev 35092
run-test: drop 'execfile' usage for 'common-pattern.py' file This is required for Python 3.
Sun, 19 Nov 2017 04:10:55 +0100 run-test: use byte for 'common-pattern.py' path
Boris Feld <boris.feld@octobus.net> [Sun, 19 Nov 2017 04:10:55 +0100] rev 35091
run-test: use byte for 'common-pattern.py' path This is required for Python 3.
Mon, 20 Nov 2017 14:30:54 -0500 templates: reword 'back to filelog' link anchor text
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Mon, 20 Nov 2017 14:30:54 -0500] rev 35090
templates: reword 'back to filelog' link anchor text This anchor text is problematic in two ways: first, the "back to" part assumes that you got to the page showing it via the filelog. This is not necessarily true, as there are other ways to get to that view besides the filelog view, such as for example following the history of lines from a file. Second, it uses "filelog" jargon, which refers to how each file has its own revlog. This is internal jargon that has no business being exposed to the end user. I just reworded this template to improve understanding.
Sat, 18 Nov 2017 12:04:08 +0800 hgweb: show obsolescence status of a commit
Anton Shestakov <av6@dwimlabs.net> [Sat, 18 Nov 2017 12:04:08 +0800] rev 35089
hgweb: show obsolescence status of a commit As with phases, spartan theme shows a simple "obsolete: yes" on its own line (this allows replacing "yes" with something more useful in future, like output of obsfate* template functions). Everywhere else a new "tag" is added to the same line that has phase, branch, etc of a changeset; in gitweb and monoblue the element has gray background, in paper and coal the element is gray with a dashed underline.
Sat, 18 Nov 2017 11:58:57 +0800 context: add obsolete() method to basefilectx
Anton Shestakov <av6@dwimlabs.net> [Sat, 18 Nov 2017 11:58:57 +0800] rev 35088
context: add obsolete() method to basefilectx This method is now used in webutils.commonentry(), which adds common data items (commit hash, author, date, etc) for rendering changesets in hgweb. Usually, commonentry() is given a changectx as ctx; but in views related to files (e.g. file view, diff, annotate) it's replaced by a filectx, so the latter also needs to have obsolete() method.
Sat, 18 Nov 2017 13:00:47 +0800 check-code: grep's context flags don't need an extra space before number
Anton Shestakov <av6@dwimlabs.net> [Sat, 18 Nov 2017 13:00:47 +0800] rev 35087
check-code: grep's context flags don't need an extra space before number A bit of useless trivia found while researching this: OpenBSD's grep's -C has a default value (of 2) and disallows space before the argument (while -A and -B allow).
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: make map implementation overridable
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35086
dirstate: make map implementation overridable Other implementations of dirstate will want to replace the class used for the dirstate map. Allow this to happen by making the class an attribute of the dirstate. Differential Revision: https://phab.mercurial-scm.org/D1347
Wed, 15 Nov 2017 01:07:42 -0800 fsmonitor: only access inner dirstate map if it is available
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35085
fsmonitor: only access inner dirstate map if it is available As part of the dirstate refactor, fsmonitor was updated to directly access the inner map of the dirstatemap object. Dirstatemap reimplementations may not use a map like this, so only access it if it is there. Differential Revision: https://phab.mercurial-scm.org/D1346
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: add explicit methods for querying directories (API)
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35084
dirstate: add explicit methods for querying directories (API) The set-like object returned by dirstate.dirs may be difficult for other implementations of the dirstate to provide, and is unnecessary as it is only ever used for __contains__. Instead, provide an explicit method for testing for a directory. .. api:: dirstate no longer provides a `dirs()` method. To test for the existence of a directory in the dirstate, use `dirstate.hasdir(dirname)`. Differential Revision: https://phab.mercurial-scm.org/D1345
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: remove _droppath method
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35083
dirstate: remove _droppath method This method now doesn't do very much interesting and can be removed. The updated files set can be updated where _droppath was originally called. Differential Revision: https://phab.mercurial-scm.org/D1344
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: move dropping of folded filenames into the dirstate map
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35082
dirstate: move dropping of folded filenames into the dirstate map When dropping files from the dirstate, the corresponding entry in the filefoldmap is also dropped. Move this into the dirstate map object. A future implementation of the dirstate will maintain the filefoldmap differently. Differential Revision: https://phab.mercurial-scm.org/D1343
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: move management of the dirstate dirs into the dirstatemap
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35081
dirstate: move management of the dirstate dirs into the dirstatemap The dirstate dirs object is owned by the map, so move management of that object there. A future implementation of the dirstate will manage the dirs object differently. Differential Revision: https://phab.mercurial-scm.org/D1342
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: move management of nonnormal sets into dirstate map
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35080
dirstate: move management of nonnormal sets into dirstate map The dirstate map owns the nonnormal sets, and so should be the class to update them. A future implementation of the dirstate will manage these maps differently. The action of clearing ambiguous times is now entirely controlled by the dirstate map, so it moves there too. Differential Revision: https://phab.mercurial-scm.org/D1341
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: add explicit methods for modifying dirstate
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35079
dirstate: add explicit methods for modifying dirstate Instead of assigning dirstatetuple objects to entries in the dirstate, move responsibility for creating tuples into the dirstatemap. Differential Revision: https://phab.mercurial-scm.org/D1340
Wed, 15 Nov 2017 01:07:42 -0800 dirstate: document dirstatemap interface
Mark Thomas <mbthomas@fb.com> [Wed, 15 Nov 2017 01:07:42 -0800] rev 35078
dirstate: document dirstatemap interface Differential Revision: https://phab.mercurial-scm.org/D1380
Mon, 13 Nov 2017 19:12:56 -0800 bundlerepo: rename "bundlefilespos" variable and attribute
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Nov 2017 19:12:56 -0800] rev 35077
bundlerepo: rename "bundlefilespos" variable and attribute Strictly speaking, this variable tracks offsets within the changegroup, not the bundle. While we're here, mark a class attribute as private because it is. .. api:: Rename bundlerepo.bundlerepository.bundlefilespos to _cgfilespos. Differential Revision: https://phab.mercurial-scm.org/D1384
Mon, 13 Nov 2017 19:12:17 -0800 bundlerepo: rename "bundle" arguments to "cgunpacker"
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Nov 2017 19:12:17 -0800] rev 35076
bundlerepo: rename "bundle" arguments to "cgunpacker" "bundle" was appropriate for the bundle1 days where a bundle was a changegroup. In a bundle2 world, changegroup readers are referred to as "changegroup unpackers." Differential Revision: https://phab.mercurial-scm.org/D1383
Sat, 11 Nov 2017 18:55:04 -0800 bundlerepo: use early return
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 11 Nov 2017 18:55:04 -0800] rev 35075
bundlerepo: use early return I like avoiding patterns that lead to the pyramid of doom. Differential Revision: https://phab.mercurial-scm.org/D1382
Sun, 05 Nov 2017 08:23:12 +0100 test-pattern: actually update tests using the patterns
Boris Feld <boris.feld@octobus.net> [Sun, 05 Nov 2017 08:23:12 +0100] rev 35074
test-pattern: actually update tests using the patterns We mass update the tests now. This will help the next soul touching the http protocol.
Sun, 05 Nov 2017 08:23:53 +0100 test-pattern: substitute the HTTP log timestamp too
Boris Feld <boris.feld@octobus.net> [Sun, 05 Nov 2017 08:23:53 +0100] rev 35073
test-pattern: substitute the HTTP log timestamp too We add a pattern matching the infamous timestamp in http log. Now, we should be able to have change appears in https log without having to re-glob the whole thing over and over.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip