Sat, 10 Jun 2017 10:24:33 -0400 context: inline makememctx (API)
Sean Farley <sean@farley.io> [Sat, 10 Jun 2017 10:24:33 -0400] rev 32765
context: inline makememctx (API) I have always thought it weird that we have a helper method instead of just using __init__. So, I ripped it out.
Fri, 09 Jun 2017 13:39:13 -0700 context: add convenience method for returning a memfilectx from a patch
Sean Farley <sean@farley.io> [Fri, 09 Jun 2017 13:39:13 -0700] rev 32764
context: add convenience method for returning a memfilectx from a patch This is mostly a copy of what makememctx does but refactored to make it behave more like our other convenience methods.
Fri, 09 Jun 2017 13:25:02 -0700 memctx: refactor inline getfilectx into convenience method
Sean Farley <sean@farley.io> [Fri, 09 Jun 2017 13:25:02 -0700] rev 32763
memctx: refactor inline getfilectx into convenience method No actual logic is changing, just moving code so __init__ is easier to read.
Fri, 09 Jun 2017 13:55:51 -0700 hgweb: refresh styling of gitweb's search form
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:55:51 -0700] rev 32762
hgweb: refresh styling of gitweb's search form gitweb was missing the hint hover box. So that was added. Also, the positioning of the form was absolute and it didn't vertically align on all pages. The element has been moved inline with the navigation links (which now are contained in a div) and flexbox is used to obtain sane alignment of the navigation links and search form. For those new to flexbox, "justify-content: space-between" basically says to maximize space elements. You can use it to easily get left and right justified containers without having to worry about width, floating, etc. "align-items: center" centers all items in a cross-axis. I've literally wasted hours trying to figure out both these problems before flexbox. Flexbox is amazing. Flexbox has been supported by Chrome and Firefox for a few years. But it is only supported by IE 11. I'm willing to wager that people using this either won't be using IE or will be using IE 11. So I'm willing to be a bit aggressive in adopting flexbox because it makes CSS alignment so much easier.
Fri, 09 Jun 2017 13:45:36 -0700 hgweb: consistently add search form to all gitweb pages
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:45:36 -0700] rev 32761
hgweb: consistently add search form to all gitweb pages Paper has it on all pages. Not sure why gitweb doesn't. I think it should be everywhere because it is a useful feature. Also, we weren't consistently adding the HTML in the same place. This was OK since the element is absolutely positioned. But this bothered me a bit, so I went ahead and fixed it.
Fri, 09 Jun 2017 13:42:38 -0700 hgweb: consolidate search form for gitweb
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:42:38 -0700] rev 32760
hgweb: consolidate search form for gitweb
Fri, 09 Jun 2017 13:41:10 -0700 hgweb: consolidate search form for monoblue
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:41:10 -0700] rev 32759
hgweb: consolidate search form for monoblue Same deal as for paper.
Fri, 09 Jun 2017 13:59:13 -0700 hgweb: consolidate search form for paper
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:59:13 -0700] rev 32758
hgweb: consolidate search form for paper AFAICT this was mostly a bunch of copy pasta. The only variation is some pages defined a "value" attribute. The "query" variable will just be empty on pages that don't accept it. So let's consolidate the template and remove the redundancy.
Fri, 09 Jun 2017 23:56:50 -0400 test-extension: fix load path for Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Jun 2017 23:56:50 -0400] rev 32757
test-extension: fix load path for Windows The previous code was trying to load the extension from /tmp/hgtests.xxx/..., but the actual path for tests is C:\Users\...\Temp\hgtests.xxx\... I assume that the former is an MSYS path that maps somewhere under C:\MinGW.
Sat, 10 Jun 2017 00:11:54 -0400 test-setdiscovery: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jun 2017 00:11:54 -0400] rev 32756
test-setdiscovery: stabilize for Windows Windows wants double quotes here.
Sat, 10 Jun 2017 02:20:14 -0400 convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jun 2017 02:20:14 -0400] rev 32755
convert: correct the documentation about whitespace in branchmap branches Might as well let the users know they can get rid of branch names with spaces.
Thu, 08 Jun 2017 00:51:46 +0530 py3: use pycompat.bytestr() instead of str()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 08 Jun 2017 00:51:46 +0530] rev 32754
py3: use pycompat.bytestr() instead of str()
Fri, 02 Jun 2017 16:57:21 +0530 py3: convert bool variables to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Jun 2017 16:57:21 +0530] rev 32753
py3: convert bool variables to bytes
Fri, 09 Jun 2017 13:07:49 +0900 context: avoid writing outdated dirstate out (issue5584)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:49 +0900] rev 32752
context: avoid writing outdated dirstate out (issue5584) Before this patch, workingctx.status() may cause writing outdated dirstate out, if: - .hg/dirstate is changed simultaneously after last loading it, - there is any file, which should be dirstate.normal()-ed Typical issue case is: - the working directory is updated by "hg update" - .hg/dirstate is updated in background (e.g. fsmonitor) This patch compares identities of dirstate before and after acquisition of wlock, and avoids writing outdated dirstate out, if change of .hg/dirstate is detected.
Fri, 09 Jun 2017 13:07:49 +0900 tests: factor external procedures out for portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:49 +0900] rev 32751
tests: factor external procedures out for portability Fortunately, "&&" is treated as "execute next, if previous doesn't fail" both on POSIX and Windows. But keeping portability of "dirstaterace.command" manually is troublesome. This patch factors external procedures out as a shell script for portability. "sh SCRIPT" always allows scripting in POSIX style. This change is also for convenience. Fixed script name can reduce command line arguments. "r" prefix is needed for "sh '$TESTTMP/dirstaterace.sh'", because $TESTTMP contains backslash on Windows.
Fri, 09 Jun 2017 13:07:48 +0900 dirstate: add identity information to detect simultaneous changing in storage
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:48 +0900] rev 32750
dirstate: add identity information to detect simultaneous changing in storage This identity is used to examine whether dirstate is simultaneously changed in storage after previous caching (see issue5584 for detail). util.cachestat can't be used for this purpose, because it has no valuable information on Windows. On the other hand, util.filestat can detect changing dirstate in storage certainly, regardless of platforms. https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan Strictly speaking, if underlying filesystem doesn't support ctime/mtime, util.filestat can't detect simultaneous changing in storage as expected. But simultaneous changing on such (very rare) platform can't be detected regardless of this patch series. Therefore, util.filestat should be reasonable identity for almost all usecases.
Fri, 09 Jun 2017 13:07:48 +0900 util: make filestat.__eq__ return True if both of self and old have None stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:48 +0900] rev 32749
util: make filestat.__eq__ return True if both of self and old have None stat For convenience to compare two filestat objects regardless of None-ness of stat field.
Fri, 09 Jun 2017 12:58:18 +0900 vfs: create copy at renaming to avoid file stat ambiguity if needed
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:18 +0900] rev 32748
vfs: create copy at renaming to avoid file stat ambiguity if needed In order to fix issue5418, bff5ccbe5ead made vfs.rename(checkambig=True) omit advancing mtime of renamed file, if renamed file is owned by another (EPERM is raised in this case). But this omission causes rewinding mtime at restoration in such situation, and makes avoiding file stat ambiguity difficult, because ExactCacheValidationPlan assumes that mtime should be advanced, if a file is changed in same ctime. https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan Ambiguity of file stat also requires issue5584 to be fixed with other than file stat, but "hash of file", "generation ID" and so on were already rejected ideas (please see original RFC linked from "Outline of issue" in ExactCacheValidationPlan page). This omission occurs: - only for non append-only files (dirstate, bookmarks, and phaseroots), and - only if previous transaction is rollbacked by another user The latter means "sharing a repository clone via group permission". This is reasonable usecase, but not ordinary for many users, IMHO. "hg rollback" itself has been deprecated since Mercurial 2.7, too. Therefore, increasing the cost at rollbacking previous transaction executed by another a little seems reasonable, for avoidance of file stat ambiguity. This patch does: - create copy of (already renamed) source file, if advancing mtime fails for EPERM - rename from copied file to destination file, and - advance mtime of renamed file, which is now owned by current user This patch also factors "self.join(src)" out to reduce redundancy.
Fri, 09 Jun 2017 12:58:18 +0900 vfs: factor out "rename and avoid ambiguity" to reuse
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:18 +0900] rev 32747
vfs: factor out "rename and avoid ambiguity" to reuse This makes subsequent patch simple.
Fri, 09 Jun 2017 12:58:17 +0900 util: make filestat.avoidambig() return whether ambiguity is avoided or not
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:17 +0900] rev 32746
util: make filestat.avoidambig() return whether ambiguity is avoided or not
Fri, 09 Jun 2017 10:42:19 -0700 debugcommands: issue warning when repo has secret changesets (issue5589)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 10:42:19 -0700] rev 32745
debugcommands: issue warning when repo has secret changesets (issue5589) This seems like a prudent thing to do. As the inline comment says, we may want to make this abort once the functionality is stabilized as part of `hg bundle`. Let's save that debate for another day.
Fri, 09 Jun 2017 10:41:13 -0700 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 10:41:13 -0700] rev 32744
streamclone: consider secret changesets (BC) (issue5589) Previously, a repo containing secret changesets would be served via stream clone, transferring those secret changesets. While secret changesets aren't meant to imply strong security (if you really want to keep them secret, others shouldn't have read access to the repo), we should at least make an effort to protect secret changesets when possible. After this commit, we no longer serve stream clones for repos containing secret changesets by default. This is backwards incompatible behavior. In case anyone is relying on the behavior, we provide a config option to opt into the old behavior. Note that this defense is only beneficial for remote repos accessed via the wire protocol: if a client has access to the files backing a repo, they can get to the raw data and see secret revisions.
Fri, 09 Jun 2017 21:33:15 +0900 json: pass formatting options recursively
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:33:15 +0900] rev 32743
json: pass formatting options recursively This bug was introduced in 654e9a1c8a6c. It's okay to escape <>, but is unnecessary for command output.
Sun, 23 Apr 2017 13:40:18 +0900 json: avoid extra string manipulation of dict keys
Yuya Nishihara <yuya@tcha.org> [Sun, 23 Apr 2017 13:40:18 +0900] rev 32742
json: avoid extra string manipulation of dict keys A key must be string per JSON spec, and that's also true for template dicts.
Fri, 09 Jun 2017 21:45:22 +0900 test-obsolete: include <> in user field to check JSON escapes
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:45:22 +0900] rev 32741
test-obsolete: include <> in user field to check JSON escapes I found json() filter doesn't pass formatting options recursively. That's why <> are escaped.
Fri, 09 Jun 2017 21:28:22 +0900 templatefilers: correct filename in header comment
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:28:22 +0900] rev 32740
templatefilers: correct filename in header comment
Thu, 08 Jun 2017 20:28:13 -0700 repoview: remove special casing of "requirements"
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Jun 2017 20:28:13 -0700] rev 32739
repoview: remove special casing of "requirements" At the time this code was introduced (3a6ddacb7198), the inline comment was true. This changed in e3a928bd1cd4. The proxy is no longer needed.
Wed, 07 Jun 2017 19:32:16 +0100 bookmarks: move variable initialization earlier
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:32:16 +0100] rev 32738
bookmarks: move variable initialization earlier Since we no longer set '_clean = False' during the initialization loop, we can move the attribute assignment earlier in the function for clarity. (no speed improvement expected or measured ;-) )
Wed, 07 Jun 2017 19:13:09 +0100 bookmarks: directly use base dict 'setitem'
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:13:09 +0100] rev 32737
bookmarks: directly use base dict 'setitem' The bmstore '__setitem__' method is setting an extra flag that is not needed during initialization. Skipping the method will allow further cleanup and yield some speedup as a side effect. Before: ! wall 0.009120 comb 0.010000 user 0.010000 sys 0.000000 (best of 312) After: ! wall 0.007874 comb 0.010000 user 0.010000 sys 0.000000 (best of 360)
Wed, 07 Jun 2017 19:22:39 +0100 bookmarks: rely on exception for malformed lines
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:22:39 +0100] rev 32736
bookmarks: rely on exception for malformed lines Since we already have an exception context open, for other thing, we can simplify the code a bit and rely on exception handling for invalid lines. Speed is not the main motivation for this changes. However as I'm in the middle of benchmarking things we can see a small positive impact. Before: ! wall 0.009358 comb 0.000000 user 0.000000 sys 0.000000 (best of 303) After: ! wall 0.009173 comb 0.010000 user 0.010000 sys 0.000000 (best of 310)
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip