Sat, 08 Nov 2014 16:35:15 +0000 transaction: pass the transaction to 'postclose' callback
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 08 Nov 2014 16:35:15 +0000] rev 23282
transaction: pass the transaction to 'postclose' callback This mirrors the API for 'pending' and 'finalize' callbacks. I do not have immediate usage planned for it, but I'm sure some callback will be happy to access transaction related data.
Sat, 08 Nov 2014 16:31:38 +0000 transaction: pass the transaction to 'finalize' callback
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 08 Nov 2014 16:31:38 +0000] rev 23281
transaction: pass the transaction to 'finalize' callback The callback will likely need to perform some operation related to the transaction (eg: registering file update). So we better pass the current transaction as the callback argument. Otherwise callback that needs it has to rely on horrible weak reference trick. This allow already allow us to slay a wild weak reference usage.
Sat, 08 Nov 2014 16:27:50 +0000 transaction: pass the transaction to 'pending' callback
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 08 Nov 2014 16:27:50 +0000] rev 23280
transaction: pass the transaction to 'pending' callback The callback will likely need to perform some operation related to the transaction (eg: backing files up). So we better pass the current transaction as the callback argument. Otherwise callback that needs it has to rely on horrible weak reference trick. The first foreseen user of this is changelog._writepending. We would like it to register the temporary file it create for cleanup purpose.
Wed, 05 Nov 2014 10:22:17 +0000 transaction: gather backupjournal logic together in the __init__
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 10:22:17 +0000] rev 23279
transaction: gather backupjournal logic together in the __init__ The initialisation of file-backup related variable were a bit scattered, we gather them together.
Wed, 05 Nov 2014 01:38:48 +0000 transaction: handle missing file in backupentries (instead of using entries)
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 01:38:48 +0000] rev 23278
transaction: handle missing file in backupentries (instead of using entries) The case where a backup of a missing file was requested was previously handled by the 'entries' list. As the 'backupentries' is about to gain ability to backup files outside of '.hg/store', we want it to be able to handle the missing file too. Reminder: using 'addbackup' on a missing file means that such file needs to be deleted if we rollback the transaction.
Wed, 05 Nov 2014 01:23:40 +0000 test-hup: use ls instead of echo
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 05 Nov 2014 01:23:40 +0000] rev 23277
test-hup: use ls instead of echo Having one file entry per line makes it easier to analyse diffs.
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.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip