Fri, 31 Mar 2017 11:02:05 +0200 hook: fix name used in untrusted message
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:02:05 +0200] rev 31743
hook: fix name used in untrusted message The name used in the message we issue when a hook is untrusted was using "name" which is actually the hook type and not the name of the hook.
Fri, 31 Mar 2017 10:59:37 +0200 hook: use "htype" as variable name in _pythonhook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 10:59:37 +0200] rev 31742
hook: use "htype" as variable name in _pythonhook We rename 'name' to 'htype' because it fits the variable content better. Multiple python hooks already use 'htype' as a name for the argument. This makes the difference with "hname" clearer and the code less error prone.
Thu, 30 Mar 2017 17:29:03 +0200 run-tests: auto-replace 'TXNID' output
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 30 Mar 2017 17:29:03 +0200] rev 31741
run-tests: auto-replace 'TXNID' output Hooks related to the transaction are aware of the transaction id. By definition this txn-id is unique and different for each transaction. As a result it can never be predicted in test and always needs matching. As a result, touching any like with this data is annoying. We solve the problem once and for all by installing an automatic replacement. In test, this will now show as: TXNID=TXN:$ID$
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: use readasstandin() to read hex hash directly from filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31740
largefiles: use readasstandin() to read hex hash directly from filectx BTW, C implementation of hexdigest() for SHA-1/256/512 returns hex hash in lower case, and doctest in Python standard hashlib assumes that, too. But it isn't explicitly described in API document or so. Therefore, we can't assume that hexdigest() always returns hex hash in lower case, for any hash algorithms, on any Python runtimes and versions. From point of view of that, it is reasonable for portability that 40800668e019 applies lower() on hex hash in overridefilemerge(). But on the other hand, in largefiles extension, there are still many code paths comparing between hex hashes or storing hex hash into standin file, without lower(). Switching to hash algorithm other than SHA-1 may be good chance to clarify our policy about hexdigest()-ed hash value string. - assume that hexdigest() always returns hex hash in lower case, or - apply lower() on hex hash in appropriate layers to ensure lower-case-ness of it for portability
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: remove unused readstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31739
largefiles: remove unused readstandin() Now, there is no client of readstandin().
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: make copytostore() accept only changectx as the 2nd argument (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31738
largefiles: make copytostore() accept only changectx as the 2nd argument (API) As the name describes, the 2nd argument 'revorctx' of copytostore() can accept non-changectx value, for historical reason, But, since 10561eb97c7f, copyalltostore(), the only one copytostore() client in Mercurial source tree, always passes changectx as 'revorctx'. Therefore, it is reasonable to make copytostore() accept only changectx as the 2nd argument, now.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: remove unused keyword argument of copytostore() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31737
largefiles: remove unused keyword argument of copytostore() (API) AFAIK, 'uploaded' argument of copytostore() (or copytocache(), before renaming at c65f5b6e26d4) has been never used both on caller and callee sides, since official release of bundled largefiles extension.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: add copytostore() fstandin argument to replace readstandin() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31736
largefiles: add copytostore() fstandin argument to replace readstandin() (API) copyalltostore(), only one caller of copytostore(), already knows standin file name of the target largefile. Therefore, passing it to copytostore() is more efficient than calculating it in copytostore() or readstandin().
Sat, 01 Apr 2017 02:32:47 +0900 largefiles: replace readstandin() by readasstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:47 +0900] rev 31735
largefiles: replace readstandin() by readasstandin() These code paths already (or should, for efficiency at repetition) know the target changectx and path of standin file.
Sat, 01 Apr 2017 02:32:31 +0900 largefiles: introduce readasstandin() to read hex hash from given filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:31 +0900] rev 31734
largefiles: introduce readasstandin() to read hex hash from given filectx This will be used to centralize and encapsulate the logic to read hash from given (filectx of) standin file. readstandin() isn't suitable for this purpose, because there are some code paths, which want to read hex hash directly from filectx.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31733
rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514) Previously, the pull would succeed, but the subsequent rebase would fail due to the rebase.requiredest flag. Now abort earlier with a more useful error message.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: demonstrate behavior with requiredest and pull --rebase
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31732
rebase: demonstrate behavior with requiredest and pull --rebase
Thu, 30 Mar 2017 03:50:10 -0700 rebase: allow destination-free continue and abort (issue5513)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31731
rebase: allow destination-free continue and abort (issue5513)
Thu, 30 Mar 2017 03:50:10 -0700 rebase: test to show brokenness with requiredest
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31730
rebase: test to show brokenness with requiredest As shown in issue5513, --continue is broken when destination is required. This adds a patch that demonstates this silly behavior, which will be fixed in a future patch.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: move destination test to new test file
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31729
rebase: move destination test to new test file We'll be adding a lot more tests here, so it makes sense to have this in its own file now.
Sat, 01 Apr 2017 00:21:17 -0400 templatefilter: add support for 'long' to json()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 00:21:17 -0400] rev 31728
templatefilter: add support for 'long' to json() When disabling the '#requires serve' check in test-hgwebdir.t and running it on Windows, several 500 errors popped up when querying '?style=json', with the following in the error log: File "...\\mercurial\\templater.py", line 393, in runfilter "keyword '%s'") % (filt.func_name, dt)) Abort: template filter 'json' is not compatible with keyword 'lastchange' The swallowed exception at that point was: File "...\\mercurial\\templatefilters.py", line 242, in json raise TypeError('cannot encode type %s' % obj.__class__.__name__) TypeError: cannot encode type long This corresponds to 'lastchange' being populated by hgweb.common.get_stat(), which uses os.stat().st_mtime. os.stat_float_times() is being disabled in util, so the type for the times is 'long' on Windows, and 'int' on Linux.
Thu, 30 Mar 2017 21:40:10 +0200 hgweb: prefix line id by ctx shortnode in filelog when patches are shown
Denis Laxalde <denis@laxalde.org> [Thu, 30 Mar 2017 21:40:10 +0200] rev 31727
hgweb: prefix line id by ctx shortnode in filelog when patches are shown When "patch" query parameter is present in requests to filelog view, line ids in patches diff are no longer unique in the page since several patches are shown on the same page. We now prefix line id by changeset shortnode when several patches are displayed in the same page to have unique line ids overall.
Wed, 29 Mar 2017 12:14:20 -0700 test-check-code: prevent files being added to the root directory
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:14:20 -0700] rev 31726
test-check-code: prevent files being added to the root directory Adding new files in the root directory is probably a mistake, and is usually discouraged [1]. The test catches it to avoid mistakes like [2]. Modify the test if files need to be added in the root. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-July/086442.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095836.html
Wed, 29 Mar 2017 09:54:34 -0400 sslutil: clarify internal documentation
Matt Harbison <matt_harbison@yahoo.com> [Wed, 29 Mar 2017 09:54:34 -0400] rev 31725
sslutil: clarify internal documentation I ran into this python issue with an incomplete certificate chain on Windows recently, and this is the clarification that came from that experimenting. The comment I left on the bug tracker [1] with a reference to the CPython code [2] indicates that the original problem I had is a different bug, but happened to be mentioned under issue20916 on the Python bug tracker. [1] https://bz.mercurial-scm.org/show_bug.cgi?id=5313#c7 [2] https://hg.python.org/cpython/file/v2.7.12/Modules/_ssl.c#l628
Wed, 29 Mar 2017 16:28:51 -0700 unionrepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:51 -0700] rev 31724
unionrepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:28:00 -0700 bundlerepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:00 -0700] rev 31723
bundlerepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:23:04 -0700 revlog: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:23:04 -0700] rev 31722
revlog: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:46:57 -0700 check-code: detect r.revision(r.node(rev))
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:46:57 -0700] rev 31721
check-code: detect r.revision(r.node(rev)) revlog.revision takes either node or rev, but taking a rev is more efficient, because converting rev to node is just a seek and read. That's cheaper than converting node to rev, which may require O(n) walk in revlog index for the first times, and then triggering building the radix tree index. Even with the radix tree built, rev -> node is still faster than node -> rev because the radix tree requires more jumps in memory. So r.revision(r.node(rev)) should be changed to r.revision(rev). This patch adds a check-code rule to detect that.
Wed, 29 Mar 2017 12:37:03 -0700 hardlink: check directory's st_dev when copying files
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:37:03 -0700] rev 31720
hardlink: check directory's st_dev when copying files Previously, when copying a file, copyfiles will compare src's st_dev with dirname(dst)'s st_dev, to decide whether to enable hardlink or not. That could have issues on Linux's overlayfs, where stating directories could result in different st_dev from st_dev of stating files, even if both the directories and the files exist in the overlay's upperdir. This patch fixes it by checking dirname(src) instead. It's more consistent because we are checking directories for both src and dest. That fixes test-hardlinks.t running on common Docker setups.
Wed, 29 Mar 2017 12:26:46 -0700 hardlink: duplicate hardlink detection for copying files and directories
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:26:46 -0700] rev 31719
hardlink: duplicate hardlink detection for copying files and directories A later patch will change one of them so they diverge.
Wed, 29 Mar 2017 12:21:15 -0700 hardlink: extract topic text logic of copyfiles
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:21:15 -0700] rev 31718
hardlink: extract topic text logic of copyfiles The topic text shows whether it's "linking" or "copying", based on "hardlink" value. The function is extracted so a later patch can reuse it.
Wed, 29 Mar 2017 14:56:58 +0530 tests: add check to make sure summary works on Python 2
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:56:58 +0530] rev 31717
tests: add check to make sure summary works on Python 2
Wed, 29 Mar 2017 14:47:52 +0530 color: replace str() with pycompat.bytestr()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:47:52 +0530] rev 31716
color: replace str() with pycompat.bytestr()
Sun, 26 Mar 2017 20:52:51 +0530 diff: slice over bytes to make sure conditions work normally
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:52:51 +0530] rev 31715
diff: slice over bytes to make sure conditions work normally Both of this are part of generating `hg diff` on python 3.
Wed, 29 Mar 2017 20:19:26 -0700 minirst: remove redundant _admonitions set
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:19:26 -0700] rev 31714
minirst: remove redundant _admonitions set As Yuya pointed out during a review a month ago, _admonitions and _admonitiontitles are largely redundant. With the last commit, they are exactly redundant. So, remove _admonitions and use _admonitiontitles.keys() instead.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip