Tue, 01 Dec 2015 18:45:16 -0800 addrevision: rework generaldelta computation
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 01 Dec 2015 18:45:16 -0800] rev 27189
addrevision: rework generaldelta computation The old code have multiple explicit tests and code duplications. This makes it hard to improve the code. We rewrite the logic in a more generic way, not changing anything of the computed result. The final goal here is to eventually be able to: - factor out the default fallback case "try against 'prev'" in a single place - allow 'lazydeltabase' case to use the smarter general delta code path when the incoming base does not provide us with a good delta.
Wed, 11 Nov 2015 21:03:48 -0500 bmstore: close file in a finally block in _writerepo
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 21:03:48 -0500] rev 27188
bmstore: close file in a finally block in _writerepo Also rename the variable to file_ to avoid shadowing a builtin.
Wed, 11 Nov 2015 21:01:23 -0500 bmstore: add basic clean-state tracking
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 21:01:23 -0500] rev 27187
bmstore: add basic clean-state tracking I'm about to move active-bookmark management into the bmstore. I'd like to avoid re-writing the bookmarks data (as distinct from the active bookmark file) if possible, so let's introduce some dirty-tracking early.
Wed, 11 Nov 2015 20:45:38 -0500 bookmarks: hoist getbkfile out of bmstore class
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 20:45:38 -0500] rev 27186
bookmarks: hoist getbkfile out of bmstore class It's totally fine that this hook exists, but I don't see a need for it to live inside the bmstore class.
Wed, 11 Nov 2015 20:43:25 -0500 bookmarks: document getbkfile method
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 20:43:25 -0500] rev 27185
bookmarks: document getbkfile method I'm working on bmstore again, and this function gave me a moment's pause. Document it to save future readers from any undue confusion.
Sat, 31 Oct 2015 22:50:03 +0900 hgweb: load server settings from --web-conf (issue4699)
Yuya Nishihara <yuya@tcha.org> [Sat, 31 Oct 2015 22:50:03 +0900] rev 27184
hgweb: load server settings from --web-conf (issue4699) It copies the ui before loading the webconf and passes the copied ui only to the service. This way, the hgwebdir app can reload configs cleanly.
Tue, 17 Nov 2015 16:42:52 -0600 extdiff: correctly handle deleted subrepositories (issue3153)
Andrew Zwicky <andrew.zwicky@gmail.com> [Tue, 17 Nov 2015 16:42:52 -0600] rev 27183
extdiff: correctly handle deleted subrepositories (issue3153) Previously, when extdiff was called on two changesets where a subrepository had been removed, an unexpected KeyError would be raised. Now, the missing subrepository will be ignored. This behavior mirrors the behavior in diffordiffstat from cmdutil.py line ~1138-1153. The KeyError is caught and the revision is set to None. try/catch of LookupError around matchmod.narrowmatcher and sub.status is removed, as LookupError is not raised anywhere within those methods or deeper calls.
Sat, 21 Nov 2015 13:28:12 +0900 hgweb: make sure command options are set to all ui objects
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Nov 2015 13:28:12 +0900] rev 27182
hgweb: make sure command options are set to all ui objects Before this patch, it was unclear why the httpservice object could read the server options (e.g. --port) from 'ui'. It just worked because repo.ui is ui.
Sat, 31 Oct 2015 22:26:50 +0900 hgweb: eliminate duck-typing to select hgweb or hgwebdir by command option
Yuya Nishihara <yuya@tcha.org> [Sat, 31 Oct 2015 22:26:50 +0900] rev 27181
hgweb: eliminate duck-typing to select hgweb or hgwebdir by command option Since createservice() was moved to hgweb and hgweb imports both hgweb_mod and hgwebdir_mod, we no longer have to force hgweb() function to select one of them by the type of 'o' variable. Let's be explicit! This patch does not change hgweb() function because it is the interface of existing WSGI and CGI scripts.
Tue, 01 Dec 2015 16:06:20 -0800 addrevision: only use the incoming base if it is a good delta (issue4975)
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 01 Dec 2015 16:06:20 -0800] rev 27180
addrevision: only use the incoming base if it is a good delta (issue4975) Before this change, the 'lazydeltabase' would blindly build a delta using the base provided by the incoming bundle and try to use it. If that base was far down the revlog, the delta would be seen as "no good" and we would fall back to a full text revision. We now check if the delta is good and fallback to a computing a delta again the tipmost revision otherwise (as we would do without general delta). Later changesets will improve the logic to compute the fallback delta using the general delta logic.
Tue, 01 Dec 2015 16:22:49 -0800 addrevision: handle code path not producing delta
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 01 Dec 2015 16:22:49 -0800] rev 27179
addrevision: handle code path not producing delta We would like to be able to exit the delta generation block without a valid delta (for a more flexible control flow). So we make sure we do not expand the "delta" content unless we actually have a delta. We can do it one level lower because 'delta' is initialised at None anyway. Not adding a level to the assignment prevent a line length issue.
Tue, 01 Dec 2015 15:29:11 -0800 addrevision: rename 'd' to 'delta'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 01 Dec 2015 15:29:11 -0800] rev 27178
addrevision: rename 'd' to 'delta' That variable is quite central to the whole function. Giving it a more explicit name help with code readability.
Mon, 30 Nov 2015 11:23:15 -0800 strip: add a --keep test related to removing files from dirstate
Christian Delahousse <cdelahousse@fb.com> [Mon, 30 Nov 2015 11:23:15 -0800] rev 27177
strip: add a --keep test related to removing files from dirstate When strip builds the list of changedfiles to pass into dirstate.rebuild, it adds files blindly, including those that have been removed. This tests ensures that rebuild can handle this case.
Mon, 30 Nov 2015 11:23:15 -0800 dirstate: change debugrebuilddirstate --minimal to use dirstate.rebuild
Christian Delahousse <cdelahousse@fb.com> [Mon, 30 Nov 2015 11:23:15 -0800] rev 27176
dirstate: change debugrebuilddirstate --minimal to use dirstate.rebuild When debugrebuilddirstate --minimal is called, rebuilding the dirstate was done outside of the appropriate rebuild function. This patch makes debugrebuilddirstate use dirstate.rebuild. This was done to allow our extension to become aware debugrebuilddirstate --minimal
Tue, 01 Dec 2015 10:52:36 -0800 debugrebuilddirstate: added tests for --minimal flag
Christian Delahousse <cdelahousse@fb.com> [Tue, 01 Dec 2015 10:52:36 -0800] rev 27175
debugrebuilddirstate: added tests for --minimal flag Added tests for debugrebuilddirstate --minimal.
Tue, 01 Dec 2015 11:17:14 -0800 debugdirstate: add command to rebuildstate test to modify dirstate
Christian Delahousse <cdelahousse@fb.com> [Tue, 01 Dec 2015 11:17:14 -0800] rev 27174
debugdirstate: add command to rebuildstate test to modify dirstate Debugging the dirstate helps if you have options to add files for normal lookup or drop them from the dirstate. This patch adds a convenience command to test-rebuilddirstate.t to modify the dirstate. It will be used in the next patch to write proper tests for debugrebuilddirstate --minimal
Wed, 02 Dec 2015 06:33:52 +0000 graft: improve --continue abort message
timeless <timeless@mozdev.org> [Wed, 02 Dec 2015 06:33:52 +0000] rev 27173
graft: improve --continue abort message before, if you ran hg graft --user ... --date ... --log ... revs, and if it failed, it would suggest "hg graft --continue", but if you did that, your --user / --date / --log options were lost, because they were not persisted anywhere...
Wed, 02 Dec 2015 06:31:12 +0000 summary: mention graft
timeless <timeless@mozdev.org> [Wed, 02 Dec 2015 06:31:12 +0000] rev 27172
summary: mention graft
Wed, 02 Dec 2015 08:07:36 +0000 histedit: mention histedit-last-edit.txt on abort
timeless <timeless@mozdev.org> [Wed, 02 Dec 2015 08:07:36 +0000] rev 27171
histedit: mention histedit-last-edit.txt on abort Users may spend a lot of effort writing histedit rules, getting an abort without being told they can recover their work is very frustrating. Avoid that by telling them where to find their work.
Wed, 02 Dec 2015 07:40:42 +0000 histedit: add missing raise keyword to statement
timeless <timeless@mozdev.org> [Wed, 02 Dec 2015 07:40:42 +0000] rev 27170
histedit: add missing raise keyword to statement
Wed, 02 Dec 2015 07:39:49 +0000 histedit: improve grammar for _histedit comment
timeless <timeless@mozdev.org> [Wed, 02 Dec 2015 07:39:49 +0000] rev 27169
histedit: improve grammar for _histedit comment
Tue, 01 Dec 2015 14:44:08 -0500 test-fncache: ensure lock doesn't look held to __del__
Augie Fackler <augie@google.com> [Tue, 01 Dec 2015 14:44:08 -0500] rev 27168
test-fncache: ensure lock doesn't look held to __del__ This was showing a DeprecationWarning on Python 2.6.
Wed, 11 Nov 2015 20:07:15 -0500 commands: inline definition of localrepo.parents() and drop the method (API)
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 20:07:15 -0500] rev 27167
commands: inline definition of localrepo.parents() and drop the method (API) localrepo.parents() has relatively few users, and most of those were actually implicitly looking at the wctx, which is now made explicit via repo[None].
Wed, 11 Nov 2015 20:02:05 -0500 localrepo: document nodebookmarks
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 20:02:05 -0500] rev 27166
localrepo: document nodebookmarks
Wed, 11 Nov 2015 19:47:49 -0500 localrepo: remove clone method by hoisting into hg.py
Augie Fackler <augie@google.com> [Wed, 11 Nov 2015 19:47:49 -0500] rev 27165
localrepo: remove clone method by hoisting into hg.py hg.py was the only remaining caller of localrepo.clone(), so it's time to move some more behavior out of localrepo.
Tue, 01 Dec 2015 09:48:38 -0800 filemerge: default regular prompts to 'leave unresolved' (BC)
Siddharth Agarwal <sid0@fb.com> [Tue, 01 Dec 2015 09:48:38 -0800] rev 27164
filemerge: default regular prompts to 'leave unresolved' (BC) It makes far more sense to leave these conflicts unresolved and kick back to the user than to just assume that the local version be chosen. There are almost certainly buggy scripts and applications using Mercurial in the wild that do merges or rebases non-interactively, and then assume that if the operation succeeded there's nothing the user needs to pay attention to.
Mon, 30 Nov 2015 13:43:55 -0800 filemerge: add a 'leave unresolved' option to change/delete prompts
Siddharth Agarwal <sid0@fb.com> [Mon, 30 Nov 2015 13:43:55 -0800] rev 27163
filemerge: add a 'leave unresolved' option to change/delete prompts We're going to make this option the default in an upcoming patch.
Mon, 30 Nov 2015 11:17:18 -0800 filemerge: add a 'leave unresolved' option to regular prompts
Siddharth Agarwal <sid0@fb.com> [Mon, 30 Nov 2015 11:17:18 -0800] rev 27162
filemerge: add a 'leave unresolved' option to regular prompts 'Regular' here means anything that isn't a change/delete prompt. We'll add this option to change/delete prompts in a subsequent patch.
Wed, 25 Nov 2015 14:25:26 -0800 filemerge: add debug output for whether this is a change/delete conflict
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Nov 2015 14:25:26 -0800] rev 27161
filemerge: add debug output for whether this is a change/delete conflict Just like binary and symlink conflicts, change/delete conflicts influence the tool picked.
Sat, 28 Nov 2015 17:06:29 +0800 webcommands: test that fctx is not None in filediff()
Anton Shestakov <av6@dwimlabs.net> [Sat, 28 Nov 2015 17:06:29 +0800] rev 27160
webcommands: test that fctx is not None in filediff() A block of code above this one already says "if fctx is not None", and it's also what this code actually intends to check, so let's be specific as PEP-8 recommends.
Sat, 28 Nov 2015 16:46:31 +0800 webcommands: stop using ersatz if-else ternary operator for rename variable
Anton Shestakov <av6@dwimlabs.net> [Sat, 28 Nov 2015 16:46:31 +0800] rev 27159
webcommands: stop using ersatz if-else ternary operator for rename variable 6ddc86eedc3b didn't remove it, let's do it now. Placing the added lines into the already existing "if fctx is not None" block also makes webcommands.comparison() look a bit more like webcommands.filediff(), which eases possible future refactoring. And fctx is not None only when path in ctx, so logically it's equivalent.
Sat, 28 Nov 2015 16:02:22 +0800 webcommands: get correct parents when comparing a removed file (issue4962)
Anton Shestakov <av6@dwimlabs.net> [Sat, 28 Nov 2015 16:02:22 +0800] rev 27158
webcommands: get correct parents when comparing a removed file (issue4962) When comparing a file that was removed at the current revision, parents used to show grandparents instead, due to how fctx was "shifted" from the current revision to its p1. Let's not do that. The fix is pretty much copied from webcommands.filediff().
Mon, 30 Nov 2015 16:38:29 -0800 repair: use bookmarks.recordchange instead of bookmarks.write
Laurent Charignon <lcharignon@fb.com> [Mon, 30 Nov 2015 16:38:29 -0800] rev 27157
repair: use bookmarks.recordchange instead of bookmarks.write Before this patch we were using the deprecated bookmarks.write api. This patch replaces the call to bookmarks.write by a call to bookmarks.recordchange. We move the bookmark code above the code removing the undo file because with bookmarks.recordchange we have to create a transaction that would create an undo file.
Mon, 30 Nov 2015 16:37:42 -0800 commit: add amend mode for commit -i
Laurent Charignon <lcharignon@fb.com> [Mon, 30 Nov 2015 16:37:42 -0800] rev 27156
commit: add amend mode for commit -i When I moved crecord into core, I didn't include the toggleAmend function (to switch from commit to amend mode). I did it because it would have made it more difficult to use record and crecord interchangably. This patch reintroduces the amend mode for commit -i as well as two tests to verify the behavior of the function.
Mon, 30 Nov 2015 16:35:21 -0800 commit: add a way to return more information from the chunkselector
Laurent Charignon <lcharignon@fb.com> [Mon, 30 Nov 2015 16:35:21 -0800] rev 27155
commit: add a way to return more information from the chunkselector Before this patch, the chunkselector for record or crecord was used to return the list of hunks that were selected by the user. The goal of this series is to reintroduce the toggle amend feature for crecord. To do so, we need to be able to return more than just the selected hunks from the chunkselector but also the information: is amend mode toggled. This patch adds a new return value for chunkselectors that will be used to implement the toggle amend feature in crecord.
Sat, 21 Nov 2015 17:40:26 +0200 histedit: edit with custom filename
Mykola Nikishov <mn@mn.com.ua> [Sat, 21 Nov 2015 17:40:26 +0200] rev 27154
histedit: edit with custom filename For instance, Emacs allows to open file with special features enabled (AKA mode) based on the path/name of the file [1]. For such cases, use 'hg-histedit-XXX.txt' as filename pattern. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html
Sat, 21 Nov 2015 22:04:09 +0200 ui: allow open editor with custom filename
Mykola Nikishov <mn@mn.com.ua> [Sat, 21 Nov 2015 22:04:09 +0200] rev 27153
ui: allow open editor with custom filename By default, editor will use temp file named after hard-coded pattern 'hg-editor-XXX.txt' which makes it impossible for extensions to use another filename if desired. Now the middle part of the pattern ('editor') can be changed by setting extra['prefix'].
Mon, 30 Nov 2015 20:45:07 +0000 help: make help deprecated mention the extension
timeless <timeless@mozdev.org> [Mon, 30 Nov 2015 20:45:07 +0000] rev 27152
help: make help deprecated mention the extension before this, you got an empty list of extensions, which was unhelpful
Mon, 30 Nov 2015 20:44:22 +0000 help: make listexts less confusing for deprecated exts
timeless <timeless@mozdev.org> [Mon, 30 Nov 2015 20:44:22 +0000] rev 27151
help: make listexts less confusing for deprecated exts Return an empty array instead of a heading and no items
Sun, 29 Nov 2015 06:51:23 +0000 patchbomb: rename email function
timeless <timeless@mozdev.org> [Sun, 29 Nov 2015 06:51:23 +0000] rev 27150
patchbomb: rename email function I see no reason for the function not to be email ...
Sun, 29 Nov 2015 06:51:23 +0000 graphlog: rename glog function
timeless <timeless@mozdev.org> [Sun, 29 Nov 2015 06:51:23 +0000] rev 27149
graphlog: rename glog function I see no reason for the function not to be glog ...
Sat, 28 Nov 2015 04:11:57 -0500 commit: preserve extra when amending with commit --amend
Mike Edgar <adgar@google.com> [Sat, 28 Nov 2015 04:11:57 -0500] rev 27148
commit: preserve extra when amending with commit --amend The new extra propagation needs to be accounted for in cmdutil.amend, when checking for a no-changes fast-path.
Sat, 28 Nov 2015 04:11:38 -0500 graft: copy extra (except branch) when copying changesets
Mike Edgar <adgar@google.com> [Sat, 28 Nov 2015 04:11:38 -0500] rev 27147
graft: copy extra (except branch) when copying changesets
Sat, 28 Nov 2015 04:11:14 -0500 rebase: propagate extra dict from rebase source changeset
Mike Edgar <adgar@google.com> [Sat, 28 Nov 2015 04:11:14 -0500] rev 27146
rebase: propagate extra dict from rebase source changeset This corrects extra propagation for the rebase command and the shelve command.
Wed, 25 Nov 2015 18:26:48 +0100 histedit: add examples
Mathias De Maré <mathias.demare@gmail.com> [Wed, 25 Nov 2015 18:26:48 +0100] rev 27145
histedit: add examples
Wed, 25 Nov 2015 18:10:59 +0100 commands: add examples for 'addremove'
Mathias De Maré <mathias.demare@gmail.com> [Wed, 25 Nov 2015 18:10:59 +0100] rev 27144
commands: add examples for 'addremove'
Wed, 25 Nov 2015 18:10:31 +0100 commands: add example for 'hg add'
Mathias De Maré <mathias.demare@gmail.com> [Wed, 25 Nov 2015 18:10:31 +0100] rev 27143
commands: add example for 'hg add'
Tue, 24 Nov 2015 15:16:25 -0800 extensions: refuse to load extensions if minimum hg version not met
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 24 Nov 2015 15:16:25 -0800] rev 27142
extensions: refuse to load extensions if minimum hg version not met As the author of several 3rd party extensions, I frequently see bug reports from users attempting to run my extension with an old version of Mercurial that I no longer support in my extension. Oftentimes, the extension will import just fine. But as soon as we run extsetup(), reposetup(), or get into the guts of a wrapped function, we encounter an exception and abort. Today, Mercurial will print a message about extensions that don't have a "testedwith" declaring explicit compatibility with the current version. The existing mechanism is a good start. But it isn't as robust as I would like. Specifically, Mercurial assumes compatibility by default. This means extension authors must perform compatibility checking in their extsetup() or we wait and see if we encounter an abort at runtime. And, compatibility checking can involve a lot of code and lots of error checking. It's a lot of effort for extension authors. Oftentimes, extension authors know which versions of Mercurial there extension works on and more importantly where it is broken. This patch introduces a magic "minimumhgversion" attribute in extensions. When found, the extension loading mechanism will compare the declared version against the current Mercurial version. If the extension explicitly states we require a newer Mercurial version, a warning is printed and the extension isn't loaded beyond importing the Python module. This causes a graceful failure while alerting the user of the compatibility issue. I would be receptive to the idea of making the failure more fatal. However, care would need to be taken to not criple every hg command. e.g. the user may use `hg config` to fix the hgrc and if we aborted trying to run that, the user would effectively be locked out of `hg`! A potential future improvement to this functionality would be to catch ImportError for the extension/module and parse the source code for "minimumhgversion = 'XXX'" and do similar checking. This way we could give more information about why the extension failed to load.
Wed, 25 Nov 2015 00:39:05 +0000 run-tests: add --slowtimeout and use it for slow tests
timeless <timeless@mozdev.org> [Wed, 25 Nov 2015 00:39:05 +0000] rev 27141
run-tests: add --slowtimeout and use it for slow tests
Sat, 31 Oct 2015 22:17:05 +0900 serve: unify cmdutil.service() calls of commandserver and hgweb
Yuya Nishihara <yuya@tcha.org> [Sat, 31 Oct 2015 22:17:05 +0900] rev 27140
serve: unify cmdutil.service() calls of commandserver and hgweb
Sat, 31 Oct 2015 22:15:16 +0900 hgweb: extract factory function of httpservice object
Yuya Nishihara <yuya@tcha.org> [Sat, 31 Oct 2015 22:15:16 +0900] rev 27139
hgweb: extract factory function of httpservice object The next patch will merge the cmdutil.service() calls of both commandserver and hgweb. Before doing it, this patch wipes out the code specific to hgweb from commands.serve().
Sat, 31 Oct 2015 21:57:45 +0900 hgweb: move httpservice object from commands module
Yuya Nishihara <yuya@tcha.org> [Sat, 31 Oct 2015 21:57:45 +0900] rev 27138
hgweb: move httpservice object from commands module This avoids the deep import of hgweb.server at the commands module.
Wed, 25 Nov 2015 14:25:33 -0800 merge: move almost all change/delete conflicts to resolve phase (BC) (API)
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Nov 2015 14:25:33 -0800] rev 27137
merge: move almost all change/delete conflicts to resolve phase (BC) (API) We have finally laid all the groundwork to make this happen. The only change/delete conflicts that haven't been moved are .hgsubstate conflicts. Those are trickier to deal with and well outside the scope of this series. We add comprehensive testing not just for the initial selections but also for re-resolves and all possible dirstate transitions caused by merge tools. That testing managed to shake out several bugs in the way we were handling dirstate transitions. The other test changes are because we now treat change/delete conflicts as proper merges, and increment the 'merged' counter rather than the 'updated' counter. I believe this is the right approach here. For third-party extensions, if they're interacting with filemerge code they might have to deal with an absentfilectx rather than a regular filectx. Still to come: - add a 'leave unresolved' option to merges - change the default for non-interactive change/delete conflicts to be 'leave unresolved' - add debug output to go alongside debug outputs for binary and symlink file merges
Wed, 25 Nov 2015 14:26:46 -0800 test-merge-changedelete.t: print out debugmergestate
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Nov 2015 14:26:46 -0800] rev 27136
test-merge-changedelete.t: print out debugmergestate We're going to use this to verify the merge state in upcoming patches.
Tue, 24 Nov 2015 18:26:21 -0800 debugmergestate: also recognize change/delete conflicts in the merge state
Siddharth Agarwal <sid0@fb.com> [Tue, 24 Nov 2015 18:26:21 -0800] rev 27135
debugmergestate: also recognize change/delete conflicts in the merge state We're going to use this for tests in upcoming patches.
Mon, 30 Nov 2015 10:26:37 -0800 debugmergestate: print out null nodes as 'null'
Siddharth Agarwal <sid0@fb.com> [Mon, 30 Nov 2015 10:26:37 -0800] rev 27134
debugmergestate: print out null nodes as 'null' This is so much easier to read than a long string of zeroes, and we're going to have a lot more of these nodes once change/delete conflicts are part of the merge state.
(0) -10000 -3000 -1000 -300 -100 -56 +56 +100 +300 +1000 +3000 +10000 tip