Tue, 24 Mar 2015 13:56:51 -0700 revert: define 'wctx' a little earlier and use it more
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2015 13:56:51 -0700] rev 24449
revert: define 'wctx' a little earlier and use it more
Wed, 29 Oct 2014 08:43:39 -0700 match: add isexact() method to hide internals
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Oct 2014 08:43:39 -0700] rev 24448
match: add isexact() method to hide internals Comparing a function reference seems bad.
Wed, 19 Nov 2014 15:56:58 -0800 matcher: make e.g. 'relpath:.' lead to fast paths
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Nov 2014 15:56:58 -0800] rev 24447
matcher: make e.g. 'relpath:.' lead to fast paths Several commands take the fast path when match.always() is true. However, when the user passes "." on the command line, that results in a matcher for which match.always() == False. Let's make it so such matchers return True, and have an empty list of .files(). This makes e.g. "hg log ." as fast as "hg log" and "hg revert ." as fast as "hg revert --all" (when run from repo root).
Wed, 25 Mar 2015 14:56:54 -0400 revset: add the 'subrepo' symbol
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Mar 2015 14:56:54 -0400] rev 24446
revset: add the 'subrepo' symbol This returns the csets where matching subrepos have changed with respect to the containing repo's first parent. The second parent shouldn't matter, because it is either syncing up to the first parent (i.e. it hasn't changed from the current branch's POV), or the merge changed it with respect to the first parent (which already adds it to the set). There's already a 'subrepo' fileset, but it is prefixed with 'set:', so there should be no ambiguity (in code anyway). The only test I see for it is to revert subrepos named by a glob pattern (in test-subrepo.t, line 58). Since it doesn't return a tracked file, neither 'log "set:subrepo()"' nor 'files "set:subrepo()"' print anything. Therefore, it seems useful to have a revset that will return something for log (and can be added to a revsetalias to be chained with 'file' revsets.) It might be nice to be able to filter for added, modified and removed separately, but add/remove should be rare. It might also be nice to be able to do a 'contains' check, in addition to this mutated check. Maybe it is possible to get those with the existing 'adds', 'contains', 'modifies' and 'removes' by teaching them to chase explicit paths into subrepos. I'm not sure if this should be added to the 'modifies adds removes' line in revset.optimize() (since it is doing an AMR check on .hgsubstate), or if it is OK to put into 'safesymbols' (things like 'file' are on the list, and that takes a regex, among other patterns).
Tue, 24 Mar 2015 20:28:39 -0700 tags: improve documentation
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 24 Mar 2015 20:28:39 -0700] rev 24445
tags: improve documentation The documentation for tags.py was making comprehension difficult. This patch rewrites most of the comments in the file to make it easier for mere mortals to understand what's going on.
Fri, 20 Mar 2015 11:14:27 -0700 phase: default to C implementation for phase computation
Laurent Charignon <lcharignon@fb.com> [Fri, 20 Mar 2015 11:14:27 -0700] rev 24444
phase: default to C implementation for phase computation
Tue, 24 Mar 2015 11:00:09 -0700 phase: compute phases in C
Laurent Charignon <lcharignon@fb.com> [Tue, 24 Mar 2015 11:00:09 -0700] rev 24443
phase: compute phases in C Previously, the phase computation would grow much slower as the oldest draft commit in the repository grew older (which is very common in repos with evolve on) and the number of commits increase. By rewriting the computation in C we can speed it up from 700ms to 7ms on a large repository whose oldest draft commit is a year old.
Wed, 25 Mar 2015 14:16:10 -0500 manifest: move C bool polyfill into util.h
Matt Mackall <mpm@selenic.com> [Wed, 25 Mar 2015 14:16:10 -0500] rev 24442
manifest: move C bool polyfill into util.h
Wed, 25 Mar 2015 14:13:11 -0500 manifest: use util.h to get Py_ssize_t
Matt Mackall <mpm@selenic.com> [Wed, 25 Mar 2015 14:13:11 -0500] rev 24441
manifest: use util.h to get Py_ssize_t
Fri, 13 Mar 2015 18:28:11 -0400 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 18:28:11 -0400] rev 24440
clone: add progress support to hardlink clones (issue3059)
Thu, 19 Mar 2015 10:24:22 -0400 util: add progress callback support to copyfiles
Augie Fackler <augie@google.com> [Thu, 19 Mar 2015 10:24:22 -0400] rev 24439
util: add progress callback support to copyfiles
Mon, 23 Mar 2015 23:04:51 -0700 revert: evaluate filesets against working directory (issue4497)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2015 23:04:51 -0700] rev 24438
revert: evaluate filesets against working directory (issue4497) As the failing revert tests in test-fileset-generated.t show, Revert currently creates one matcher for matching files in the working copy and another matcher for matching files in the target revision. The two matchers are created with different contexts, which means filesets are evaluated differently. Then the union of the sets of files matching the matchers in the two contexts are reverted. It doesn't seem to make sense to use two different matchers; only the context they're applied to should be different. It seems very likely that the user wants the filesets to be evaluated against the working directory, which the tests test-fileset-generated.t also assume, so let's make it so. I willingly admit that the largefiles code was modified by trial and error (according to tests).
Tue, 24 Mar 2015 10:27:56 -0700 largefiles: extract and reuse 'standin' variable in overriderevert()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2015 10:27:56 -0700] rev 24437
largefiles: extract and reuse 'standin' variable in overriderevert()
Fri, 20 Mar 2015 10:05:31 -0700 largefiles: override cmdutil.revert() instead of comands.revert()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Mar 2015 10:05:31 -0700] rev 24436
largefiles: override cmdutil.revert() instead of comands.revert() By overriding the cmdutil method we don't need to override both the function and the command. Also, we get access to the 'ctx' and 'parents' variables, which will soon prove useful. Rename the 'ctx' argument to overridematch() to 'mctx' rather than letting it shadow new 'ctx'.
Sat, 21 Mar 2015 12:01:05 -0400 test-commit-interactive-curses: backout 852801178a63
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 12:01:05 -0400] rev 24435
test-commit-interactive-curses: backout 852801178a63 Now that the imports have been fixed up, and the platform EOL difference eliminated, this test runs on Windows.
Sat, 21 Mar 2015 11:56:43 -0400 test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 11:56:43 -0400] rev 24434
test-interactive: use stable EOL in various file generating routines The seq.py and shell echo redirected to a file ends up with platform specific EOL, which throws off the hash when the file is committed to the test repo on Windows. The other option is to glob the hashes, but the ability to see if they have changed might point out problems that would otherwise be missed.
Tue, 17 Mar 2015 15:46:36 -0700 patch.diff: restrict matcher to relative root in certain cases
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:36 -0700] rev 24433
patch.diff: restrict matcher to relative root in certain cases Previously we'd request all results, then filter by relative root. This is clearly inefficient, so we now restrict the matcher to the relative root for certain easy cases. The particular case here is when the matcher matches all files. In that case we can simply create a matcher by the relative root. This is purely an optimization and has no impact on correctness.
Tue, 17 Mar 2015 15:46:30 -0700 commands.diff: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:30 -0700] rev 24432
commands.diff: add support for diffs relative to a subdirectory Previous patches added all the backend support for this. This exposes this option in the UI.
Tue, 17 Mar 2015 15:06:40 -0700 cmdutil.diffordiffstat: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:06:40 -0700] rev 24431
cmdutil.diffordiffstat: add support for diffs relative to a subdirectory It's possible that some of the match patterns are outside the relative root. We warn in that case. In upcoming patches we'll add tests for this.
Sun, 22 Mar 2015 19:19:16 -0700 test-fileset.t: remove 'bar ' and 'baz\' from tested filenames
Siddharth Agarwal <sid0@fb.com> [Sun, 22 Mar 2015 19:19:16 -0700] rev 24430
test-fileset.t: remove 'bar ' and 'baz\' from tested filenames This test is guarded by a '#if no-windows', but they can't be written out on vfat on Linux either. con.xml can, and for testing that's good enough. Also clean up a stray 'ls' that I mistakenly left in while writing the test.
Mon, 23 Mar 2015 18:21:01 -0700 commands.push: abort when revisions evaluate to empty set (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 23 Mar 2015 18:21:01 -0700] rev 24429
commands.push: abort when revisions evaluate to empty set (BC) If the "-r" argument is specified to "hg push," the user has expressed an intent for a specific changeset to be present on the remote. If that expression cannot be mapped to a known changeset, the user's intent is ambiguous and cannot be acted upon without making assumptions. Previously, if arguments to `push -r <rev>` evaluated to an empty set (perhaps the user specified a revset that didn't evaluate to anything), the empty "revs" list would be passed down to "exchange.push" where it appears the empty list was being interpreted as "push everything." This patch adds validation to the "-r" argument to the push command. If the argument is specified but doesn't resolve to a changeset, the command will abort instead of doing something potentially unexpected. This patch is technically breaking backwards compatibility. I believe this is justified because the new behavior closes a crack that could result in undefined or under-defined behavior. Also, this patch doesn't drop client capabilities because if users really wanted to push all changesets, they can simply omit the "-r" argument from push completely.
Mon, 23 Mar 2015 17:07:25 -0700 largefiles: fix typo with s/__class/__class__/
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2015 17:07:25 -0700] rev 24428
largefiles: fix typo with s/__class/__class__/ Commit f78252429e0a (largefiles: don't create chain of __contains__ calls, 2015-03-11) introduced a typo with __class instead of __class__. Let's fix it. There are (obviously) no tests covering this code path, and I could not figure out a way to trigger it, so it remains untested. Spotted by Drew Gottlieb.
Mon, 23 Mar 2015 14:47:35 -0400 hgweb: pull line numbers out of main flow of source content
Paul Fisher <pfish@google.com> [Mon, 23 Mar 2015 14:47:35 -0400] rev 24427
hgweb: pull line numbers out of main flow of source content Pulls the autogenerated line number boxes outside of the padding box of the main content of .sourcelines, allowing the first tab to be properly sized and the line numbers to be outside the main source's margin when text is wrapped.
Mon, 23 Mar 2015 15:41:43 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 23 Mar 2015 15:41:43 -0500] rev 24426
merge with stable
Fri, 20 Mar 2015 23:35:13 -0400 crecord: don't abort on Windows when curses isn't available
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:35:13 -0400] rev 24425
crecord: don't abort on Windows when curses isn't available This is the hack portion of the previous patch, which can be backed out once we figure out how to deal with curses. Without this, the tests affected by the import problem mentioned in the previous patch fail in exactly the same way, but with the nicer 'module not available' error.
Sat, 21 Mar 2015 01:24:17 -0400 test-fileset: forget non-portable files to avoid failures on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 01:24:17 -0400] rev 24424
test-fileset: forget non-portable files to avoid failures on Windows The 3 deleted lines appeared on Windows, because the files were never created in the first place.
Fri, 20 Mar 2015 23:32:00 -0400 crecord: conditionalize the imports that are not available on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:32:00 -0400] rev 24423
crecord: conditionalize the imports that are not available on Windows 'fcntl', 'termios' and 'wcurses' are not available on the default Windows python installation, and importing them caused widespread carnage in the test suite. There were 29 different changed test files (on top of unrelated errors), mostly in the form of an ImportError. The failures weren't related to actual crecord use, and followed the import chain: 'localrepo' -> 'subrepo' -> 'cmdutil' -> 'crecord' -> 'fcntl'
Fri, 20 Mar 2015 21:55:11 -0400 cmdutil: drop a duplicate import of crecord
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 21:55:11 -0400] rev 24422
cmdutil: drop a duplicate import of crecord It looks like this crept in with 69538481ea9f.
(0) -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip