Tue, 09 Feb 2016 22:47:20 +0000 tests: have a more elaborated test for _destrebase
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 09 Feb 2016 22:47:20 +0000] rev 28135
tests: have a more elaborated test for _destrebase The previous repo had a single lineage and a single head, pretty boring for rebase related testing.
Sun, 14 Feb 2016 21:15:59 +0000 histedit: break _histedit function into smaller pieces
Kostia Balytskyi <ikostia@fb.com> [Sun, 14 Feb 2016 21:15:59 +0000] rev 28134
histedit: break _histedit function into smaller pieces We add _getgoal, _validateargs. This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
Sun, 14 Feb 2016 21:00:05 +0000 histedit: break _histedit function into smaller pieces (add _continueaction)
Kostia Balytskyi <ikostia@fb.com> [Sun, 14 Feb 2016 21:00:05 +0000] rev 28133
histedit: break _histedit function into smaller pieces (add _continueaction) This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
Mon, 01 Feb 2016 17:20:51 +0000 histedit: break _histedit function into smaller pieces (add _newaction)
Kostia Balytskyi <ikostia@fb.com> [Mon, 01 Feb 2016 17:20:51 +0000] rev 28132
histedit: break _histedit function into smaller pieces (add _newaction) This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
Mon, 01 Feb 2016 14:12:38 +0000 histedit: break _histedit function into smaller pieces (add _editplanaction)
Kostia Balytskyi <ikostia@fb.com> [Mon, 01 Feb 2016 14:12:38 +0000] rev 28131
histedit: break _histedit function into smaller pieces (add _editplanaction) This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
Mon, 01 Feb 2016 12:51:20 +0000 histedit: break _histedit function into smaller pieces (add _abortaction)
Kostia Balytskyi <ikostia@fb.com> [Mon, 01 Feb 2016 12:51:20 +0000] rev 28130
histedit: break _histedit function into smaller pieces (add _abortaction) This is a part of bigger effort to refactor histedit. Initial steps are to break _histedit function into smaller pieces which will supposedly be more understandable. After this is done, I will have a better understanding of how histedit works and apply that to fix issue4800.
Mon, 08 Feb 2016 13:52:51 +0000 automv: new experimental extension
Martijn Pieters <mjpieters@fb.com> [Mon, 08 Feb 2016 13:52:51 +0000] rev 28129
automv: new experimental extension Automatically detect moves and record them at commit time. This extension was originally developed at https://bitbucket.org/facebook/hg-experimental
Fri, 05 Feb 2016 21:25:44 -0800 match: override 'visitdir' in subdirmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Feb 2016 21:25:44 -0800] rev 28128
match: override 'visitdir' in subdirmatcher The manifest.manifest class has a _treeinmem member than one can manually set to True to test that the treemanifest class works as a drop-in replacement for manifestdict (which is mostly a requirement for treemanifest repos to work). However, it doesn't quite work at the moment. These tests fail: test-largefiles-misc.t test-rebase-newancestor.t test-subrepo.t test-subrepo-deep-nested-change.t test-subrepo-recursion.t All but test-rebase-newancestor.t fail because they trigger calls to subdirmatcher.visitdir(), which tries to access a _excluderoots field that does not exist on the subdirmatcher. Let's fix that by overriding visitdir() in a similar way to how matchfn is overridden, i.e. by prepending the directory before calling the superclass method.
Sat, 09 Jan 2016 13:22:26 +0900 run-tests: remove useless "failed" flag from addOutputMismatch()
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jan 2016 13:22:26 +0900] rev 28127
run-tests: remove useless "failed" flag from addOutputMismatch() It never be set to True.
Sat, 09 Jan 2016 13:20:15 +0900 tests: load json with no fallback
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jan 2016 13:20:15 +0900] rev 28126
tests: load json with no fallback The json module should be available in Python 2.6 or newer.
Tue, 15 Dec 2015 23:50:48 +0900 config: drop progress extension from sample hgrc as it is in core now
Yuya Nishihara <yuya@tcha.org> [Tue, 15 Dec 2015 23:50:48 +0900] rev 28125
config: drop progress extension from sample hgrc as it is in core now
Thu, 04 Feb 2016 03:47:38 +0000 shelve: suggest the correct tool to continue (not unshelve)
timeless <timeless@mozdev.org> [Thu, 04 Feb 2016 03:47:38 +0000] rev 28124
shelve: suggest the correct tool to continue (not unshelve) Suggest committing (or whatever the current activity is), via wrongtooltocontinue which uses howtocontinue.
Thu, 04 Feb 2016 03:47:00 +0000 histedit: suggest the correct tool to continue (not histedit)
timeless <timeless@mozdev.org> [Thu, 04 Feb 2016 03:47:00 +0000] rev 28123
histedit: suggest the correct tool to continue (not histedit) Suggest committing (or whatever the current activity is), via wrongtooltocontinue which uses howtocontinue.
Thu, 04 Feb 2016 03:46:38 +0000 rebase: suggest the correct tool to continue (not rebase)
timeless <timeless@mozdev.org> [Thu, 04 Feb 2016 03:46:38 +0000] rev 28122
rebase: suggest the correct tool to continue (not rebase) Suggest committing (or whatever the current activity is), via wrongtooltocontinue which uses howtocontinue.
Thu, 04 Feb 2016 03:45:44 +0000 graft: suggest the correct tool to continue (not graft)
timeless <timeless@mozdev.org> [Thu, 04 Feb 2016 03:45:44 +0000] rev 28121
graft: suggest the correct tool to continue (not graft) Add test coverage for graft --continue without starting. Suggest committing (or whatever the current activity is), via wrongtooltocontinue which uses howtocontinue.
Sun, 14 Feb 2016 16:16:17 +0000 cmdutil: provide a way to report how to continue
timeless <timeless@mozdev.org> [Sun, 14 Feb 2016 16:16:17 +0000] rev 28120
cmdutil: provide a way to report how to continue checkafterresolved allows Mercurial to suggest what command to use next. If users try to continue the wrong command, there wasn't a good way for the command to suggest what to do next. Split checkmdutil into howtocontinue and checkafterresolved. Introduce wrongtooltocontinue which handles raising an Abort with the hint from howtocontinue.
Sun, 14 Feb 2016 01:33:55 +0900 hg: make cachedlocalrepo cache appropriate repoview object
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 14 Feb 2016 01:33:55 +0900] rev 28119
hg: make cachedlocalrepo cache appropriate repoview object Before this patch, 'cachedlocalrepo' always caches "visible" repoview object, because 'cachedlocalrepo' uses "visible" repoview returned by 'hg.repository()' without any additional processing. If the client of 'cachedlocalrepo' wants "served" repoview, some objects to be cached are discarded unintentionally. 1. 'cachedlocalrepo' newly caches "visible" repoview object (call it VIEW1) 2. 'cachedlocalrepo' returns VIEW1 to the client of it at 'fetch()' 3. the client gets "served" repoview object by 'filtered("served")' on VIEW1 (call this "served" repoview VIEW2) 4. accessing to 'repo.changelog' implies: - instantiation of changelog via 'localrepository.changelog' - instantiation of "filtered changelog" via 'repoview.changelog' 5. "filtered changelog" above is cached in VIEW2 6. VIEW2 is discarded after processing, because there is no reference to it 7. 'cachedlocalrepo' returns VIEW1 cached at (1) above to the client at next 'fetch()' 8. 'filtered("served")' on VIEW1 at the client side creates new "served" repoview again, because VIEW1 is "visible" (call this new "served" repoview VIEW3) 9. accessing to 'repo.changelog' implies instantiation of filtered changelog again, because "filtered changelog" is cached in VIEW2 at (5), but not in VIEW3 currently used 10. (go to (7) above) As described above, "served" repoview object and "filtered changelog" cached in it are discarded always, even if the repository itself hasn't been changed since last access. For example, in the case of 'hgweb_mod.hgweb', "newly caching" occurs, when: - all cached objects are already assigned to another threads (in this case, repoview is created in 'cachedlocalrepo.copy()') - or, stat of '00changelog.i' is changed from last access (in this case, repoview is created in 'cachedlocalrepo.fetch()') once changes are pushed via HTTP, this always occurs. The root cause of this inefficiency is that 'cachedlocalrepo' always caches "visible" repoview object, even if the client of it wants another view. To make 'cachedlocalrepo' cache appropriate repoview object, this patch adds additional filtering on the repo object returned by 'hg.repository()'. It is assumed that initial repoview object should be already filtered by expected view. After this patch: - 'filtered("served")' on VIEW1 at (3)/(7) above returns VIEW1 itself, because VIEW1 is now "served", and - VIEW2 and VIEW3 equal VIEW1 - therefore, "filtered changelog" is cached in VIEW1, and reused intentionally
Sun, 14 Feb 2016 00:45:17 +0000 rebase: perform update through the 'update' command
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 14 Feb 2016 00:45:17 +0000] rev 28118
rebase: perform update through the 'update' command The update logic have grow more and more complicated over time (eg bookmark movement, new destination logic, warning on other head, etc). The rebase extension was reimplementing its own basic version of update to be used by 'hg pull --rebase'. We remove the custom code and use a combination of higher level functions. A test is added to check that the update is properly warning about other branch heads.
Sat, 13 Feb 2016 16:59:32 +0000 rebase: 'hg pull --rebase' now update only if there was nothing to rebase
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 13 Feb 2016 16:59:32 +0000] rev 28117
rebase: 'hg pull --rebase' now update only if there was nothing to rebase I recently discovered that 'hg pull --rebase' was also running an update. And it was running it in all cases as long as the update would move the working copy somewhere else... This felt wrong and it actually is. This 'update' call is introduced in 92455c1d6f83. In that commit the intent is very clear. The update should happen only when there was nothing to rebase. The implementation did not check if a rebase was performed because, at that time, rebase would always leave you on the top most changeset. Being on that top most changeset result in a no-op update and the step was skipped. However 9c78ed396075f changed rebase behavior to preserve the working copy parent, so if we are not on a head at pull time, the code performs both a rebase and an update. This changeset introduce a test for this case and restore the intended behavior. There are other issues with this custom update code but they will be addressed in later changeset (eg: own destination logic, lack of heads warning). I'm not super happy with the explicitly comparison 'rebase(...) == 1' but a later series will have a cleaner way to handle it anyway (while making 'rebase' pick its default destination like 'merge').
Mon, 08 Feb 2016 14:17:11 -0800 filectx: replace use of _filerev with _filenode
Durham Goode <durham@fb.com> [Mon, 08 Feb 2016 14:17:11 -0800] rev 28116
filectx: replace use of _filerev with _filenode _filerev depends on the filelog implementation using revlogs and linkrevs. Alternative implementations, like remotefilelog, do not have rev numbers, so this call fails. Replacing it with _filenode means it doesn't rely on rev numbers, and doesn't cost anything extra, since _filerev is using _filenode under the hood anyway.
Wed, 03 Feb 2016 15:53:48 -0800 verify: extract "manifest" constant into variable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Feb 2016 15:53:48 -0800] rev 28115
verify: extract "manifest" constant into variable The "manifest" label that's used in error messages will instead be the directory path for subdirectory manifests (not the root manifest), so let's extract the constant to a variable already to make future patches simpler.
Sun, 07 Feb 2016 22:46:20 -0800 verify: use similar language for missing manifest and file revisions
Martin von Zweigbergk <martinvonz@google.com> [Sun, 07 Feb 2016 22:46:20 -0800] rev 28114
verify: use similar language for missing manifest and file revisions When a changeset refers to a manifest revision that's not found in the manifest log, we say "changeset refers to missing revision X", but when a manifest refers to file revision that's not found in the filelog, we say "X in manifests not found". The language used for missing manifest revisions seems clearer, so let's use that for missing filelog revisions too.
Tue, 02 Feb 2016 10:42:28 -0800 verify: include "manifest" prefix in a few more places
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 Feb 2016 10:42:28 -0800] rev 28113
verify: include "manifest" prefix in a few more places We include the "manifest" prefix on most other errors, so it seems consistent to add them to the remaining messages too. Also, having the "manifest" prefix will be more consistent with having the directory prefix there when we add support for treemanifests. With the "manifest" at the beginning, let's remove the now-redundant "manifest" in the message itself.
Tue, 02 Feb 2016 09:46:14 -0800 verify: drop unnecessary check for nullid
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 Feb 2016 09:46:14 -0800] rev 28112
verify: drop unnecessary check for nullid In eb914541a950 (verify: filter messages about missing null manifests (issue2900), 2011-07-13), we started ignoring nullid in the list of manifest nodeids to check. Then, in b32a30da608d (verify: do not choke on valid changelog without manifest, 2012-08-21), we stopped adding nullid to the list to start with. So let's drop the left-over check now.
Sun, 31 Jan 2016 00:10:56 -0800 verify: move cross-checking of changeset/manifest out of _crosscheckfiles()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 31 Jan 2016 00:10:56 -0800] rev 28111
verify: move cross-checking of changeset/manifest out of _crosscheckfiles() Reasons: * _crosscheckfiles(), as the name suggests, is about checking that the set of files files mentioned in changesets match the set of files mentioned in the manifests. * The "checking" in _crosscheckfiles() looked rather strange, as it just emitted an error for *every* entry in mflinkrevs. The reason was that these were the entries remaining after the call to _verifymanifest(). Moving all the processing of mflinkrevs into _verifymanifest() makes it much clearer that it's the remaining entries that are a problem. Functional change: progress is no longer reported for "crosschecking" of missing manifest entries. Since the crosschecking phase takes a tiny fraction of the verification, I don't think this is a problem. Also, any reports of "changeset refers to unknown manifest" will now come before "crosschecking files in changesets and manifests".
Sun, 31 Jan 2016 21:55:52 -0800 tests: add tests for missing revlogs and revlog entries
Martin von Zweigbergk <martinvonz@google.com> [Sun, 31 Jan 2016 21:55:52 -0800] rev 28110
tests: add tests for missing revlogs and revlog entries The verify code is pretty poorly tested. It's easy to test missing revlogs and missing revlog entries, so let's add tests for that. Also add some more tests corrupting each type of revlog, so we test the messages presented when reading a revision fails. The pure and native implementations produce different error messages, so we have to use (glob) in the tests.
Fri, 12 Feb 2016 14:50:10 -0800 hook: don't crash on syntax errors in python hooks
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Feb 2016 14:50:10 -0800] rev 28109
hook: don't crash on syntax errors in python hooks We had some real-world cases where syntax errors in Python hooks would crash the whole process and leave it in an indeterminate state. Handle those better.
Fri, 12 Feb 2016 11:44:35 -0800 hook: for python hook exceptions, add note to run with --traceback
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Feb 2016 11:44:35 -0800] rev 28108
hook: for python hook exceptions, add note to run with --traceback Just like with ImportErrors, it isn't obvious that --traceback will produce helpful debugging output here.
Fri, 12 Feb 2016 11:42:18 -0800 hook: add tests for failing post- python hooks
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Feb 2016 11:42:18 -0800] rev 28107
hook: add tests for failing post- python hooks I couldn't find any tests for this.
Fri, 12 Feb 2016 11:34:04 -0800 hook: even fewer parentheses for load errors
Siddharth Agarwal <sid0@fb.com> [Fri, 12 Feb 2016 11:34:04 -0800] rev 28106
hook: even fewer parentheses for load errors Missed this one.
Mon, 08 Feb 2016 17:34:32 +0100 destutil: document various failure cases
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 17:34:32 +0100] rev 28105
destutil: document various failure cases We document what various conditional branch mean and clarify that they are exclusive (since they all end up in with exception raised).
Mon, 08 Feb 2016 14:56:28 +0100 destutil: consistently retrieve 'p1' and 'branch'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:56:28 +0100] rev 28104
destutil: consistently retrieve 'p1' and 'branch' We already read p1 from the dirstate so let's read the branch from it too.
Mon, 08 Feb 2016 14:55:58 +0100 merge: give priority to "not at head" failures for bare 'hg merge'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:55:58 +0100] rev 28103
merge: give priority to "not at head" failures for bare 'hg merge' We refuse to pick a destination for a bare 'hg merge' if the working copy is not at head. This is meant to prevent strange merge from user who forget to update. (Moreover, such merge does not reduce actually the number of heads) However, we were doing that as the last possible failure type. So user were recommended to merge with an explicit head (from this bad location) if the branch had too many heads. We now make "not on branch heads" class of failure the first things to check and fail on. The one test that change was actually trying to check for these failure (and did not). The new test output is correct.
Tue, 09 Feb 2016 21:14:37 +0000 destutil: extract all 'mergedest' abort messages into a dictionary
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 09 Feb 2016 21:14:37 +0000] rev 28102
destutil: extract all 'mergedest' abort messages into a dictionary We plan to be able to reuse this function for rebase. The error message explicitly refers to "merge" in multiple places. So we'll need to be able to use different messages. The first step of that is to extract all messages in a dedicated dictionary and use them indirectly. As a side effect it clarifies the actual function and opens the way to various cleanups and fixes in future changesets.
Mon, 08 Feb 2016 14:03:45 +0100 tests: add an explicit destination in some rebase tests
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:03:45 +0100] rev 28101
tests: add an explicit destination in some rebase tests As we will make 'rebase' behave more like 'merge', it will no longer pick 'max(branch(.))' as the default destination. We have to hard code the expected destination is multiple tests where it matters. After a careful inspection none of theses tests really cares about the default destination behavior and just omitted one out of laziness.
Mon, 08 Feb 2016 14:02:53 +0100 tests: remove third head in some of the 'rebase-parameters' tests
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:02:53 +0100] rev 28100
tests: remove third head in some of the 'rebase-parameters' tests These tests do not care about that extra branch at all. In future changeset we will make rebase behave like merge and abort in case of an ambiguous destination (eg: multiple other heads) and that extra branch will make the command invocation breaks. We preventively remove this extra branch from the relevant tests in an independant changeset to reduce noise and increase confidence in the final change.
Sun, 07 Feb 2016 15:21:39 +0900 run-tests: allow to specify executable of any name by --with-hg
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 15:21:39 +0900] rev 28099
run-tests: allow to specify executable of any name by --with-hg If the executable is not named as "hg", TTest runner inserts alias. This way, we can run tests with chg. But it is still warned because the alias does not always work. We do "$BINDIR"/hg in a few places.
Sun, 07 Feb 2016 16:02:41 +0900 run-tests: drop redundant assignment to BINDIR
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 16:02:41 +0900] rev 28098
run-tests: drop redundant assignment to BINDIR We do it a few lines after.
Sun, 07 Feb 2016 16:00:05 +0900 run-tests: cast --with-hg option to bytes consistently at parseargs()
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 16:00:05 +0900] rev 28097
run-tests: cast --with-hg option to bytes consistently at parseargs() parseargs() sets bytes to options.with_hg if --local is specified, so do the same for --with-hg.
Sun, 07 Feb 2016 15:53:02 +0900 run-tests: do not compare bytes with str while ordering tests
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 15:53:02 +0900] rev 28096
run-tests: do not compare bytes with str while ordering tests It failed on Python 3.
Tue, 09 Feb 2016 17:51:44 -0800 clonebundles: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:51:44 -0800] rev 28095
clonebundles: use absolute_import
Tue, 09 Feb 2016 17:50:45 -0800 churn: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:50:45 -0800] rev 28094
churn: use absolute_import
Tue, 09 Feb 2016 17:34:32 -0800 children: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:34:32 -0800] rev 28093
children: use absolute_import
Tue, 09 Feb 2016 17:33:10 -0800 censor: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:33:10 -0800] rev 28092
censor: use absolute_import
Tue, 09 Feb 2016 17:31:50 -0800 bugzilla: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:31:50 -0800] rev 28091
bugzilla: use absolute_import
Tue, 09 Feb 2016 17:30:38 -0800 blackbox: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:30:38 -0800] rev 28090
blackbox: use absolute_import
Tue, 09 Feb 2016 17:29:39 -0800 acl: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:29:39 -0800] rev 28089
acl: use absolute_import Continuing the march towards Python 3.
Thu, 11 Feb 2016 17:23:10 -0800 checkunknown: audit path before checking if it's a file or link
Durham Goode <durham@fb.com> [Thu, 11 Feb 2016 17:23:10 -0800] rev 28088
checkunknown: audit path before checking if it's a file or link Previously we would lstat the file to see if it was a file or a link before attempting to process it. If the file happened to exist across a symlink, and if that symlink was pointing to a network file system, that check could be very expensive. The new logic audit's the path to avoid symlinks before performing the lstat on the file itself. In our situation, this shaved 10 minutes off of certain hg updates. 300 files * (2 seconds - the network filesystem lookup time)
Thu, 11 Feb 2016 17:04:33 -0800 pathauditor: change parts verification order to be root first
Durham Goode <durham@fb.com> [Thu, 11 Feb 2016 17:04:33 -0800] rev 28087
pathauditor: change parts verification order to be root first Previously, when we verified the parts of a path in the auditor, we would validate the deepest directory first, then it's parent, and so on up to the root. If there happened to be a symlink in the chain, that meant our first check would likely traverse that symlink. In some cases that symlink might point to a network filesystem that is expensive, and therefore this simple check could be very slow. The fix is to check the path parts starting at the root and working our way down. This has a minor performance difference in that we used to be able to short circuit from the audit if we reached a directory that had already been checked. Now we can't, but the cost is N dictionary look ups, where N is the number of parts in the path, which should be fairly minor.
Tue, 19 Jan 2016 22:31:59 +0900 chg: forward job control signals to worker process (issue5051)
Yuya Nishihara <yuya@tcha.org> [Tue, 19 Jan 2016 22:31:59 +0900] rev 28086
chg: forward job control signals to worker process (issue5051) This is necessary to suspend/resume long pulls, interactive curses session, etc. The implementation is based on emacsclient, but our version doesn't test if chg process is foreground or not before propagating SIGCONT. This is because chg isn't always an interactive session. If we copy the SIGTTIN/SIGTTOU emulation from emacsclient, non-interactive session can't be moved to a background job. $ chg pull ^Z suspended $ bg %1 [1] continued [1] suspended (tty input) # wrong https://github.com/emacs-mirror/emacs/blob/0e96320/lib-src/emacsclient.c#L1094
Fri, 29 Jan 2016 22:52:16 +0900 chg: verify return value of sigaction() and sigemptyset()
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Jan 2016 22:52:16 +0900] rev 28085
chg: verify return value of sigaction() and sigemptyset() They should never fail, but it couldn't hurt to be a paranoid.
Fri, 29 Jan 2016 22:42:22 +0900 chg: initialize sigaction fields more reliably
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Jan 2016 22:42:22 +0900] rev 28084
chg: initialize sigaction fields more reliably It seems calling memset() and sigemptyset() is common pattern to initialize sigaction. And strictly speaking, sigset_t must be initialized by sigemptyset() or sigfillset(). I saw git and uwsgi do that way, so let's follow them.
Fri, 12 Feb 2016 06:25:05 -0800 tests: confirm that a badly documented extension doesn't cause a crash
Simon Farnsworth <simonfar@fb.com> [Fri, 12 Feb 2016 06:25:05 -0800] rev 28083
tests: confirm that a badly documented extension doesn't cause a crash An external extension whose docstring doesn't conform to Mercurial standards used to cause crashes. Test that we omit such extensions when you do a keyword search.
Fri, 12 Feb 2016 14:24:48 +0000 bookmarks: avoid creating a nested repository during testing
Martijn Pieters <mjpieters@fb.com> [Fri, 12 Feb 2016 14:24:48 +0000] rev 28082
bookmarks: avoid creating a nested repository during testing This helps the test to pass with hgwatchman, which would otherwise need to be taught about a nested .hg directory. hgwatchman already blacklists test-nested-repo.t which covers the actual usecase
Mon, 08 Feb 2016 15:35:30 -0800 dispatch: strip command line options like config file options
Tony Tung <ttung@fb.com> [Mon, 08 Feb 2016 15:35:30 -0800] rev 28081
dispatch: strip command line options like config file options Currently, whitespace in command line --config options are considered significant while whitespace in config files are not considered significant. This diff strips the leading and trailing whitespace from command line config options.
Thu, 11 Feb 2016 22:52:23 -0800 hook: for python hook ImportErrors, add note to run with --traceback
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Feb 2016 22:52:23 -0800] rev 28080
hook: for python hook ImportErrors, add note to run with --traceback I personally found it completely non-obvious that --traceback prints out stack traces for failed imports.
Thu, 11 Feb 2016 22:41:20 -0800 hook: fewer parentheses for hook load errors
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Feb 2016 22:41:20 -0800] rev 28079
hook: fewer parentheses for hook load errors This matches 'hook failed' warnings. We're also going to add hints to some of the hook load errors. Without this change we'd have two pairs of parens for a single error message, which looks really cluttered.
Thu, 11 Feb 2016 22:02:52 -0800 hook: use sys.exc_info rather than the deprecated equivalents
Siddharth Agarwal <sid0@fb.com> [Thu, 11 Feb 2016 22:02:52 -0800] rev 28078
hook: use sys.exc_info rather than the deprecated equivalents sys.exc_type etc have been deprecated since Python 1.5.
Thu, 11 Feb 2016 23:15:34 +0900 doc: describe full help document hierarchy to create a valid link in HTML
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 11 Feb 2016 23:15:34 +0900] rev 28077
doc: describe full help document hierarchy to create a valid link in HTML For example, ":hg:`help config.default-push`" creates an invalid link to "hgrc.5.html#default-push" in HTML, but ":hg:`help config.paths.default-push`" creates a valid link to "hgrc.5.html#paths".
Thu, 11 Feb 2016 23:15:34 +0900 doc: translate from :hg:`help config.SECTION` to a valid link to hgrc.5.html
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 11 Feb 2016 23:15:34 +0900] rev 28076
doc: translate from :hg:`help config.SECTION` to a valid link to hgrc.5.html Before this patch, ":hg:`help config.SECTION`" in online help text is translated to a link to "hg.1.html#config.SECTION" in HTML unintentionally. This patch translates from :hg:`help config.SECTION` in online help text to a valid link to "hgrc.5.html#SECTION" in HTML. This patch ignores element(s) under "SECTION" (e.g. "ITEM" of ":hg:`help config.SECTION.ITEM`"), because there is no way to refer directly to it in HTML, yet.
Thu, 11 Feb 2016 23:15:34 +0900 doc: translate from :hg:`help config` to a valid link to hgrc.5.html
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 11 Feb 2016 23:15:34 +0900] rev 28075
doc: translate from :hg:`help config` to a valid link to hgrc.5.html Before this patch, ":hg:`help config`" in online help text is translated to a link to "hg.1.html#config" in HTML, even though actual "hg help config" shows not help for "hg config" command but "config" help topic, and all of current ":hg:`help config`" expects the latter. This patch translates from ":hg:`help config`" in online help text to a link to "hgrc.5.html" in HTML as expected. This patch also allows ":hg:`help -c COMMAND`" style to link "hg.1.html#COMMAND" for readability.
Thu, 11 Feb 2016 23:15:34 +0900 i18n: calculate correct line number in source of messages to be translated
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 11 Feb 2016 23:15:34 +0900] rev 28074
i18n: calculate correct line number in source of messages to be translated Before this patch, line number in source of the message to be translated is wrong in hg.pot, if corresponded message is placed after ".. DIRECTIVE::", because number of lines related to such directive isn't added to variable "delta", which holds number of untranslated lines in given text. This patch always adds "2" to "delta", because text block is split into translation units by "\n\n".
Wed, 10 Feb 2016 12:39:25 -0800 revsetbenchmark: handle exception case
Durham Goode <durham@fb.com> [Wed, 10 Feb 2016 12:39:25 -0800] rev 28073
revsetbenchmark: handle exception case If the revset being benchmarked has an exception, the handling code was encountering an error because the exception did not always have an "output" attribute (I think it's a python 2.7 thing).
Wed, 10 Feb 2016 09:06:08 -0800 merge: minimize conflicts when common base is not shown (issue4447)
Ryan McElroy <rmcelroy@fb.com> [Wed, 10 Feb 2016 09:06:08 -0800] rev 28072
merge: minimize conflicts when common base is not shown (issue4447) Previously, two changes that were nearly, but not quite, identical would result in large merge conflict regions that looked very similar, and were thus very confusing to users, and lead people used to other source control systems to claim that "mercurial's merge algorithms suck". In the relatively common case of a new file being introduced in two branches with very slight modifications, the old behavior would show the entire file as a conflict, and it would be very difficult for a user to determine what was going on. In the past, mercurial attempted to solve this with a "very smart" algorithm that would find all common lines, but this has significant problems as described in 2ea6d906cf9b. Instead, we use a "very dumb" algorithm introduced in the previous patch that simply matches lines at the periphery of conflict regions. This minimizes most conflict regions well, though there may still be some degenerate edge cases, like small modification to the beginning and end of a large file.
Wed, 10 Feb 2016 08:25:03 -0800 merge: introduce method to minimize merge regions
Ryan McElroy <rmcelroy@fb.com> [Wed, 10 Feb 2016 08:25:03 -0800] rev 28071
merge: introduce method to minimize merge regions In the next diff, we will use this to trim down the start and end of conflict regions where the A and B sides both made the same changes.
Tue, 09 Feb 2016 15:25:09 -0800 merge: add some useful documentation
Ryan McElroy <rmcelroy@fb.com> [Tue, 09 Feb 2016 15:25:09 -0800] rev 28070
merge: add some useful documentation
Sun, 27 Dec 2015 19:58:11 +0900 encoding: backport paranoid escaping from templatefilters.jsonescape()
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Dec 2015 19:58:11 +0900] rev 28069
encoding: backport paranoid escaping from templatefilters.jsonescape() This was introduced by 55c763926a28. It is required to embed JSON data in HTML page. Convince yourself here: http://escape.alf.nu/1
Sun, 27 Dec 2015 19:28:34 +0900 encoding: add option to escape non-ascii characters in JSON
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Dec 2015 19:28:34 +0900] rev 28068
encoding: add option to escape non-ascii characters in JSON This is necessary for hgweb to embed JSON data in HTML. JSON data must be able to be embedded in non-UTF-8 HTML page so long as the page encoding is compatible with ASCII. According to RFC 7159, non-BMP character is represented as UTF-16 surrogate pair. This function first splits an input string into an array of UTF-16 code points. https://tools.ietf.org/html/rfc7159.html#section-7
Sat, 30 Jan 2016 19:48:35 +0900 encoding: initialize jsonmap when module is loaded
Yuya Nishihara <yuya@tcha.org> [Sat, 30 Jan 2016 19:48:35 +0900] rev 28067
encoding: initialize jsonmap when module is loaded This makes jsonescape() a thread-safe function, which is necessary for hgweb. The initialization stuff isn't that slow: $ python -m timeit -n1000 -s 'from mercurial import encoding as x' 'reload(x)' original: 1000 loops, best of 3: 158 usec per loop this patch: 1000 loops, best of 3: 214 usec per loop compared to loading the commands module: $ python -m timeit -n1000 -s 'from mercurial import commands as x' 'reload(x)' 1000 loops, best of 3: 1.11 msec per loop
Sat, 30 Jan 2016 19:41:34 +0900 encoding: change jsonmap to a list indexed by code point
Yuya Nishihara <yuya@tcha.org> [Sat, 30 Jan 2016 19:41:34 +0900] rev 28066
encoding: change jsonmap to a list indexed by code point This is slightly faster and convenient to implement a paranoid escaping. $ python -m timeit \ -s 'from mercurial import encoding; data = str(bytearray(xrange(128)))' \ 'encoding.jsonescape(data)' original: 100000 loops, best of 3: 15.1 usec per loop this patch: 100000 loops, best of 3: 13.7 usec per loop
Tue, 02 Feb 2016 15:24:11 +0000 update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 02 Feb 2016 15:24:11 +0000] rev 28065
update: change default destination to tipmost descendant (issue4673) (BC) Bare 'hg update' now brings you to the tipmost descendant (on the same branch). Leaving the user on the same topological branch. The previous behavior, updating to the tipmost changeset on the same branch could lead to jump from a topological branch to another. This was confusing and impractical. As the only conceivable reason for the old behavior have been address by the recently introduce message about other heads, we can "safely" change this behavior All test changes have been reviewed and seen a valid consequences.
Wed, 03 Feb 2016 15:21:11 +0000 test: drop useless --update flag in issue1502 tests
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 03 Feb 2016 15:21:11 +0000] rev 28064
test: drop useless --update flag in issue1502 tests The --update is unrelated to the test and has no effect as it fails anyway. Dropping it reduces the noise in the coming change in default destination for update.
Thu, 11 Feb 2016 13:50:38 +0000 treemanifest: don't use cp -T, not supported on OS X
Martijn Pieters <mjpieters@fb.com> [Thu, 11 Feb 2016 13:50:38 +0000] rev 28063
treemanifest: don't use cp -T, not supported on OS X The OS X cp implementation has no -T switch. Copy directory contents using a glob instead.
Sun, 03 Jan 2016 12:45:32 +0900 chg: use in-tree hg executable to start server for testing
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jan 2016 12:45:32 +0900] rev 28062
chg: use in-tree hg executable to start server for testing
Sun, 03 Jan 2016 12:41:28 +0900 hgignore: ignore chg binary
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jan 2016 12:41:28 +0900] rev 28061
hgignore: ignore chg binary
Sun, 03 Jan 2016 12:39:27 +0900 chg: import frontend sources
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jan 2016 12:39:27 +0900] rev 28060
chg: import frontend sources These files are copied from https://bitbucket.org/yuja/chg/ -r f897faa79687
Wed, 10 Feb 2016 21:01:52 +0100 debugrevlog: fix dumping manifest fails on empty first revision (issue5062)
liscju <piotr.listkiewicz@gmail.com> [Wed, 10 Feb 2016 21:01:52 +0100] rev 28059
debugrevlog: fix dumping manifest fails on empty first revision (issue5062)
Wed, 10 Feb 2016 01:48:58 -0800 help: don't crash in keyword search if an extension fails to provide docs
Simon Farnsworth <simonfar@fb.com> [Wed, 10 Feb 2016 01:48:58 -0800] rev 28058
help: don't crash in keyword search if an extension fails to provide docs Not all external extensions provide docs; if you use such an extension, you will experience a crash if you use "hg help --keyword <word>", and <word> happens to match the extension name.
Sat, 20 Feb 2016 17:32:26 +0100 doc: correct example concerning "hg purge" alias in man page "hgrc.5" stable
Rainer Woitok <Rainer.Woitok@Gmail.Com> [Sat, 20 Feb 2016 17:32:26 +0100] rev 28057
doc: correct example concerning "hg purge" alias in man page "hgrc.5" The "hg purge" alias as currently described in "hgrc.5" only works, if the caller's current working directory is identical to the repository's root directory. This patch slightly modifies the example by adding an empty pattern as a file argument to the "hg status" command, thus forcing this command to list the affected files relative to the current directory.
Thu, 18 Feb 2016 22:32:18 -0500 fileset: fix copy/paste in eol() error message stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Feb 2016 22:32:18 -0500] rev 28056
fileset: fix copy/paste in eol() error message
Fri, 29 Jan 2016 14:35:34 +0000 run-tests: factor out _escapepath
timeless <timeless@mozdev.org> [Fri, 29 Jan 2016 14:35:34 +0000] rev 28055
run-tests: factor out _escapepath
Mon, 08 Feb 2016 12:33:00 -0500 debugignore: normalize the file before testing dirstate._ignore()
Matt Harbison <matt_harbison@yahoo.com> [Mon, 08 Feb 2016 12:33:00 -0500] rev 28054
debugignore: normalize the file before testing dirstate._ignore() With an ignore pattern containing a '/' and a Windows style path containing '\', status was properly ignoring the file, but debugignore was stating that it wasn't ignored.
Thu, 11 Feb 2016 02:15:45 +0900 check-code: add rule to detect usage of external diff via extdiff
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 11 Feb 2016 02:15:45 +0900] rev 28053
check-code: add rule to detect usage of external diff via extdiff This rule detects "hg extdiff" invocation without -p/--program and -o/--option. This patch specifies "-p diff" explicitly in test-extdiff.t to avoid false positive matching.
Mon, 08 Feb 2016 18:29:17 +0900 tests: use portable diff script via extdiff extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Feb 2016 18:29:17 +0900] rev 28052
tests: use portable diff script via extdiff extension Before this patch, some tests using external "diff" command via extdiff extension fail on Solaris, because of incompatibility of "diff" command and its output. For example, system standard "diff" (= /usr/bin/diff) on Solaris differs from GNU diff in points below: - "-N" (treat absent files as empty) option isn't supported - files are examined not in dictionary order (maybe, in order in storage) This patch introduces portable diff script "pdiff" and make tests use it via extdiff extension. For portability of tests, this patch invokes "pdiff" script with explicit "sh", because standard shell of runtime platform ("cmd.exe" on Windows) is used at first to invoke external diff command.
Sun, 07 Feb 2016 09:36:09 +0100 test-patchbomb: ensure hg email write to stdout
Sébastien Brissaud <sebastien@brissaud.name> [Sun, 07 Feb 2016 09:36:09 +0100] rev 28051
test-patchbomb: ensure hg email write to stdout With -n/--test and if the PAGER environment variable is set, 'hg email' send its output to the user defined pager. If the pager capture the output, the test is unable verify it. Unsetting the PAGER environment variable force 'hg email' to write to stdout.
Wed, 10 Feb 2016 22:44:29 +0900 check-code: examine magic pattern matching against contents of a file
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:29 +0900] rev 28050
check-code: examine magic pattern matching against contents of a file Before this patch, check-code examines "magic" pattern (e.g. '^#!.*python') matching against not contents of a file, but name of it. This unintentionally omits code checking against Python source file, of which filename doesn't end with "*.py" or "*.cgi", even though contents of it starts with "#!/bin/python" or so. In this change, 'pre' refers contents of file 'f'.
Wed, 10 Feb 2016 22:44:29 +0900 docchecker: use indentation of 4 spaces
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:29 +0900] rev 28049
docchecker: use indentation of 4 spaces This is fixing for 'must indent 4 spaces' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:29 +0900 docchecker: remove naked except clause
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:29 +0900] rev 28048
docchecker: remove naked except clause This is fixing for 'naked except clause' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:29 +0900 misc: use modern exception syntax
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:29 +0900] rev 28047
misc: use modern exception syntax This is fixing for 'legacy exception syntax; use "as" instead of ","' check-code rule. check-code has overlooked these, because files aren't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:28 +0900 f: use modern octal number formatting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:28 +0900] rev 28046
f: use modern octal number formatting This is fixing for 'legacy octal syntax; use "0o" prefix instead of "0"' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:28 +0900 hg-ssh: parenthesize non-translated message
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:28 +0900] rev 28045
hg-ssh: parenthesize non-translated message This is fixing for 'missing _() in ui message (use () to hide false-positives)' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:28 +0900 f: add whitespace around operator
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:28 +0900] rev 28044
f: add whitespace around operator This is fixing for 'missing whitespace in expression' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:28 +0900 check-commit: omit whitespace
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:28 +0900] rev 28043
check-commit: omit whitespace This is fixing for 'no whitespace around = for named parameters' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Wed, 10 Feb 2016 22:44:28 +0900 check-commit: wrap too long line
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 10 Feb 2016 22:44:28 +0900] rev 28042
check-commit: wrap too long line This is fixing for 'line too long' check-code rule. check-code has overlooked this, because a file isn't recognized as one to be checked (this problem is fixed by subsequent patch).
Mon, 08 Feb 2016 21:12:13 +0900 setup: avoid procedure related to hg.exe at setup.py --pure stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Feb 2016 21:12:13 +0900] rev 28041
setup: avoid procedure related to hg.exe at setup.py --pure Before this patch, "setup.py --pure" fails on Windows, because hgbuildscripts.run() tries to copy "hg.exe", which doesn't generated at "setup.py --pure". At that time, run_command('build_hgexe') invoked in hgbuildscripts.run() does nothing and returns successfully. Therefore, subsequent procedure assuming existence of "hg.exe" fails. This patch avoids procedure related to "hg.exe" (= all of hgbuildscripts.run() except for build_scripts.run() invocation) at "setup.py --pure".
Fri, 05 Feb 2016 23:17:07 +0900 help: update template examples to use reST literal syntax stable
Yuya Nishihara <yuya@tcha.org> [Fri, 05 Feb 2016 23:17:07 +0900] rev 28040
help: update template examples to use reST literal syntax This should prevent processing backslashes as reST syntax elements. Before this patch, '\' was lost in HTML and man pages.
(0) -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip