Sat, 08 Nov 2014 00:48:41 +0900 largefiles: move "copyalltostore" invocation into "markcommitted"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 08 Nov 2014 00:48:41 +0900] rev 23276
largefiles: move "copyalltostore" invocation into "markcommitted" Before this patch, while "hg convert", largefiles avoids copying largefiles in the working directory into the store area by combination of setting "repo._isconverting" in "mercurialsink{before|after}" and checking it in "copytostoreabsolute". This avoiding is needed while "hg convert", because converting doesn't update largefiles in the working directory. But this implementation is not efficient, because: - invocation in "markcommitted" can easily ensure updating largefiles in the working directory "markcommitted" is invoked only when new revision is committed via "commit" of "localrepository" (= with files in the working directory). On the other hand, "commitctx" may be invoked directly for in-memory committing. - committing without updating the working directory (e.g. "import --bypass") also needs this kind of avoiding For efficiency of this kind of avoiding, this patch does: - move "copyalltostore" invocation into "markcommitted" - remove meaningless procedures below: - hooking "mercurialsink{before|after}" to (un)set "repo._isconverting" - checking "repo._isconverting" in "copytostoreabsolute" This patch invokes "copyalltostore" also in "_commitcontext", because "_commitcontext" expects that largefiles in the working directory are copied into store area after "commitctx". In this case, the working directory is used as a kind of temporary area to write largefiles out, even though converted revisions are committed via "commitctx" (without updating normal files).
Sat, 08 Nov 2014 00:48:41 +0900 largefiles: avoid printing messages while transplanting by "_lfstatuswriters"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 08 Nov 2014 00:48:41 +0900] rev 23275
largefiles: avoid printing messages while transplanting by "_lfstatuswriters" Putting "lambda *msg, **opts: None" (= avoid printing messages always) into "_lfstatuswriters" while transplanting makes explicit passing "printmessage = False" for "updatelfiles()" useless. This patch also removes setting/unsetting "repo._istransplanting" in "overridetransplant", because there is no code path referring it.
Sat, 08 Nov 2014 00:48:41 +0900 largefiles: update standins only at the 1st commit of "transplant --continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 08 Nov 2014 00:48:41 +0900] rev 23274
largefiles: update standins only at the 1st commit of "transplant --continue" Before this patch, "hg transplant --continue" may record incorrect standins, because largefiles extension always avoid updating standins while transplanting, even though largefiles in the working directory may be modified manually at the 1st commit of "hg transplant --continue". But, on the other hand, updating standins should be avoided at subsequent commits for efficiency reason. To update standins only at the 1st commit of "hg transplant --continue", this patch uses "automatedcommithook", which updates standins by "lfutil.updatestandinsbymatch()" only at the 1st commit of resuming. Even after this patch, "repo._istransplanting = True" is still needed to avoid some status report while updating largefiles in "lfcommands.updatelfiles()". This is reason why this patch omits not "repo._istransplanting = True" in "overriderebase" but examination of "getattr(repo, "_istransplanting", False)" in "updatestandinsbymatch".
Sat, 08 Nov 2014 00:48:38 +0900 largefiles: avoid redundant "updatelfiles" invocation in "overridetransplant"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 08 Nov 2014 00:48:38 +0900] rev 23273
largefiles: avoid redundant "updatelfiles" invocation in "overridetransplant" At "hg transplant --merge REV", largefiles newly coming from the 2nd parent (= REV) are marked as "a"(dded) by "patch.patch()", and have to be marked as "n"(ormal) after commit. But until changeset 3100d1cbce32, such largefiles were still marked as "a" unexpectedly even after commit, because no additional entry is added to filelog of such largefiles and they aren't listed in "repo[newnode].files()" in this case: "newnode" is one of newly committed changeset (= result of "repo.commit()"). "updatelfiles" invocation in "overridetransplant" shadows this problem by forcibly synchronizing lfdirstate to dirstate. Now, "updatelfiles" invocation in "overridetransplant" is redundant, because changeset 3100d1cbce32 made "markcommitted" use "ctx.files()" to get targets of "synclfdirstate" instead of "repo[newnode].files()".
Wed, 12 Nov 2014 15:18:30 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 12 Nov 2014 15:18:30 -0600] rev 23272
merge with stable
Sat, 08 Nov 2014 13:14:19 +0900 util.system: remove unused handling of onerr=ui
Yuya Nishihara <yuya@tcha.org> [Sat, 08 Nov 2014 13:14:19 +0900] rev 23271
util.system: remove unused handling of onerr=ui In our code, onerr is None or util.Abort. It smells bad to overload ui and exception class.
Sat, 08 Nov 2014 13:06:22 +0900 util.system: use ui.system() in place of optional ui.fout parameter
Yuya Nishihara <yuya@tcha.org> [Sat, 08 Nov 2014 13:06:22 +0900] rev 23270
util.system: use ui.system() in place of optional ui.fout parameter
Sat, 08 Nov 2014 12:57:42 +0900 ui: introduce util.system() wrapper to make sure ui.fout is used
Yuya Nishihara <yuya@tcha.org> [Sat, 08 Nov 2014 12:57:42 +0900] rev 23269
ui: introduce util.system() wrapper to make sure ui.fout is used This change is intended to avoid future problem of data corruption under command server. out=ui.fout is mandatory as long as command server uses stdout as IPC channel.
Wed, 12 Nov 2014 22:21:51 +0900 hook: remove redundant code to redirect http hook output to client stream
Yuya Nishihara <yuya@tcha.org> [Wed, 12 Nov 2014 22:21:51 +0900] rev 23268
hook: remove redundant code to redirect http hook output to client stream out=ui and out=ui.fout should be the same here. ui.fout was introduced at afccc64eea73, which was not available when out=ui was added at c37f35d7f2f5.
Wed, 12 Nov 2014 21:53:44 +0900 hgk: forward command output to ui.fout consistently
Yuya Nishihara <yuya@tcha.org> [Wed, 12 Nov 2014 21:53:44 +0900] rev 23267
hgk: forward command output to ui.fout consistently Nobody would want to run hgk in command server, but it should work in principle. This fixes possible data corruption of command-server channel.
Tue, 11 Nov 2014 18:43:19 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 11 Nov 2014 18:43:19 -0600] rev 23266
merge with stable
Tue, 11 Nov 2014 17:25:09 -0600 Added signature for changeset 643c58303fb0 stable
Matt Mackall <mpm@selenic.com> [Tue, 11 Nov 2014 17:25:09 -0600] rev 23265
Added signature for changeset 643c58303fb0
Tue, 11 Nov 2014 17:24:47 -0600 Added tag 3.2.1 for changeset 643c58303fb0 stable
Matt Mackall <mpm@selenic.com> [Tue, 11 Nov 2014 17:24:47 -0600] rev 23264
Added tag 3.2.1 for changeset 643c58303fb0
Mon, 10 Nov 2014 13:20:56 -0500 run-tests: use a try/except ladder instead of looking for a specific version
Augie Fackler <raf@durin42.com> [Mon, 10 Nov 2014 13:20:56 -0500] rev 23263
run-tests: use a try/except ladder instead of looking for a specific version This ensures we get json instead of simplejson in as many places as possible.
Mon, 10 Nov 2014 13:27:25 -0500 hghave: use a less brittle have-json check
Augie Fackler <raf@durin42.com> [Mon, 10 Nov 2014 13:27:25 -0500] rev 23262
hghave: use a less brittle have-json check
Wed, 15 Oct 2014 12:39:19 -0700 sortdict: add insert method
Sean Farley <sean.michael.farley@gmail.com> [Wed, 15 Oct 2014 12:39:19 -0700] rev 23261
sortdict: add insert method Future patches will allow extensions to choose which order a namespace should output in the log, so we add a way for sortdict to insert to a specific location.
Sun, 09 Nov 2014 13:15:28 -0800 sortdict: add iteritems method
Sean Farley <sean.michael.farley@gmail.com> [Sun, 09 Nov 2014 13:15:28 -0800] rev 23260
sortdict: add iteritems method Future patches will start using sortdict for log operations where order is important. Adding iteritems removes the headache of having to remember to use items() if the object is a sortdict.
Sat, 08 Nov 2014 23:13:39 -0800 addremove: add back forgotten files (BC)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 08 Nov 2014 23:13:39 -0800] rev 23259
addremove: add back forgotten files (BC) After running "hg forget README && hg addremove", README will still be reported as removed, while "hg forget README && hg add README" adds it back so it gets reported as clean. It seems like they should behave the same. Furthermore, it seems like no files should remain untracked after 'hg addremove && hg commit' (or 'hg commit -A'). For these reasons, change the behavior of addremove so it does add forgotten files back. The problem is with scmutil._interestingfiles(), which reports the file as removed, so scmutil.addremove() does not add it. Fix by teaching _interestingfiles() to report forgotten files separately from removed files and make addremove() add forgotten files back. However, do not treat forgotten files as sources for rename detection. Note that since removed and forgotten files are treated the same before this change, forgotten files were considered sources for rename detection. Also update the other caller, marktouched(), in the same way as addremove().
Mon, 10 Nov 2014 14:51:18 -0800 add: add back forgotten files even when not matching exactly (BC)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 10 Nov 2014 14:51:18 -0800] rev 23258
add: add back forgotten files even when not matching exactly (BC) I accidentally did 'hg forget .' and tried to undo the operation with 'hg add .'. I expected the files to be reported as either modified or clean, but they were still reported as removed. It turns out that forgotten files are only added back if they are listed explicitly, as shown by the following two invocations. This makes it hard to recover from the mistake of forgetting a lot of files. $ hg forget README && hg add README && hg status -A README C README $ hg forget README && hg add . && hg status -A README R README The problem lies in cmdutil.add(). That method checks that the file isn't already tracked before adding it, but it does so by checking the dirstate, which does have an entry for forgotten files (state 'r'). We should instead be checking whether the file exists in the workingctx. The workingctx is also what we later call add() on, and that method takes care of transforming the add() into a normallookup() on the dirstate. Since we're changing repo.dirstate into wctx, let's also change repo.walk into wctx.walk for consistency (repo.walk calls wctx.walk, so we're simply inlining the call).
Tue, 11 Nov 2014 10:16:54 -0800 context.status: explain "caching reasons" more fully
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Nov 2014 10:16:54 -0800] rev 23257
context.status: explain "caching reasons" more fully Where we "load earliest manifest first for caching reasons", elaborate on what "caching reasons" refers to. Text provided by Matt in http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/73235/focus=73578.
Tue, 11 Nov 2014 10:35:06 -0500 localrepo: rename revlog.maxchainlen to format.maxchainlen
Augie Fackler <raf@durin42.com> [Tue, 11 Nov 2014 10:35:06 -0500] rev 23256
localrepo: rename revlog.maxchainlen to format.maxchainlen This is more consistent with other option names, as spotted by Pierre-Yves. Thanks!
Thu, 06 Nov 2014 14:20:05 -0800 revlog: add config variable for limiting delta-chain length
Mateusz Kwapich <mitrandir@fb.com> [Thu, 06 Nov 2014 14:20:05 -0800] rev 23255
revlog: add config variable for limiting delta-chain length The current heuristic for deciding between storing delta and full texts is based on ratio of (sizeofdeltas)/(sizeoffulltext). In some cases (for example a manifest for ahuge repo) this approach can result in extremely long delta chains (~30,000) which are very slow to read. (In the case of a manifest ~500ms are added to every hg command because of that). This commit introduces "revlog.maxchainlength" configuration variable that will limit delta chain length.
Thu, 06 Nov 2014 14:08:25 -0800 debugrevlog: fix computing chain length in debugrevlog -d
Mateusz Kwapich <mitrandir@fb.com> [Thu, 06 Nov 2014 14:08:25 -0800] rev 23254
debugrevlog: fix computing chain length in debugrevlog -d The chain length was computed correctly only when generaldelta feature was enabled. Now it's fixed. When generaldelta is disabled the base revision in revlog index is not the revision we have delta against - it's always previous revision. Instead of incorrect chainbaseandlen in command.py we are now using two single-responsibility functions in revlog.py: - chainbase(rev) - chainlen(rev) Only chainlen(rev) was missing so it was written to mimic the way the chain of deltas is actually found during file reconstruction.
Wed, 05 Nov 2014 10:13:01 +0000 transaction: factorise append-only file registration
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 10:13:01 +0000] rev 23253
transaction: factorise append-only file registration The addition is done in two different places but differs slightly. We factorise this addition to ensure it is consistent in all places.
Wed, 05 Nov 2014 13:00:48 +0000 transaction: document `tr.add`
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 13:00:48 +0000] rev 23252
transaction: document `tr.add`
Wed, 05 Nov 2014 10:05:38 +0000 transaction: drop backupentries logic from startgroup and endgroup
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 10:05:38 +0000] rev 23251
transaction: drop backupentries logic from startgroup and endgroup The `startgroup` and `endgroup` methods are used in a very specific context to wrap a very specific operation (revlog truncation). It does not make sense to perform any other operations during such a "group" (eg:file backup). There is currently no user of backupfile during a "group" so we drop the group-specific code and restrict authorized operations during "group".
Wed, 05 Nov 2014 10:00:15 +0000 transaction: document startgroup and endgroup
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 10:00:15 +0000] rev 23250
transaction: document startgroup and endgroup These enigmatic methods are only used in repair. We document them to clarify there purpose and user.
Wed, 05 Nov 2014 09:31:57 +0000 transaction: mark backup-related attributes private
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 09:31:57 +0000] rev 23249
transaction: mark backup-related attributes private As the transaction is gaining more functions and attributes, it is important to clarify what is part of the public API.
Wed, 05 Nov 2014 01:30:29 +0000 transaction: document the contents of `tr.backupentries`
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 01:30:29 +0000] rev 23248
transaction: document the contents of `tr.backupentries` Now that all items are known we can document it.
Wed, 05 Nov 2014 01:33:16 +0000 transaction: drop the third item in `tr.backupentries`
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 01:33:16 +0000] rev 23247
transaction: drop the third item in `tr.backupentries` This third item is always None and never used.
Mon, 10 Nov 2014 10:44:42 -0800 rebase: fix rebase with no common ancestors (issue4446) stable 3.2.1
Durham Goode <durham@fb.com> [Mon, 10 Nov 2014 10:44:42 -0800] rev 23246
rebase: fix rebase with no common ancestors (issue4446) The new rebase revset didn't check for the case when there are no common ancestors. Now it does. The new behavior should be the same as the pre-3.2 behavior. Added a test.
Thu, 06 Nov 2014 10:57:13 -0500 test-run-tests: accept more levels of precision and trailing ws (issue4440) stable
Augie Fackler <raf@durin42.com> [Thu, 06 Nov 2014 10:57:13 -0500] rev 23245
test-run-tests: accept more levels of precision and trailing ws (issue4440) simplejson produces slightly different output from the built-in json module, specifically: * It uses 0.000 instead of 0.0000 * It likes to put a trailing space after a comma This change works around both of those variations.
Mon, 10 Nov 2014 17:29:15 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 10 Nov 2014 17:29:15 -0600] rev 23244
merge with stable
Fri, 07 Nov 2014 17:54:59 -0800 changegroup.cg2packer: lookup 'group' via inheritance chain
Siddharth Agarwal <sid0@fb.com> [Fri, 07 Nov 2014 17:54:59 -0800] rev 23243
changegroup.cg2packer: lookup 'group' via inheritance chain This lets extensions insert themselves in the class hierarchy.
Thu, 23 Oct 2014 17:00:38 -0700 context.status: only filter suspect symlinks in the dirstate status
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Oct 2014 17:00:38 -0700] rev 23242
context.status: only filter suspect symlinks in the dirstate status We don't care about filtering out symlinks that have already been committed with full content, only those that have been accidentally resolved in the working directory.
Thu, 23 Oct 2014 16:19:56 -0700 context.status: inline _poststatus()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Oct 2014 16:19:56 -0700] rev 23241
context.status: inline _poststatus() By inlining _poststatus() into _buildstatus(), it becomes clearer that it is only called for the workingctx.
Sun, 12 Oct 2014 00:06:40 -0700 context.status: remove now-empty _prestatus()
Martin von Zweigbergk <martinvonz@gmail.com> [Sun, 12 Oct 2014 00:06:40 -0700] rev 23240
context.status: remove now-empty _prestatus()
Sat, 11 Oct 2014 23:30:08 -0700 context.status: call _dirstatestatus() from within _buildstatus()
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 11 Oct 2014 23:30:08 -0700] rev 23239
context.status: call _dirstatestatus() from within _buildstatus() By making the call to _dirstatestatus() within _buildstatus(), it becomes clearer that it's called only for the workingctx.
Sun, 12 Oct 2014 00:00:13 -0700 context.status: move manifest caching trick to _buildstatus()
Martin von Zweigbergk <martinvonz@gmail.com> [Sun, 12 Oct 2014 00:00:13 -0700] rev 23238
context.status: move manifest caching trick to _buildstatus() In basectx._buildstatus(), we read the manifests for the two revisions being compared. For "caching reasons" unknown to me, it is better to read the earlier manifest first, which basectx._prestatus() takes care of. However, if the 'self' context is a committablectx and the 'other' context is the parent of the working directory (as in the very common case of plain "hg status"), there is no need to read any manifests at all -- all that's needed is the dirstate status. To avoid reading the manifests, _prestatus() is overridden in committablectx and avoids calling its super method, and _buildstatus() calls its super method only if the 'other' context is not the parent of the working directory. It seems easier to follow what's happening if we move the pre-fetching to _buildstatus() just before the place where the manifests are fetched. We just need to add an extra check that the revision is not None to handle the case that was previously handled by subclass overriding. That also makes it safe for committablectx._prestatus() to call its parent, although the latter now becomes empty, so we won't bother.
Sat, 11 Oct 2014 23:18:53 -0700 context.status: remove unused arguments from _matchstatus()
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 11 Oct 2014 23:18:53 -0700] rev 23237
context.status: remove unused arguments from _matchstatus()
Thu, 23 Oct 2014 13:43:20 -0700 context.status: remove overriding in workingctx
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Oct 2014 13:43:20 -0700] rev 23236
context.status: remove overriding in workingctx The workingctx method simply calls the super method. The only effect it has is that it uses a different default argument for the 'other' argument. The only in-tree caller is patch.diff, which always passes an argument to the method, so it should be safe to remove the overriding. Having the default argument depend on the type seems rather dangerous anyway.
Mon, 20 Oct 2014 14:20:43 -0400 synthrepo: when adding files, ensure new path is not a directory
Mike Edgar <adgar@google.com> [Mon, 20 Oct 2014 14:20:43 -0400] rev 23235
synthrepo: when adding files, ensure new path is not a directory
Mon, 20 Oct 2014 13:59:13 -0400 synthrepo: synthesized dates must be positive, fit in 32-bit signed ints
Mike Edgar <adgar@google.com> [Mon, 20 Oct 2014 13:59:13 -0400] rev 23234
synthrepo: synthesized dates must be positive, fit in 32-bit signed ints
Thu, 06 Nov 2014 01:48:29 +0100 discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650
Mads Kiilerich <madski@unity3d.com> [Thu, 06 Nov 2014 01:48:29 +0100] rev 23233
discovery: test coverage for issue4438 / 86c35b7ae300 / 73cfaa348650 The randomness in the discovery protocol made this problem hard to reproduce. The test mocks random.sample to make sure we hit the problem every time. The set iteration order also made the output unstable ... but with the issue fixed, it is stable.
Wed, 05 Nov 2014 21:33:45 -0500 hgweb: fix a crash when using web.archivesubrepos stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Nov 2014 21:33:45 -0500] rev 23232
hgweb: fix a crash when using web.archivesubrepos A matcher is required when enabling the subrepo option on archival.archive(), because that calls match.narrowmatcher(), which accesses fields on the object. It's therefore probably a bad idea to default the matcher to None on archive(), but that's a fix for default.
Wed, 05 Nov 2014 20:31:58 -0500 tests: introduce a subrepository to test-archive.t stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Nov 2014 20:31:58 -0500] rev 23231
tests: introduce a subrepository to test-archive.t This will be used in an upcoming patch to add coverage for web.archivesubrepos.
Tue, 04 Nov 2014 21:45:26 -0800 test-status-rev: add tests for plain dirstate and inter-revision status
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 21:45:26 -0800] rev 23230
test-status-rev: add tests for plain dirstate and inter-revision status We have tests for the status across from '.^' to the working copy. It makes sense to have the similar tests for the inter-revision status between '.^' and '.' and for the dirstate status in the same place.
Tue, 04 Nov 2014 21:22:46 -0800 test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 21:22:46 -0800] rev 23229
test-status-rev: remove unnecessary initial commit The initial commit was there when we had a group of tests that compared against an empty base, but since those tests no longer exist, we can drop the empty commit.
Tue, 04 Nov 2014 16:10:20 -0800 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 16:10:20 -0800] rev 23228
test-status-rev: use one glob for each expected status It's getting a little hard to read the ~30 calls to 'hg status' with one per file. Instead, let's use one glob for each expected status. For example, modified files can be listed with 'glob:content1_*_content[23]-tracked'. That also nicely becomes an explanation for why each status is expected.
Tue, 04 Nov 2014 15:36:35 -0800 test-status-rev: remove duplicate tests
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 15:36:35 -0800] rev 23227
test-status-rev: remove duplicate tests The second group of tests in test-status-rev compare to an empty revision. The first group of tests that compare to the first commit should be testing all the same states with the missing_* files, so drop the second group of tests.
Thu, 06 Nov 2014 22:48:20 -0800 changegroup: sparsely populate fnodes stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 22:48:20 -0800] rev 23226
changegroup: sparsely populate fnodes Previously, fnodes had a key and empty dict value for every element in changedfiles. This is somewhat wasteful. Empty dicts in CPython consume a lot more memory than you would expect - 280 bytes. On mozilla-central, which has ~190,000 files/fnodes keys, the previous loop populating fnodes allocated 91,924 KB of memory, most of that for the empty dicts. With this patch in place, our peak RSS during mozilla-central clone drops: before: 364,356 KB after: 326,008 KB delta: -38,348 KB When combined with the previous patch, total peak RSS decrease is now 190,116 KB.
Thu, 06 Nov 2014 22:33:48 -0800 changegroup: don't store unused value on fnodes (issue4443) stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 22:33:48 -0800] rev 23225
changegroup: don't store unused value on fnodes (issue4443) The contents of fnodes are only accessed once per key. It is wasteful to cache the value since nobody will use it. Before this patch, the caching of unused data in fnodes was effectively causing a memory leak during the file streaming part of bundle creation. On mozilla-central (which has ~190,000 entries in fnodes), this patch has a significant impact on RSS at the end of generate(): before: 516,124 KB after: 364,356 KB delta: -151,768 KB The origin of this code can be traced back to 627cd7842e5d and has been with us since the 2.7 release.
Thu, 06 Nov 2014 20:57:12 -0800 changegroup: don't define lookupmf() until it is needed stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 06 Nov 2014 20:57:12 -0800] rev 23224
changegroup: don't define lookupmf() until it is needed lookupmf() is currently defined earlier than when it is needed. Future patches further refactoring this code will be easier to read when lookupmf() is in its new home.
Wed, 05 Nov 2014 18:31:39 +0000 mail: actually use the verifycert config value stable
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 18:31:39 +0000] rev 23223
mail: actually use the verifycert config value The mail module only verifies the smtp ssl certificate if 'verifycert' is enabled (the default). The 'verifycert' can take three possible values: - 'strict' - 'loose' - any "False" value, eg: 'false' or '0' We tested the validity of the third value, but never converted it to actual falseness, making 'False' an equivalent for 'loose'. This changeset fixes it.
Tue, 28 Oct 2014 14:58:36 +0100 exchange: use the postclose API on transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 14:58:36 +0100] rev 23222
exchange: use the postclose API on transaction As with changegroup, we should wait for the transaction to be really closed before scheduling hook execution.
Tue, 28 Oct 2014 15:44:23 +0100 changegroup: use the 'postclose' API on transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 15:44:23 +0100] rev 23221
changegroup: use the 'postclose' API on transaction The post-transaction hooks run after the lock release (because hooks may want to touch the repository), but they must only run if the transaction is successfully closed. We use the new 'addpostclose' method on transaction to register a callback installing this post-lock-release call.
Tue, 28 Oct 2014 14:24:43 +0100 transaction: allow registering a post-close callback
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 28 Oct 2014 14:24:43 +0100] rev 23220
transaction: allow registering a post-close callback The addchangegroup code considers the transaction done after a 'tr.close()' call and schedules the hook's execution for after lock release. In the nested transaction case, the transaction is not yet committed and we must delay this scheduling. We add an 'addpostclose' method (like the 'addpending' and 'addfinalize' ones) that registers code to be run if the transaction is successfully committed.
Fri, 24 Oct 2014 15:58:46 -0400 exchange: swap "push" for "pull" in pulloperation docstring
Mike Edgar <adgar@google.com> [Fri, 24 Oct 2014 15:58:46 -0400] rev 23219
exchange: swap "push" for "pull" in pulloperation docstring
Wed, 29 Oct 2014 12:46:08 -0400 exchange: prepare kwargs for bundle2 part generation exactly once
Mike Edgar <adgar@google.com> [Wed, 29 Oct 2014 12:46:08 -0400] rev 23218
exchange: prepare kwargs for bundle2 part generation exactly once
Sat, 25 Oct 2014 00:40:51 -0400 exchange: fix indentation in _pullchangeset
Mike Edgar <adgar@google.com> [Sat, 25 Oct 2014 00:40:51 -0400] rev 23217
exchange: fix indentation in _pullchangeset
Fri, 24 Oct 2014 16:26:44 -0400 dagutil: fix id/ix typos in docstrings
Mike Edgar <adgar@google.com> [Fri, 24 Oct 2014 16:26:44 -0400] rev 23216
dagutil: fix id/ix typos in docstrings
Thu, 06 Nov 2014 11:55:37 +0000 patchbomb: extract 'getpatchmsgs' closure into its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 11:55:37 +0000] rev 23215
patchbomb: extract 'getpatchmsgs' closure into its own function Keep marching toward the promised land of simplification!
Thu, 06 Nov 2014 11:57:48 +0000 patchbomb: extract 'makeintro' closure into its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 11:57:48 +0000] rev 23214
patchbomb: extract 'makeintro' closure into its own function Keep marching toward the promised land of simplification!
Tue, 04 Nov 2014 21:48:23 +0000 patchbomb: extract 'getbundlemsgs' closure in its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:48:23 +0000] rev 23213
patchbomb: extract 'getbundlemsgs' closure in its own function Keep marching toward the promised land of simplification!
Tue, 04 Nov 2014 21:41:35 +0000 patchbomb: extract 'getdescription' closure in its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:41:35 +0000] rev 23212
patchbomb: extract 'getdescription' closure in its own function Keep marching toward the promised land of simplification!
Tue, 04 Nov 2014 21:33:57 +0000 patchbomb: extract 'getbundle' closure in its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:33:57 +0000] rev 23211
patchbomb: extract 'getbundle' closure in its own function Keep marching toward the promised land of simplification!
Tue, 04 Nov 2014 21:28:57 +0000 patchbomb: extract 'getpatches' closure in its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:28:57 +0000] rev 23210
patchbomb: extract 'getpatches' closure in its own function Keep marching toward the promised land of simplification!
Tue, 04 Nov 2014 21:22:59 +0000 patchbomb: extract 'getoutgoing' closure into its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 04 Nov 2014 21:22:59 +0000] rev 23209
patchbomb: extract 'getoutgoing' closure into its own function The patchbomb command is a gigantic 300 line function full of closures. As a first step to simplify it in smaller bits, I'm extracting the closures into full featured functions. The first victim is 'getoutgoing'. It gains a docstring in the process.
Thu, 06 Nov 2014 09:52:57 +0000 bundle2: handle empty 'b2x:changegroup' value in push and pull
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 09:52:57 +0000] rev 23208
bundle2: handle empty 'b2x:changegroup' value in push and pull Changeset e4dc2b0be056 added advertising of supported changegroup version through the new 'b2x:changegroup' capability. However, this capability is not new and has been around since 3.1 with an empty value. This makes new clients unable to push to 3.2 servers through bundle2 as they cannot find a common changegroup version to use from and empty list. Treating empty 'b2x:changegroup' value as old client fixes it.
Thu, 06 Nov 2014 10:05:43 +0000 bundle2: drop duplicated definition of 'b2x:exchange'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 06 Nov 2014 10:05:43 +0000] rev 23207
bundle2: drop duplicated definition of 'b2x:exchange' This bundle2 capability is going to be dynamically computed in 'getrepocaps'. We do not need to include it in the static value.
Thu, 06 Nov 2014 09:36:39 +0100 convert: use git diff-tree -Cn% instead of --find-copies=n% for older git stable
Thomas Arendsen Hein <thomas@intevation.de> [Thu, 06 Nov 2014 09:36:39 +0100] rev 23206
convert: use git diff-tree -Cn% instead of --find-copies=n% for older git The option --find-copies was added in a later git version than the one included in Debian squeeze-lts (1.7.2.5), probably around 1.7.4.
Sat, 18 Oct 2014 01:09:41 -0700 changelog: rely on transaction for finalization
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 18 Oct 2014 01:09:41 -0700] rev 23205
changelog: rely on transaction for finalization Instead of calling 'cl.finalize()' by hand (possibly at a bogus time) we register it in the transaction during 'delayupdate' and rely on 'tr.close()' to call it at the right time.
Fri, 17 Oct 2014 22:28:09 -0700 transaction: allow registering a finalization callback
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 22:28:09 -0700] rev 23204
transaction: allow registering a finalization callback The new 'addfinalize' method allows people to register a callback to be triggered when the transaction is closed. This aims to get rid of explicit calls to 'changelog.finalize'. This also obsoletes the 'onclose' function but removing it is not in the scope of this series.
Fri, 17 Oct 2014 21:55:31 -0700 changelog: handle writepending in the transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 21:55:31 -0700] rev 23203
changelog: handle writepending in the transaction The 'delayupdate' method now takes a transaction object and registers its '_writepending' method for execution in 'transaction.writepending()'. The hook can then use 'transaction.writepending()' directly. At some point this will allow the addition of other file creation during writepending.
Fri, 17 Oct 2014 21:19:54 -0700 transaction: add 'writepending' logic
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 21:19:54 -0700] rev 23202
transaction: add 'writepending' logic The contents of the transaction must be flushed to disk before running a hook. But it must be flushed to a special file so that the normal reader does not use it. This logic is currently in the changelog only. We add some facility to register such operations in the transaction itself.
Sat, 18 Oct 2014 01:12:18 -0700 changelog: rework the delayupdate mechanism
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 18 Oct 2014 01:12:18 -0700] rev 23201
changelog: rework the delayupdate mechanism The current way we use the 'delayupdate' mechanism is wrong. We call 'delayupdate' right after the transaction retrieval, then we call 'finalize' right before calling 'tr.close()'. The 'finalize' call will -always- result in a flush to disk, making the data available to all readers. But the 'tr.close()' may be a no-op if the transaction is nested. This would result in data: 1) exposed to reader too early, 2) rolled back by other part of the transaction after such exposure So we need to end up in a situation where we call 'finalize' a single time when the transaction actually closes. For this purpose we need to be able to call 'delayupdate' and '_writepending' multiple times and 'finalize' once. This was not possible with the previous state of the code. This changeset refactors the code to makes this possible. We buffer data in memory as much as possible and fall-back to writing to a ".a" file after the first call to '_writepending'.
Wed, 05 Nov 2014 12:41:12 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 05 Nov 2014 12:41:12 -0600] rev 23200
merge with stable
Wed, 05 Nov 2014 17:25:00 +0000 bookmarks: fix formatting of exchange message (issue4439) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 17:25:00 +0000] rev 23199
bookmarks: fix formatting of exchange message (issue4439) The message formatting was crashing when doing explicit pulling `hg pull -B X`. This changeset fix it and improved the test coverage.
Tue, 04 Nov 2014 12:26:06 -0800 test-status-rev: document one more broken test
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 12:26:06 -0800] rev 23198
test-status-rev: document one more broken test The status for missing_content2_content2-untracked doesn't get reported at all. Since the file does exist in the working copy, it should reported as unknown. Document that in the test.
Tue, 04 Nov 2014 16:09:52 -0800 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Nov 2014 16:09:52 -0800] rev 23197
test-status-rev: use common script for generating file history Start using the generate-working-copy-states.py script that's shared with test-revert.t, instead of creating the states manually in the test. This adds several states that are currently missing. We will start checking those states later.
Mon, 20 Oct 2014 23:56:55 -0700 test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com> [Mon, 20 Oct 2014 23:56:55 -0700] rev 23196
test-status-rev: use same names as from generate-working-copy-states To prepare for using generate-working-copy-states.py for generating the files and their content, let's start by renaming the files according to the naming scheme used by that script.
Mon, 03 Nov 2014 16:27:01 -0800 test-revert: move embedded script to its own file
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Nov 2014 16:27:01 -0800] rev 23195
test-revert: move embedded script to its own file Move the gen-revert-cases.py out of test-revert.t into its own file so we can reuse it from other tests (specifically test-status-rev.t).
Sat, 18 Oct 2014 22:00:08 -0700 test-revert: simplify generation of files
Martin von Zweigbergk <martinvonz@google.com> [Sat, 18 Oct 2014 22:00:08 -0700] rev 23194
test-revert: simplify generation of files With the recent change in naming of the generated files, it becomes much easier to generate the files by iterating over all the possible states than over the state transitions.
Wed, 05 Nov 2014 11:16:31 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 05 Nov 2014 11:16:31 -0600] rev 23193
merge with stable
Wed, 05 Nov 2014 13:05:32 +0100 discovery: indices between sample and yesno must match (issue4438) stable
Mads Kiilerich <madski@unity3d.com> [Wed, 05 Nov 2014 13:05:32 +0100] rev 23192
discovery: indices between sample and yesno must match (issue4438) 3ef893520a85 changed 'sample' from a list to a set. The iteration order is thus undefined and the yesno indices are not stable. To solve this, repeat the listification and comment from elsewhere in the code. Note: the randomness in the discovery protocol can make this problem hard to reproduce.
Wed, 05 Nov 2014 13:05:29 +0100 discovery: limit 'all local heads known remotely' to real 'all' (issue4438) stable
Mads Kiilerich <madski@unity3d.com> [Wed, 05 Nov 2014 13:05:29 +0100] rev 23191
discovery: limit 'all local heads known remotely' to real 'all' (issue4438) 3ef893520a85 made it possible that the initial head check didn't include all heads. If that is the case, don't use the early exit just because this random sample happened to be 'all known'. Note: the randomness in the discovery protocol can make this problem hard to reproduce.
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: avoid printing messages while rebasing by "_lfstatuswriters"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23190
largefiles: avoid printing messages while rebasing by "_lfstatuswriters" Putting "lambda *msg, **opts: None" (= avoid printing messages always) into "_lfstatuswriters" while rebasing makes explicit passing "printmessage = False" for "updatelfiles()" useless. This patch also removes setting/unsetting "repo._isrebasing" in "overriderebase", because there is no code path referring it.
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: get function to write status messages via "getstatuswriter()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23189
largefiles: get function to write status messages via "getstatuswriter()" This patch makes "updatelfiles()" get appropriate function to write largefiles specific status messages via "getstatuswriter()". This patch introduces None as "print messages if needed", because True (forcibly writing) and False (forcibly ignoring) are already used for "printmessage" of "updatelfiles". Subsequent patch will move "avoid printing messages only while automated committing" decision from caller of "updatelfiles()" into "getstatuswriter()".
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: introduce "_lfstatuswriters" to customize status reporting
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23188
largefiles: introduce "_lfstatuswriters" to customize status reporting "lfutil.getstatuswriter" is the utility to get appropriate function to write largefiles specific status out from "repo._lfstatuswriters". This patch uses "stack" with an element instead of flag like "_isXXXXing" or so, because: - the former works correctly even when customizations are nested, and - ensuring at least one element can ignore empty check
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: update standins only at the 1st commit of "hg rebase --continue"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23187
largefiles: update standins only at the 1st commit of "hg rebase --continue" Before this patch, "hg rebase --continue" may record incorrect standins, because largefiles extension always avoid updating standins while rebasing, even though largefiles in the working directory may be modified manually at the 1st commit of "hg rebase --continue". But, on the other hand, updating standins should be avoided at subsequent commits for efficiency reason. To update standins only at the 1st commit of "hg rebase --continue", this patch introduces state-full callable object "automatedcommithook", which updates standins by "lfutil.updatestandinsbymatch()" only at the 1st commit of resuming. Even after this patch, "repo._isrebasing = True" is still needed to avoid some status report while updating largefiles in "lfcommands.updatelfiles()". This is reason why this patch omits not "repo._isrebasing = True" in "overriderebase" but examination of "getattr(repo, "_isrebasing", False)" in "updatestandinsbymatch".
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: introduce "_lfcommithooks" to abstract pre-committing procedures
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23186
largefiles: introduce "_lfcommithooks" to abstract pre-committing procedures This changes allows to customize pre-committing procedures according to conditions. This patch uses "stack" with an element instead of flag like "_isXXXXing" or so, because: - the former works correctly even when customizations are nested, and - ensuring at least one element can ignore empty check
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: factor out procedures to update standins for pre-committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23185
largefiles: factor out procedures to update standins for pre-committing This patch factors out procedures to update standins for pre-committing. This is one of preparations to avoid execution of such procedures according to invocation context. For example, resuming automated committing (e.g. "hg rebase --continue") should update standins at the 1st commit, because largefiles in the working directory may be modified manually. But on the other hand, it should avoid updating standins at subsequent committings for efficiency reason. For simplicity, this patch just moves procedures mechanically only with replacing below. - "self" => "repo" - "lfutil." => (none) - "orig" invocation => returning "match" Using "fstandin" instead "standin" as the name of local variable for the loop below is the only special care, because the latter shadows the same name function in "lfutil.py". [before] for standin in standins: lfile = lfutil.splitstandin(standin) if lfdirstate[lfile] != 'r': lfutil.updatestandin(self, standin) [after] for fstandin in standins: lfile = splitstandin(fstandin) if lfdirstate[lfile] != 'r': updatestandin(repo, fstandin)
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: factor out procedures to update lfdirstate for post-committing
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23184
largefiles: factor out procedures to update lfdirstate for post-committing Before this patch, procedures to update lfdirstate for post-committing are scattered in "lfilesrepo.commit". In the case of "hg commit" with patterns for target files ("Case 2"), lfdirstate is updated BEFORE real committing. This patch factors out procedures to update lfdirstate for post-committing into "lfutil.markcommitted", and makes it callable via "markcommitted" of the context passed to "lfilesrepo.commitctx". "markcommitted" of the context is called, only when it is committed successfully. Passing original "markcommitted" of the context is meaningless in this patch, but required in subsequent one to prepare something before invocation of it.
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: remove meaningless code path for "hg pull --rebase"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23183
largefiles: remove meaningless code path for "hg pull --rebase" This patch removes "--rebase" specific code path for "hg pull" in "overridepull", because previous patch makes it meaningless: now, "rebase.rebase" ("orig" invocation in this patch) can update/commit largefiles safely without "repo._isrebasing = True". As a side effect of removing "rebase.rebase" invocation in "overridepull", this patch removes "nothing to rebase ..." message in "test-largefiles.t", which is shown only when rebase extension is enabled AFTER largefiles: before this patch: 1. "dispatch" invokes "pullrebase" of rebase as "hg pull" at first, because rebase wraps "hg pull" later 2. "pullrebase" invokes "overridepull" of largefiles as "orig", even though rebase assumes that "orig" is "pull" of commands 3. "overridepull" executes "pull" and "rebase" directly 3.1 "pull" pulls changesets and creates new head "X" 3.2 "rebase" rebases current working parent "Y" on "X" 4. "overridepull" returns to "pullrebase" 5. "pullrebase" tries to rebase, but there is nothing to be done, because "Y" is already rebased on "X". then, it shows "nothing to rebase ..." after this patch: 1. "dispatch" invokes "pullrebase" of rebase as "hg pull" 2. "pullrebase" invokes "overridepull" of largefiles as "orig" 3. "overridepull" executes "pull" as "orig" 4. "overridepull" returns to "pullrebase" 5. revision "Y" is not yet rebased, so "pullrebase" doesn't shows "nothing to rebase ..." As another side effect of removing "rebase.rebase" invocation, this patch fixes issue3861, which occurs only when rebase extension is enabled BEFORE largefiles: before this patch: 1. "dispatch" invokes "overridepull" of largefiles at first, because largefiles wrap "hg pull" later 2. "overridepull" executes "pull" and "rebase" explicitly 2.1 "pull" pulls changesets and creates new head "X" 2.2 "rebase" rebases current working parent, but fails because no revision is checked out in issue3861 case 3. "overridepull" returns to "dispatch" with exit code 1 returned from "rebase" at (2.2) 4. "hg pull" terminates with exit code 1 unexpectedly after this patch: 1. "dispatch" invokes "overridepull" of largefiles at first 2. "overridepull" invokes "pullrebase" of rebase as "orig" 3. "pullrebase" invokes "pull" as "orig" 4. "pullrebase" invokes "rebase", and it fails 5. "pullrebase" returns to "overridepull" with exit code 0 (because "pullrebase" ignores result of "pull" and "rebase") 6. "overridepull" returns to "dispatch" with exit code 0 returned from "rebase" at (5) 7. "hg pull" terminates with exit code 0
Wed, 05 Nov 2014 23:24:47 +0900 largefiles: wrap "rebase.rebase" for functions using it directly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 05 Nov 2014 23:24:47 +0900] rev 23182
largefiles: wrap "rebase.rebase" for functions using it directly Before this patch, largefiles extension wraps only "rebase" in the command table by "extensions.wrapcommand". But there are some functions using "rebase.rebase" directly. Without special care for them, largefiles extension can't work correctly with such functions. In addition to it, "special care" often becomes complicated and awkward. For example: - "unshelve" can't get correct result of "rebase.rebase", because of lack of special care - special care for "hg pull --rebase" causes issue3861 This patch wraps "rebase.rebase" for functions using it directly. For simplicity, this patch keeps 'special care for "hg pull --rebase"'. It is removed in the subsequent patch.
Fri, 17 Oct 2014 14:41:11 +0200 changegroup: introduce cg2packer/unpacker
Sune Foldager <cryo@cyanite.org> [Fri, 17 Oct 2014 14:41:11 +0200] rev 23181
changegroup: introduce cg2packer/unpacker cg2 supports generaldelta in changegroups, to be used in bundle2. Since generaldelta is handled directly in cg2, reordering is switched off by default.
(0) -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip