Tue, 08 Nov 2016 08:03:43 -0800 changegroup: remove remaining uses of repo.manifest
Durham Goode <durham@fb.com> [Tue, 08 Nov 2016 08:03:43 -0800] rev 30349
changegroup: remove remaining uses of repo.manifest The remaining uses of repo.manifest in the changegroup module are treating the manifest exclusively as a revlog, so let's replace them with instances of the revlog directly. This is part of dropping all dependencies on repo.manifest in favor of repo.manifestlog.
Fri, 04 Nov 2016 13:49:15 -0700 treemanifest: fix a "treeinmem" case
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Nov 2016 13:49:15 -0700] rev 30348
treemanifest: fix a "treeinmem" case f2c5b9d48b29 (manifest: make treemanifestctx store the repo, 2016-10-18) broke most tests when run with treeinmem=True. The treeinmem mode can not be enabled by the user, so this did not break anything in practice, but it's useful to have it working for testing the treemanifest code.
Sun, 06 Nov 2016 10:46:55 -0800 perf: support measuring bdiff for all changeset related data
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Nov 2016 10:46:55 -0800] rev 30347
perf: support measuring bdiff for all changeset related data The --all argument changes the behavior of `perfbdiff` to pull in fulltext revision pairs for all changes related to a changeset. The p1 and p2 manifests will be bdiffed against current. Every file that changed between p1 and current will have its file revisions loaded and bdiffed. This mode of operation effectively measured the bdiff time required for `hg commit`.
Sun, 06 Nov 2016 11:01:25 -0800 perf: support bdiffing multiple revisions in a single revlog
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Nov 2016 11:01:25 -0800] rev 30346
perf: support bdiffing multiple revisions in a single revlog This is useful for testing bdiff performance on several revision pairs at a time.
Sun, 06 Nov 2016 09:51:14 -0800 perf: prepare to handle multiple pairs in perfbdiff
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Nov 2016 09:51:14 -0800] rev 30345
perf: prepare to handle multiple pairs in perfbdiff Before, we only supported benchmarking a single pair of texts with bdiff. We want to enable feeding larger corpora into this benchmark. So rewrite the code to support that.
Wed, 09 Nov 2016 22:06:09 +0900 py3: document why os.fsencode() can be used to get back bytes argv
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Nov 2016 22:06:09 +0900] rev 30344
py3: document why os.fsencode() can be used to get back bytes argv And a possible Windows issue. I'm sad we have to do such ugly hack, but that's the unicode on Python 3.
Wed, 09 Nov 2016 22:15:51 +0900 py3: update test-check-py3-compat.t output
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Nov 2016 22:15:51 +0900] rev 30343
py3: update test-check-py3-compat.t output 4b1af1c867fa (scmutil: move util.termwidth()) changed where the import fails.
Mon, 17 Oct 2016 23:16:55 +0200 spelling: fixes of non-dictionary words
Mads Kiilerich <madski@unity3d.com> [Mon, 17 Oct 2016 23:16:55 +0200] rev 30342
spelling: fixes of non-dictionary words
Thu, 03 Nov 2016 17:31:14 -0700 manifest: add __nonzero__ method
Durham Goode <durham@fb.com> [Thu, 03 Nov 2016 17:31:14 -0700] rev 30341
manifest: add __nonzero__ method This adds a __nonzero__ method to manifestdict. This isn't strictly necessary in the vanilla Mercurial implementation, since Python will handle nonzero checks by using __len__, but having it implemented here makes it easier for alternative implementations to implement __nonzero__ and have them be plug-n-play with the normal implementation.
Sun, 06 Nov 2016 04:36:26 +0530 py3: have bytes version of sys.argv
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 04:36:26 +0530] rev 30340
py3: have bytes version of sys.argv sys.argv returns unicodes on Python 3. We need a bytes version for us. There was also a python bug/feature request which wanted then to implement one. They rejected and it is quoted in one of the comments that we can use fsencode() to get a bytes version of sys.argv. Though not sure about its correctness. Link to the comment: http://bugs.python.org/issue8776#msg217416 After this patch we will have pycompat.sysargv which will return us bytes version of sys.argv. If this patch goes in, i will like to make transformer rewrite sys.argv with pycompat.argv because there are lot of occurences.
Sun, 09 Oct 2016 09:00:47 -0400 util: use '\\' rather than using r'\'
Augie Fackler <augie@google.com> [Sun, 09 Oct 2016 09:00:47 -0400] rev 30339
util: use '\\' rather than using r'\' We need bytes, and I find this just a little more immediately obvious than doing rb'\'.
Sun, 09 Oct 2016 09:03:10 -0400 util: use pycompat urlunquote function
Augie Fackler <augie@google.com> [Sun, 09 Oct 2016 09:03:10 -0400] rev 30338
util: use pycompat urlunquote function
Sun, 09 Oct 2016 09:02:25 -0400 pycompat: introduce an alias for urllib.unquote
Augie Fackler <augie@google.com> [Sun, 09 Oct 2016 09:02:25 -0400] rev 30337
pycompat: introduce an alias for urllib.unquote We have to use unquote_to_bytes on Python 3, so we need an abstraction for this.
Mon, 17 Oct 2016 17:42:46 +0200 keyword: handle filectx _customcmp
Christian Ebert <blacktrash@gmx.net> [Mon, 17 Oct 2016 17:42:46 +0200] rev 30336
keyword: handle filectx _customcmp Suggested by Yuya Nishihara: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-October/089461.html Related to issue5364.
Thu, 20 Oct 2016 22:20:31 +0900 mail: do not print(), use ui.debug() instead
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 22:20:31 +0900] rev 30335
mail: do not print(), use ui.debug() instead Since print() can't take a bytes output, it's pretty useless in Mercurial on Python 3. As this is a debug message, switching to ui.debug() seems fine.
Thu, 20 Oct 2016 22:12:48 +0900 progress: obtain stderr from ui
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 22:12:48 +0900] rev 30334
progress: obtain stderr from ui This will help Python 3 porting.
Thu, 20 Oct 2016 22:09:50 +0900 simplemerge: obtain stdout from ui
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 22:09:50 +0900] rev 30333
simplemerge: obtain stdout from ui This will help Python 3 porting.
Thu, 20 Oct 2016 22:07:03 +0900 profiling: obtain stderr from ui
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 22:07:03 +0900] rev 30332
profiling: obtain stderr from ui This will help Python 3 porting.
Sun, 06 Nov 2016 18:51:57 -0800 bdiff: replace hash algorithm
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Nov 2016 18:51:57 -0800] rev 30331
bdiff: replace hash algorithm This patch replaces lyhash with the hash algorithm used by diffutils. The algorithm has its origins in Git commit 2e9d1410, which is all the way back from 1992. The license header in the code at that revision in GPL v2. I have not performed an extensive analysis of the distribution (and therefore buckets) of hash output. However, `hg perfbdiff` gives some clear wins. I'd like to think that if it is good enough for diffutils it is good enough for us? From the mozilla-unified repository: $ perfbdiff -m 3041e4d59df2 ! wall 0.053271 comb 0.060000 user 0.060000 sys 0.000000 (best of 100) ! wall 0.035827 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) $ perfbdiff 0e9928989e9c --alldata --count 100 ! wall 6.204277 comb 6.200000 user 6.200000 sys 0.000000 (best of 3) ! wall 4.309710 comb 4.300000 user 4.300000 sys 0.000000 (best of 3) From the hg repo: $ perfbdiff 35000 --alldata --count 1000 ! wall 0.660358 comb 0.660000 user 0.660000 sys 0.000000 (best of 15) ! wall 0.534092 comb 0.530000 user 0.530000 sys 0.000000 (best of 19) Looking at the generated assembly and statistical profiler output from the kernel level, I believe there is room to make this function even faster. Namely, we're still consuming data character by character instead of at the word level. This translates to more loop iterations and more instructions. At this juncture though, the real performance killer is that we're hashing every line. We should get a significant speedup if we change the algorithm to find the longest prefix, longest suffix, treat those as single "lines" and then only do the line splitting and hashing on the parts that are different. That will require a lot of C code, however. I'm optimistic this approach could result in a ~2x speedup.
Fri, 04 Nov 2016 21:44:25 -0700 profiling: make statprof the default profiler (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Nov 2016 21:44:25 -0700] rev 30330
profiling: make statprof the default profiler (BC) The statprof sampling profiler runs with significantly less overhead. Its data is therefore more useful. Furthermore, its default output shows the hotpath by default, which I've found to be way more useful than the default profiler's function time table. There is one behavioral regression with this change worth noting: the statprof profiler currently doesn't profile individual hgweb requests like lsprof does. This is because the current implementation of statprof only profiles the thread that started profiling. The ability for lsprof to profile individual hgweb requests is relatively new and likely not widely used. Furthermore, I have plans to modify statprof to support profiling multiple threads. I expect that change to go through several iterations. I'm submitting this patch first so there is more time to test statprof. Perfect is the enemy of good.
Fri, 04 Nov 2016 20:50:38 -0700 profiling: use vendored statprof and upstream enhancements (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Nov 2016 20:50:38 -0700] rev 30329
profiling: use vendored statprof and upstream enhancements (BC) Now that the statprof module is vendored and suitable for use, we switch our statprof profiler to use it. This required some minor changes because of drift between the official statprof profiler and the vendored copy. We also incorporate Facebook's improvements from the "statprofext" extension at https://bitbucket.org/facebook/hg-experimental, notably support for different display formats. Because statprof output is different, this is marked as BC. Although most users likely won't notice since most users don't profile.
Thu, 20 Oct 2016 23:16:32 +0900 crecord: use scmutil.termsize()
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 23:16:32 +0900] rev 30328
crecord: use scmutil.termsize()
Thu, 20 Oct 2016 23:09:05 +0900 scmutil: extend termwidth() to return terminal height, renamed to termsize()
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 23:09:05 +0900] rev 30327
scmutil: extend termwidth() to return terminal height, renamed to termsize() It appears crecord.py has its own termsize() function. I want to get rid of it. The fallback height is chosen from the default of cmd.exe on Windows, and VT100 on Unix.
Thu, 20 Oct 2016 22:57:12 +0900 scmutil: clarify that we explicitly do termwidth - 1 on Windows
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 22:57:12 +0900] rev 30326
scmutil: clarify that we explicitly do termwidth - 1 on Windows I was a bit confused since we didn't add 1 to the width, which is different from the example shown in StackOverflow. http://stackoverflow.com/a/12642749
Thu, 20 Oct 2016 21:57:32 +0900 scmutil: remove superfluous indent from termwidth()
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 21:57:32 +0900] rev 30325
scmutil: remove superfluous indent from termwidth()
Thu, 20 Oct 2016 21:50:29 +0900 scmutil: narrow ImportError handling in termwidth()
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 21:50:29 +0900] rev 30324
scmutil: narrow ImportError handling in termwidth() The array module must exist. It's sufficient to suppress the ImportError of termios. Also salvaged the comment why we have to handle AttributeError, from 7002bb17cc5e.
Thu, 20 Oct 2016 21:42:11 +0900 scmutil: make termwidth() obtain stdio from ui
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 21:42:11 +0900] rev 30323
scmutil: make termwidth() obtain stdio from ui I'm getting rid of direct sys.stderr|out|in references so Py3 porting will be slightly easier.
Thu, 20 Oct 2016 21:38:44 +0900 scmutil: move util.termwidth()
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Oct 2016 21:38:44 +0900] rev 30322
scmutil: move util.termwidth() I'm going to get rid of sys.stderr|out|in references from posix.termwidth(). In order to do that, termwidth() needs to take a ui, but functions in util.py shouldn't depend on a ui object. So moves termwidth() to scmutil.py.
Sun, 06 Nov 2016 00:37:50 -0700 bdiff: don't check border condition in loop
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 06 Nov 2016 00:37:50 -0700] rev 30321
bdiff: don't check border condition in loop `plast = a + len - 1`. So, this "for" loop iterates from "a" to "plast", inclusive. So, `p == plast` can only be true on the final iteration of the loop. So checking for it on every loop iteration is wasteful. This patch simply decreases the upper bound of the loop by 1 and adds an explicit check after iteration for the `p == plast` case. We can't simply add 1 to the initial value for "i" because that doesn't do the correct thing on empty input strings. `perfbdiff -m 3041e4d59df2` on the Firefox repo becomes significantly faster: ! wall 0.072763 comb 0.070000 user 0.070000 sys 0.000000 (best of 100) ! wall 0.053221 comb 0.060000 user 0.060000 sys 0.000000 (best of 100) For the curious, this code has its origins in 8b067bde6679, which is the changeset that introduced bdiff.c in 2005. Also, GNU diffutils is able to perform a similar line-based diff in under 20ms. So there's likely more perf wins to be found in this code. One of them is the hashing algorithm. But it looks like mpm spent some time testing hash collisions in d0c48891dd4a. I'd like to do the same before switching away from lyhash, just to be on the safe side.
Sat, 05 Nov 2016 23:41:52 -0700 perf: add perfbdiff
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 Nov 2016 23:41:52 -0700] rev 30320
perf: add perfbdiff bdiff shows up a lot in profiling. I think it would be useful to have a perf command that runs bdiff over and over so we can find hot spots.
Sun, 06 Nov 2016 06:54:31 +0530 help: show help for disabled extensions (issue5228)
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 06:54:31 +0530] rev 30319
help: show help for disabled extensions (issue5228) This patch does not exactly solve issue5228 but it results in a better condition on this issue. For disabled extensions, we used to parse the module and get the first occurrences of docstring and then return the first line of that as an introductory heading of extension. This is what we get today. This patch returns the whole docstring of the module as a help for extension, which is more informative. There are some modules which don't have much docstring at top level except the heading so those are unaffected by this change. To follow the existing trend of showing commands either we have to load the extension or have a very ugly parsing method which don't even assure correctness.
Sun, 06 Nov 2016 04:17:19 +0530 py3: make scmutil.rcpath() return bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 04:17:19 +0530] rev 30318
py3: make scmutil.rcpath() return bytes This patch make sure scmutil.rcpath() returns bytes independent of which platform is used on Python 3. If we want to change type for windows we can just conditionalize the return variable.
Sun, 06 Nov 2016 04:10:33 +0530 py3: use pycompat.ossep at certain places
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 04:10:33 +0530] rev 30317
py3: use pycompat.ossep at certain places Certain instances of os.sep has been converted to pycompat.ossep where it was sure to use bytes only. There are more such instances which needs some more attention and will get surely.
Sun, 06 Nov 2016 03:44:44 +0530 py3: have pycompat.ospathsep and pycompat.ossep
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 03:44:44 +0530] rev 30316
py3: have pycompat.ospathsep and pycompat.ossep We needed bytes version of os.sep and os.pathsep in py3 as they return unicodes.
Sun, 06 Nov 2016 03:33:22 +0530 py3: add a bytes version of os.name
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 03:33:22 +0530] rev 30315
py3: add a bytes version of os.name os.name returns unicodes on py3. Most of our checks are like os.name == 'nt' Because of the transformer, on the right hand side we have b'nt'. The condition will never satisfy even if os.name returns 'nt' as that will be an unicode. We either need to encode every occurence of os.name or have a new variable which is much cleaner. Now we have pycompat.osname. There are around 53 occurences of os.name in the codebase which needs to be replaced by pycompat.osname to support Python 3.
Sun, 06 Nov 2016 12:18:23 +0900 py3: make util.datapath a bytes variable
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 12:18:23 +0900] rev 30314
py3: make util.datapath a bytes variable In this patch we make util.datapath a bytes variable, but we have to pass a unicode to gettext.translation otherwise it will cry. Used pycompat.fsdecode() to decode it back to unicode as it was converted to bytes using pycompat.fsencode().
Sun, 06 Nov 2016 03:12:40 +0530 py3: add os.fsdecode() as pycompat.fsdecode()
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 06 Nov 2016 03:12:40 +0530] rev 30313
py3: add os.fsdecode() as pycompat.fsdecode() We need to use os.fsdecode() but this was not present in Python 2. So added the function in pycompat.py
Fri, 04 Nov 2016 20:22:37 -0700 statprof: return state from stop()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 04 Nov 2016 20:22:37 -0700] rev 30312
statprof: return state from stop() I don't like global variables. Have stop() return the captured state so callers can pass data to the display function.
Sat, 05 Nov 2016 13:20:53 +0900 hghave: check darcs version more strictly
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Nov 2016 13:20:53 +0900] rev 30311
hghave: check darcs version more strictly test-convert-darcs.t suddenly started failing on my Debian sid machine. The reason was Darcs was upgraded from 2.12.0 to 2.12.4 so the original pattern got to match the last two digits. Fix the pattern to match 2.2+.
Sat, 05 Nov 2016 13:16:40 +0900 tests: silence output of darcs command
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Nov 2016 13:16:40 +0900] rev 30310
tests: silence output of darcs command It appears darcs is more verbose by default these days. I got test failure with Darcs 2.12.4.
Wed, 02 Nov 2016 17:10:47 -0700 manifest: remove manifest.readshallowdelta
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:10:47 -0700] rev 30309
manifest: remove manifest.readshallowdelta This removes manifest.readshallowdelta and converts its one consumer to use manifestlog instead.
Wed, 02 Nov 2016 17:10:47 -0700 manifest: get rid of manifest.readshallowfast
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:10:47 -0700] rev 30308
manifest: get rid of manifest.readshallowfast This removes manifest.readshallowfast and converts it's one user to use manifestlog instead.
Wed, 02 Nov 2016 17:10:47 -0700 manifest: add shallow option to treemanifestctx.readdelta and readfast
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:10:47 -0700] rev 30307
manifest: add shallow option to treemanifestctx.readdelta and readfast The old manifest had different functions for performing shallow reads, shallow readdeltas, and shallow readfasts. Since a lot of the code is duplicate (and since those functions don't make sense on a normal manifestctx), let's unify them into flags on the existing readdelta and readfast functions. A future diff will change consumers of these functions to use the manifestctx versions and will delete the old apis.
Wed, 02 Nov 2016 17:10:47 -0700 manifest: change manifestlog mancache to be directory based
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:10:47 -0700] rev 30306
manifest: change manifestlog mancache to be directory based In the last patch we added a get() function that allows fetching directory level treemanifestctxs. It didn't handle caching at directory level though, so we need to change our mancache to support multiple directories.
Wed, 02 Nov 2016 17:24:06 -0700 manifest: add manifestlog.get to obtain subdirectory instances
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:24:06 -0700] rev 30305
manifest: add manifestlog.get to obtain subdirectory instances Previously manifestlog only allowed obtaining root level manifests. Future patches will need direct access to subdirectory manifests as part of changegroup creation, so let's add a get() function that knows how to deal with subdirectories.
Wed, 02 Nov 2016 17:33:31 -0700 manifest: throw LookupError if node not in revlog
Durham Goode <durham@fb.com> [Wed, 02 Nov 2016 17:33:31 -0700] rev 30304
manifest: throw LookupError if node not in revlog When accessing a manifest via manifestlog[node], let's verify that the node actually exists and throw a LookupError if it doesn't. This matches the old read behavior, so we don't accidentally return invalid manifestctxs. We do this in manifestlog instead of in the manifestctx/treemanifestctx constructors because the treemanifest code currently relies on the fact that certain code paths can produce treemanifests without touching the revlogs (and it has tests that verify things work if certain revlogs are missing entirely, so they break if we add validation that tries to read them).
Sun, 23 Oct 2016 10:40:33 -0700 revlog: optimize _chunkraw when startrev==endrev
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 23 Oct 2016 10:40:33 -0700] rev 30303
revlog: optimize _chunkraw when startrev==endrev In many cases, _chunkraw() is called with startrev==endrev. When this is true, we can avoid an extra index lookup and some other minor operations. On the mozilla-unified repo, `hg perfrevlogchunks -c` says this has the following impact: ! read w/ reused fd ! wall 0.371846 comb 0.370000 user 0.350000 sys 0.020000 (best of 27) ! wall 0.337930 comb 0.330000 user 0.300000 sys 0.030000 (best of 30) ! read batch w/ reused fd ! wall 0.014952 comb 0.020000 user 0.000000 sys 0.020000 (best of 197) ! wall 0.014866 comb 0.010000 user 0.000000 sys 0.010000 (best of 196) So, we've gone from ~25x slower than batch to ~22.5x slower. At this point, there's probably not much else we can do except implement an optimized function in the index itself, including in C.
Sat, 22 Oct 2016 15:41:23 -0700 revlog: inline start() and end() for perf reasons
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 22 Oct 2016 15:41:23 -0700] rev 30302
revlog: inline start() and end() for perf reasons When I implemented `hg perfrevlogchunks`, one of the things that stood out was N * _chunk() calls was ~38x slower than 1 _chunks() call. Specifically, on the mozilla-unified repo: N*_chunk: 0.528997s 1*_chunks: 0.013735s This repo has 352,097 changesets. So the average time per changeset comes out to: N*_chunk: 1.502us 1*_chunks: 0.039us If you extrapolate these numbers to a repository with 1M changesets, that comes out to 1.502s versus 0.039s, which is significant. At these latencies, Python attribute lookups and function calls matter. So, this patch inlines some code to cut down on that overhead. The impact of this patch on N*_chunk() calls is clear: ! wall 0.528997 comb 0.520000 user 0.500000 sys 0.020000 (best of 19) ! wall 0.367723 comb 0.370000 user 0.350000 sys 0.020000 (best of 27) So, we go from ~38x slower to ~27x. A nice improvement. But there's still a long way to go. It's worth noting that functionality like revsets perform changelog lookups one revision at a time. So this code path is worth optimizing.
Sun, 23 Oct 2016 09:34:55 -0700 revlog: reorder index accessors to match data structure order
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 23 Oct 2016 09:34:55 -0700] rev 30301
revlog: reorder index accessors to match data structure order Index entries are ordered tuples. We have accessors in the revlog class to map tuple offsets to names. To help reinforce the order, reorder the methods so they match the order of elements in the tuple. While I'm here, also sneak in some minimal documentation.
Thu, 03 Nov 2016 15:17:02 +0100 color: add the ability to display configured style to 'debugcolor'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 15:17:02 +0100] rev 30300
color: add the ability to display configured style to 'debugcolor' The 'hg debugcolor' command gains a '--style' flag to display all the configured labels and their styles. This have many benefits: * discovering documented label, * checking consistency between label's style, * showing the actual style of a label.
Thu, 03 Nov 2016 15:15:47 +0100 color: sort output of 'debugcolor'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 15:15:47 +0100] rev 30299
color: sort output of 'debugcolor' The previous ordering were provided by the set. The new output is more stable and rational. In addition we have some logic to keep the '_background' version together to help readability.
Thu, 03 Nov 2016 14:48:47 +0100 color: extract color and effect display from 'debugcolor'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 14:48:47 +0100] rev 30298
color: extract color and effect display from 'debugcolor' We are about to introduce a second mode for 'hg debugcolor' that would list the known label and their configuration, so we split the code related to color and effect out of the main function.
Thu, 03 Nov 2016 14:29:19 +0100 color: restore _style global after debugcolor ran
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 14:29:19 +0100] rev 30297
color: restore _style global after debugcolor ran Before this change, running 'debugcolor' would destroy all color style for the rest of the process life. We now properly backup and restore the variable content. Using a global variable is sketchy in general and could probably be removed. However, this is a quest for another adventure.
Thu, 03 Nov 2016 14:12:32 +0100 color: add basic documentation to 'debugcolor'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 14:12:32 +0100] rev 30296
color: add basic documentation to 'debugcolor' This does not hurt.
Thu, 03 Nov 2016 05:12:23 +0100 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 05:12:23 +0100] rev 30295
tests: merge 'test-push-hook-lock.t' into 'test-push.t' That test file is very small and is merge with the new 'test-push.t'. No logic is changed. We don't register this as a copy because is actually a "ypoc" merging two file together without replacing the destination and Mercurial cannot express that.
Thu, 03 Nov 2016 05:10:14 +0100 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 05:10:14 +0100] rev 30294
tests: merge 'test-push-validation.t' into 'test-push.t' That test file is very small and is merge with the new 'test-push.t'. No logic is changed but repository name are update to avoid collision. We don't register this as a copy because is actually a "ypoc" merging two file together without replacing the destination and Mercurial cannot express that.
Thu, 03 Nov 2016 04:58:46 +0100 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 04:58:46 +0100] rev 30293
test: rename 'test-push-r.t' to 'test-push.t' We do not have a simple test for 'hg push' but we have multiple tiny tests for various aspect of it. We'll unify them into a single file, and we start with 'test-push-r.t'. The code is unchanged but we renamed the repository used to avoid collision with other tests we'll import in coming changesets. Test timing for the record: start end cuser csys real Test 1.850 2.640 0.650 0.090 0.790 test-push-validation.t 2.640 3.520 0.760 0.090 0.880 test-push-hook-lock.t 0.000 1.850 1.560 0.210 1.850 test-push-r.t
Thu, 03 Nov 2016 05:05:34 +0100 tests: simplify command script in 'test-push-r.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 03 Nov 2016 05:05:34 +0100] rev 30292
tests: simplify command script in 'test-push-r.t' I came across this code by chance. The script of this test is a bit messy with a lot of unnecessary intermediate commands. We simplify the script and unify repository access through '-R'. In the process the update after the unbundle is dropped as it does not add anything to the tests.
Thu, 03 Nov 2016 03:12:57 +0530 py3: use encoding.environ in ui.py
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Nov 2016 03:12:57 +0530] rev 30291
py3: use encoding.environ in ui.py Using source transformer we add b'' everywhere. So there are no chances that those bytes string will work with os.environ on Py3 as that returns a dict of unicodes. We are relying on the errors, even though no error is raised even in future, these pieces of codes will tend to do wrong things. if statements can result in wrong boolean and certain errors can be raised while using this piece of code. Let's not wait for them to happen, fix what is wrong. If this patch goes in, I will try to do it for all the cases. Leaving it as it is buggy.
Thu, 03 Nov 2016 02:17:01 +0530 py3: make scmposix.userrcpath() return bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Nov 2016 02:17:01 +0530] rev 30290
py3: make scmposix.userrcpath() return bytes We are making sure that we deal with bytes as much we can. This is a part of fixing functions so that they return bytes if they have to. Used encoding.environ to return bytes. After this patch, scmposix.userrcpath() returns bytes and scmutil.osrcpath() will also return bytes if the platform is posix. Functions is scmposix returns bytes on Python 3 now.
Tue, 01 Nov 2016 08:22:50 +0000 adjustlinkrev: remove unnecessary parameters
Jun Wu <quark@fb.com> [Tue, 01 Nov 2016 08:22:50 +0000] rev 30289
adjustlinkrev: remove unnecessary parameters Since adjustlinkrev has "self", and is a method of a filectx object, it does not need path, filelog, filenode. They can be fetched from the "self" easily.
Mon, 31 Oct 2016 15:40:30 -0700 repair: make strip() return backup file path
Martin von Zweigbergk <martinvonz@google.com> [Mon, 31 Oct 2016 15:40:30 -0700] rev 30288
repair: make strip() return backup file path narrowhg wants to strip some commits and then re-apply them after applying another bundle. Having repair.strip() return the bundle path will be helpful for it.
Wed, 02 Nov 2016 18:59:29 +0000 rebase: check for conflicts before continuing
timeless <timeless@mozdev.org> [Wed, 02 Nov 2016 18:59:29 +0000] rev 30287
rebase: check for conflicts before continuing When there are unresolved merge conflicts, there is no reason to make the user wait for rebase to process all of the already rebased commits just to complain that it cannot do anything. Abort early.
Wed, 02 Nov 2016 18:45:53 +0000 cmdutil: refactor checkunresolved
timeless <timeless@mozdev.org> [Wed, 02 Nov 2016 18:45:53 +0000] rev 30286
cmdutil: refactor checkunresolved localrepo.commit had code to check for unresolved merge conflicts, it would be helpful for at least rebase to be able to use that code without calling commit().
Wed, 02 Nov 2016 18:56:07 +0000 rebase: rename merge to mergemod
timeless <timeless@mozdev.org> [Wed, 02 Nov 2016 18:56:07 +0000] rev 30285
rebase: rename merge to mergemod
Thu, 19 Mar 2015 22:22:50 +0100 context: make sure __str__ works, also when there is no _changectx
Mads Kiilerich <mads@kiilerich.com> [Thu, 19 Mar 2015 22:22:50 +0100] rev 30284
context: make sure __str__ works, also when there is no _changectx Before, it could crash when trying to print the wrong kind of object at the wrong time.
Tue, 18 Oct 2016 16:45:39 +0200 largefiles: clarify variable name holding file mode
Mads Kiilerich <madski@unity3d.com> [Tue, 18 Oct 2016 16:45:39 +0200] rev 30283
largefiles: clarify variable name holding file mode A follow-up to c01acee367ec. 'st' sounds like the whole stat result while 'mode' is a better name for the actual file mode.
Tue, 01 Nov 2016 18:29:09 -0700 changegroup: use changelogrevision()
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 18:29:09 -0700] rev 30282
changegroup: use changelogrevision() Using offsets for accessing changelog entries isn't very readable. As a bonus, changelog.changelogrevision() also accepts a revision, so we don't need to perform the inline node resolution either.
Tue, 01 Nov 2016 18:28:03 -0700 changegroup: cache changelog and manifestlog outside of loop
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 18:28:03 -0700] rev 30281
changegroup: cache changelog and manifestlog outside of loop History has taught us that repo.changelog can add significant overhead to loops. So cache the changelog instance outside of the loop to avoid the lookup. While we're here, do the same for manifestlog, since each loop would otherwise initialize a new manifestlog instance.
Tue, 01 Nov 2016 18:49:23 -0700 make: targets for building packages for ubuntu yakkety
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 18:49:23 -0700] rev 30280
make: targets for building packages for ubuntu yakkety Ubuntu 16.10 Yakkety Yak is out. Let's support it.
Sat, 15 Oct 2016 17:24:01 -0700 util: put compression code next to each other
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 15 Oct 2016 17:24:01 -0700] rev 30279
util: put compression code next to each other ctxmanager was injecting itself between the compression and decompression code. Let's restore some order.
Sat, 28 Jun 2014 13:13:32 +0900 hgweb: make log streams compatible with command server
Yuya Nishihara <yuya@tcha.org> [Sat, 28 Jun 2014 13:13:32 +0900] rev 30278
hgweb: make log streams compatible with command server Even though it would be useless to start a web server by a command server, it should be doable in principle. Also, we can't use sys.stdout/err directly on Python 3 because they are unicode streams.
Mon, 29 Feb 2016 13:41:54 +0900 cmdserver: write channel header and payload by a single write() call
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Feb 2016 13:41:54 +0900] rev 30277
cmdserver: write channel header and payload by a single write() call This makes a channeledoutput thread-safe as long as the underlying fwrite() is thread-safe. Both POSIX and Windows implementations are documented as MT-safe. MT-safety is necessary to use ui.fout and ui.ferr in hgweb.
Fri, 18 Mar 2016 17:15:06 -0700 histedit: use ui.fin to read commands from stdin
Yuya Nishihara <yuya@tcha.org> [Fri, 18 Mar 2016 17:15:06 -0700] rev 30276
histedit: use ui.fin to read commands from stdin stdin is wrapped by channeledinput in command-server session.
Sat, 03 Oct 2015 14:34:56 +0900 convert: have debugsvnlog obtain standard streams from ui
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Oct 2015 14:34:56 +0900] rev 30275
convert: have debugsvnlog obtain standard streams from ui This will help porting to Python 3, where sys.stdin/out/err are unfortunately unicode streams so we can't use them directly.
Sat, 03 Oct 2015 14:29:13 +0900 convert: remove superfluous setbinary() calls from debugsvnlog
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Oct 2015 14:29:13 +0900] rev 30274
convert: remove superfluous setbinary() calls from debugsvnlog a3fe91b4f6eb made standard streams set to binary mode globally.
Wed, 17 Aug 2016 08:52:15 -0700 tests: explicitly use ls profiler
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 17 Aug 2016 08:52:15 -0700] rev 30273
tests: explicitly use ls profiler In preparation for making the statprof profiler the default.
Tue, 01 Nov 2016 19:03:11 -0700 statprof: pass data structure to display functions
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 19:03:11 -0700] rev 30272
statprof: pass data structure to display functions Currently, statprof maintains a global "state" variable that is used by several functions. Global variables hinder adaptability of code. So pass state to display functions so we can make changes to how "state" works in future patches.
Sun, 14 Aug 2016 19:20:12 -0700 statprof: use print function
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 19:20:12 -0700] rev 30271
statprof: use print function
Tue, 01 Nov 2016 18:55:30 -0700 statprof: use absolute_imports
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 18:55:30 -0700] rev 30270
statprof: use absolute_imports As part of this, we modify import order to satisfy our import checker.
Sun, 14 Aug 2016 19:14:05 -0700 statprof: require paths to save or load profile data
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 19:14:05 -0700] rev 30269
statprof: require paths to save or load profile data Upstream appears to aggressively save statprof data in a well-defined home directory path. Change the code to not do that. We also change file saving to fail if an error has occurred instead of silently failing. Callers can catch the exception. This behavior is more suitable for a generic "library" module.
Sun, 14 Aug 2016 19:13:32 -0700 statprof: fix flake8 warnings
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 19:13:32 -0700] rev 30268
statprof: fix flake8 warnings My local flake8 hook informed me of these warnings in the upstream code. Fix them.
Tue, 01 Nov 2016 18:54:03 -0700 statprof: vendor statprof.py
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 01 Nov 2016 18:54:03 -0700] rev 30267
statprof: vendor statprof.py Vendored from https://bitbucket.org/facebook/hg-experimental changeset 73f9db47ae5a1a9fa29a98dfe92d557ad51234c3 without modification. This introduces a number of code style violations. The file already has the magic words to skip test-check-code.t. I'll make additional changes to clean up the test-check-py3-compat.t warnings and to change some behavior in the code that isn't suitable for general use. test-check-commit.t also complains about numerous things. But there's nothing we can do if we're importing as-is.
Tue, 01 Nov 2016 15:40:21 -0400 merge with stable
Augie Fackler <augie@google.com> [Tue, 01 Nov 2016 15:40:21 -0400] rev 30266
merge with stable
Wed, 04 Jan 2017 10:51:37 -0600 Added signature for changeset e69874dc1f4e stable
Kevin Bullock <kbullock@ringworld.org> [Wed, 04 Jan 2017 10:51:37 -0600] rev 30265
Added signature for changeset e69874dc1f4e
Wed, 04 Jan 2017 10:51:31 -0600 Added tag 4.0.2 for changeset e69874dc1f4e stable
Kevin Bullock <kbullock@ringworld.org> [Wed, 04 Jan 2017 10:51:31 -0600] rev 30264
Added tag 4.0.2 for changeset e69874dc1f4e
Sat, 31 Dec 2016 17:19:09 +0900 i18n-ja: synchronized with 5f33116cd787 stable 4.0.2
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 31 Dec 2016 17:19:09 +0900] rev 30263
i18n-ja: synchronized with 5f33116cd787
Thu, 22 Dec 2016 23:14:13 +0900 posix: make poll() restart on interruption by signal (issue5452) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 22 Dec 2016 23:14:13 +0900] rev 30262
posix: make poll() restart on interruption by signal (issue5452) select() is a notable example of syscalls which may fail with EINTR. If we had a SIGWINCH handler installed, ssh would crash when the terminal window was resized. This patch fixes the problem.
Mon, 19 Dec 2016 22:46:00 +0900 demandimport: do not raise ImportError for unknown item in fromlist stable
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Dec 2016 22:46:00 +0900] rev 30261
demandimport: do not raise ImportError for unknown item in fromlist This is the behavior of the default __import__() function, which doesn't validate the existence of the fromlist items. Later on, the missing attribute is detected while processing the import statement. https://hg.python.org/cpython/file/v2.7.13/Python/import.c#l2575 The comtypes library relies on this (maybe) undocumented behavior, and we got a bug report to TortoiseHg, sigh. https://bitbucket.org/tortoisehg/thg/issues/4647/ The test added at 26a4e46af2bc verifies the behavior of the import statement, so this patch only adds the test of __import__() function and works around CPython/PyPy difference.
Thu, 08 Dec 2016 23:59:36 +0800 hgweb: add missing slash to file log url in rss style stable
Anton Shestakov <av6@dwimlabs.net> [Thu, 08 Dec 2016 23:59:36 +0800] rev 30260
hgweb: add missing slash to file log url in rss style
Thu, 01 Dec 2016 14:13:28 -0600 Added signature for changeset b3b1ae98f6a0 stable
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Dec 2016 14:13:28 -0600] rev 30259
Added signature for changeset b3b1ae98f6a0
Thu, 01 Dec 2016 14:13:23 -0600 Added tag 4.0.1 for changeset b3b1ae98f6a0 stable
Kevin Bullock <kbullock@ringworld.org> [Thu, 01 Dec 2016 14:13:23 -0600] rev 30258
Added tag 4.0.1 for changeset b3b1ae98f6a0
Fri, 25 Nov 2016 07:39:02 -0200 i18n-pt_BR: synchronized with 819f96b82fa4 stable 4.0.1
Wagner Bruna <wbruna@yahoo.com> [Fri, 25 Nov 2016 07:39:02 -0200] rev 30257
i18n-pt_BR: synchronized with 819f96b82fa4
Mon, 14 Nov 2016 22:43:25 +0100 shelve: add missing space in help text stable
Mads Kiilerich <madski@unity3d.com> [Mon, 14 Nov 2016 22:43:25 +0100] rev 30256
shelve: add missing space in help text The change is trivial and unlikely to have been translated so we update translation files too.
Sun, 13 Nov 2016 06:12:22 +0900 scmutil: ignore EPERM at os.utime, which avoids ambiguity at closing stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 13 Nov 2016 06:12:22 +0900] rev 30255
scmutil: ignore EPERM at os.utime, which avoids ambiguity at closing According to POSIX specification, just having group write access to a file causes EPERM at invocation of os.utime() with an explicit time information (e.g. working on the repository shared by group access permission). To ignore EPERM at closing file object in such case, this patch makes checkambigatclosing._checkambig() use filestat.avoidambig() introduced by previous patch. Some functions below imply this code path at truncation of an existing (= might be owned by another user) file. - strip() in repair.py, introduced by e38d85be978f - _playback() in transaction.py, introduced by 599912a62ff6 This is a variant of issue5418.
Sun, 13 Nov 2016 06:11:56 +0900 vfs: ignore EPERM at os.utime, which avoids ambiguity at renaming (issue5418) stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 13 Nov 2016 06:11:56 +0900] rev 30254
vfs: ignore EPERM at os.utime, which avoids ambiguity at renaming (issue5418) According to POSIX specification, just having group write access to a file causes EPERM at invocation of os.utime() with an explicit time information (e.g. working on the repository shared by group access permission). To ignore EPERM at renaming in such case, this patch makes vfs.rename() use filestat.avoidambig() introduced by previous patch.
(0) -30000 -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip