Tue, 16 Jan 2018 08:40:14 -0500 svnsubrepo: check if subrepo is missing when checking dirty state (issue5657)
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 16 Jan 2018 08:40:14 -0500] rev 35676
svnsubrepo: check if subrepo is missing when checking dirty state (issue5657) During an hg convert command, subrepos are not checked out. However, a manifestmerge may occur during an hg convert if there is a merge commit, which in particular will check the dirty state of subrepos. Before this change, the lack of a checked out subrepo would error out. This check for svn subrepos is modelled after 2fdea636f254 for git subrepos.
Wed, 17 Jan 2018 13:02:42 +0100 win32text: use 'tiprev' when appropriate
Boris Feld <boris.feld@octobus.net> [Wed, 17 Jan 2018 13:02:42 +0100] rev 35675
win32text: use 'tiprev' when appropriate This is cleaner than the current 'len(repo) - 1' form.
Wed, 17 Jan 2018 13:01:38 +0100 patchbomb: use 'tiprev' when appropriate
Boris Feld <boris.feld@octobus.net> [Wed, 17 Jan 2018 13:01:38 +0100] rev 35674
patchbomb: use 'tiprev' when appropriate This is cleaner than the current 'len(repo) - 1' form.
Thu, 04 May 2017 02:28:19 +0200 revset: use 'tiprev' when appropriate
Boris Feld <boris.feld@octobus.net> [Thu, 04 May 2017 02:28:19 +0200] rev 35673
revset: use 'tiprev' when appropriate This is cleaner than the current 'len(repo) - 1' forms
Thu, 04 May 2017 02:24:04 +0200 changelog: use 'tiprev()' in 'tip()'
Boris Feld <boris.feld@octobus.net> [Thu, 04 May 2017 02:24:04 +0200] rev 35672
changelog: use 'tiprev()' in 'tip()' Since 'tip()' is just a node version of 'tiprev()' we should reuse the code.
Thu, 04 May 2017 02:23:21 +0200 changelog: introduce a 'tiprev' method
Boris Feld <boris.feld@octobus.net> [Thu, 04 May 2017 02:23:21 +0200] rev 35671
changelog: introduce a 'tiprev' method Accessing tiprev is a common need through the code base. It is usually done using "len(changelog) -1". That form is tedious and error-prone. For example, it will give wrong results on filtered changelog (if the unfiltered tip is filtered). As a result, we introduce a simple 'tiprev()' method to provide this exact information in a nice way.
Wed, 17 Jan 2018 15:47:38 -0500 contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com> [Wed, 17 Jan 2018 15:47:38 -0500] rev 35670
contrib: add some basic scaffolding for some fuzz test targets I'd like to get the majority of our C code covered by automated fuzz testing. I've started with bdiff because it was already decoupled from libpython and therefore was fairly quick to produce a working fuzzer. The code here is a little odd because I've been having trouble convincing libfuzzer to define a main and I threw in the towel. This code will also work with github.com/google/oss-fuzz, and once it lands in our main repo I intend to enable automated fuzzing in oss-fuzz with reports going to our security alias. Differential Revision: https://phab.mercurial-scm.org/D1875
Wed, 17 Jan 2018 15:56:12 -0500 formatting: enforce clang-format on all .cc files as well as .c files
Augie Fackler <augie@google.com> [Wed, 17 Jan 2018 15:56:12 -0500] rev 35669
formatting: enforce clang-format on all .cc files as well as .c files As part of my upcoming fuzzer patch we're going to grow some .cc files. They're not part of the release build (they're only used for fuzzing, which requires clang 6 which in turn implies a working C++ compiler), so I'm not terribly worried about growing some C++ files. Differential Revision: https://phab.mercurial-scm.org/D1874
Wed, 17 Jan 2018 15:28:38 -0500 hghave: add test for clang 6 and later
Augie Fackler <augie@google.com> [Wed, 17 Jan 2018 15:28:38 -0500] rev 35668
hghave: add test for clang 6 and later clang 6 includes integrated libfuzzer support, which makes fuzzer stuff a little easier to work with. Differential Revision: https://phab.mercurial-scm.org/D1873
Sun, 14 Jan 2018 12:06:27 -0800 py3: cast error message to localstr in blackbox.py
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Jan 2018 12:06:27 -0800] rev 35667
py3: cast error message to localstr in blackbox.py According to the exceptions reporting mechanism, this is the #1 crasher in the test harness for Python 3. Since this exception is in an except block, we'll likely get a new #1 crasher after this change. But at least we won't die during error handling! Differential Revision: https://phab.mercurial-scm.org/D1478
Wed, 10 Jan 2018 21:27:05 -0800 lfs: remove internal url in test
Jun Wu <quark@fb.com> [Wed, 10 Jan 2018 21:27:05 -0800] rev 35666
lfs: remove internal url in test `test-lfs-test-server.t` refers to a FB internal domain and requires certain implementation (ex. set error code to 404) at that endpoint. Without any workaround, It should in theory error out like "Domain cannot be resolved". I don't know how Matt Harbison ran the test. This patch changes the test to only depend on `lfs-test-server`. Unfortunately the logic has to be changed since `lfs-test-server` does not set error code to 404 but just removes "download" from "actions". Differential Revision: https://phab.mercurial-scm.org/D1849
Sun, 14 Jan 2018 18:12:51 -0500 lfs: control tracked file selection via a tracked file
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jan 2018 18:12:51 -0500] rev 35665
lfs: control tracked file selection via a tracked file Since the lfs tracking policy can dramatically affect the repository, it makes more sense to have the policy file checked in, than to rely on all developers configuring their .hgrc properly. The inspiration for this is the .hgeol file. The configuration lives under '[track]', so that other things can be added in the future. Eventually, the config option should be limited to `convert` only. If the file can't be parsed for any reason (including unrecognized elements of the minifileset language), the commit will abort until the problem is corrected. This seems more useful than the warning that hgeol emits, and has no effect on reading the data, so there's no compatibility concerns. My initial thought was to read the file and change each "key = value" line into "((key) & (value))", so that each line could be ORed together, and make a single pass at compiling. Unfortunately, that prevents exclusions if there's a catchall rule. Consider what happens to a large *.c file here: [track] **.c = none() ** = size('>1MB') # ((**.c) & (none())) | ((**) & (size('>1MB'))) => anything > 1MB I also thought about having separate [include] and [exclude] sections. But that just seems to open things up to user mistakes. Consider: [include] **.zip = all() **.php = size('>10MB') [exclude] **.zip = all() # Who wins? **.php = none() # Effectively 'all()' (i.e. nothing excluded), or >10MB ? Therefore, it just compiles each key and value separately, and walks until the key matches something. I'm not sure how to enforce just file patterns on LHS without leaking knowledge about the minifileset here. That means this will allow odd looking lines like this: [track] **.c | **.txt = none() But that's also fewer lines to compile, so slightly more efficient? Some things like 'none()' won't work as expected on LHS though, because that won't match, so that line is skipped. For now, these quirks are not mentioned in the documentation. Jun previously expressed concern about efficiency when scaling to large repos, so I tried avoiding 'repo[None]'. (localrepo.commit() gets repo[None] already, but doesn't tie it to the workingcommitctx used here.) Therefore, I looked at the passed context for 'AMR' status. But that doesn't help with the normal case where the policy file is tracked, but clean. That requires looking up p1() to read the file. I don't see any way to get the content of one file without first creating the full parent context.
Sun, 14 Jan 2018 01:04:45 -0500 lfs: move the tracked file function creation to a method
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jan 2018 01:04:45 -0500] rev 35664
lfs: move the tracked file function creation to a method Once a commitable file format for tracked config is agreed upon, I can't see any reason to have a config based way to control this. (Other than convert. That will be necessary to override the file when converting to normal files. Also, converting to lfs needs this if not splicing the file in at the beginning. So maybe the existing config option should be `convert` specific.) Looking to hgeol for precedent, it looks like policy that affects how items are stored are handled only by the tracked file, while policy that affects the checkout can be handled by either a user config or the tracked file (but the latter takes precedence). We probably need a transition period, so this transition policy can be controlled by the function. Additionally, it provides a place for convert to wrap to override the file based config.
Tue, 16 Jan 2018 20:15:07 -0500 lfs: allow the pointer file to be viewed with `hg cat -T '{rawdata}'`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jan 2018 20:15:07 -0500] rev 35663
lfs: allow the pointer file to be viewed with `hg cat -T '{rawdata}'` The only other interface to this data is `hg debugdata`, which requires knowledge of the filelog revision that corresponds to the changeset. Since the data is uninterpreted, this is an important debugging capability, and needs to be simpler to use than that. For non-LFS files, this displays the regular data. Alternately, we could forego the messy function extraction in the last patch if this template keyword can just be added unconditionally.
Tue, 16 Jan 2018 19:56:00 -0500 cat: factor out a function that populates the formatter
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jan 2018 19:56:00 -0500] rev 35662
cat: factor out a function that populates the formatter This will allow extensions to add data to the templater.
Sun, 14 Jan 2018 12:07:06 -0500 svnsubrepo: add new method _svnmissing
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 14 Jan 2018 12:07:06 -0500] rev 35661
svnsubrepo: add new method _svnmissing This is modelled after _gitmissing from dea6efdd7ec4 and also necessary for svn. I'm not sure exactly how this hasn't been more of a problem for svn until now, actually.
Sun, 14 Jan 2018 12:05:28 -0500 svnsubrepo: decorate dirty method with annotatesubrepoerror
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Sun, 14 Jan 2018 12:05:28 -0500] rev 35660
svnsubrepo: decorate dirty method with annotatesubrepoerror This function invokes svn commands which can error out in any number of ways, so it's helpful to know in which subrepo this error happens.
Tue, 16 Jan 2018 22:14:33 +0900 match: do not weirdly include explicit files excluded by -X option
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Jan 2018 22:14:33 +0900] rev 35659
match: do not weirdly include explicit files excluded by -X option Actually, this was the original behavior. Before a83a7d27911e, "log" and "files" showed nothing if "FILE -X FILE" was specified, whereas "debugwalk" got confused by an explicit FILE pattern. Under the hood, "log" and "files" use m() and ctx.matches(m) respectively, and "debugwalk" uses ctx.walk(m). I suspect dirstate.walk() goes wrong in _walkexplicit(), which seems to blindly trust m.files(). I reckon the original "log"/"files" behavior is correct, and drop the hack from the differencematcher.
Sun, 14 Jan 2018 15:56:22 -0500 lfs: add the '{oid}' template keyword to '{lfs_files}'
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jan 2018 15:56:22 -0500] rev 35658
lfs: add the '{oid}' template keyword to '{lfs_files}' The 'sha256:' prefix is skipped because this seems like the most convenient way to consume it. Maybe we should also add a '{oid_type}' keyword? Then again, that can be added in the future if a different algorithm is supported.
Sun, 14 Jan 2018 15:39:10 -0500 lfs: convert '{lfs_files}' keyword to a hybrid list
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jan 2018 15:39:10 -0500] rev 35657
lfs: convert '{lfs_files}' keyword to a hybrid list This will allow more attributes about the file to be queried.
Sun, 10 Dec 2017 21:42:33 +0100 showstack: add an extension docstring
Boris Feld <boris.feld@octobus.net> [Sun, 10 Dec 2017 21:42:33 +0100] rev 35656
showstack: add an extension docstring Now, running `hg help showstack` will give details on how to use the extension.
Mon, 15 Jan 2018 10:44:49 +0000 bookmark: run 'pushkey' hooks after bookmark move, not 'prepushkey'
Boris Feld <boris.feld@octobus.net> [Mon, 15 Jan 2018 10:44:49 +0000] rev 35655
bookmark: run 'pushkey' hooks after bookmark move, not 'prepushkey' This was a silly copy paste mistake. Spotted by Mitchell Plamann from Jane Street.
Mon, 15 Jan 2018 19:44:18 +0800 hgweb: remove unused second argument of nextPageVarGet()
Anton Shestakov <av6@dwimlabs.net> [Mon, 15 Jan 2018 19:44:18 +0800] rev 35654
hgweb: remove unused second argument of nextPageVarGet() nextPageVarGet is a function that's used in ajaxScrollInit() to produce URL of the next page. Before f84b01257e06, its second argument previousVal was a number on /graph pages, and the code was simply adding 60 to it and returning the resulting value. Now previousVal can only be a string containing changeset hash, which can't be used the same way (and in fact isn't used in any way).
Sun, 14 Jan 2018 20:06:56 -0800 dispatch: handle IOError when writing to stderr
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Jan 2018 20:06:56 -0800] rev 35653
dispatch: handle IOError when writing to stderr Previously, attempts to write to stderr in dispatch.run() may lead to an exception being thrown. This would likely be handled by Python's default exception handler, which would print the exception and exit 1. Code in this function is already catching IOError for stdout failures and converting to exit code 255 (-1 & 255 == 255). Why we weren't doing the same for stderr for the sake of consistency, I don't know. I do know that chg and hg diverged in behavior here (as the changed test-basic.t shows). After this commit, we catch I/O failure on stderr and change the exit code to 255. chg and hg now behave consistently. As a bonus, Rust hg also now passes this test. I'm skeptical at changing the exit code due to failures this late in the process. I think we should consider preserving the current exit code - assuming it is non-0. And, we may want to preserve the exit code completely if the I/O error is EPIPE (and potentially other special error classes). There's definitely room to tweak behavior. But for now, let's at least prevent the uncaught exception. Differential Revision: https://phab.mercurial-scm.org/D1860
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 +10000 tip