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.
Fri, 17 Oct 2014 12:19:24 -0700 push: send highest changegroup format supported by both side
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 12:19:24 -0700] rev 23180
push: send highest changegroup format supported by both side When using bundle2, we find the common subset of supported changegroup-packers and we pick the max of them. This allow to use generaldelta aware changegroups through bundle2.
Fri, 17 Oct 2014 14:59:10 +0200 getbundle: send highest changegroup format supported by both side
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 17 Oct 2014 14:59:10 +0200] rev 23179
getbundle: send highest changegroup format supported by both side When using bundle2, we find the common subset of supported changegroup-packers and we pick the max of them. This allow to use generaldelta aware changegroup through bundle2.
Fri, 17 Oct 2014 14:41:21 +0200 changegroup: allow use of different cg#packer in getchangegroupraw
Sune Foldager <cryo@cyanite.org> [Fri, 17 Oct 2014 14:41:21 +0200] rev 23178
changegroup: allow use of different cg#packer in getchangegroupraw This will allow the use of general delta aware changegroup formats.
Fri, 17 Oct 2014 14:41:02 +0200 changegroup: introduce "raw" versions of some commands
Sune Foldager <cryo@cyanite.org> [Fri, 17 Oct 2014 14:41:02 +0200] rev 23177
changegroup: introduce "raw" versions of some commands The commands getchangegroup, getlocalchangegroup and getsubset now each have a version ending in -raw. The raw versions return the chunk generator from the changegroup packer directly, without wrapping it in a chunkbuffer and unpacker. This avoids extra chunkbuffers in the bundle2 code path. Also, the raw versions can be extended to support alternative packers in the future, to be used from bundle2.
Tue, 04 Nov 2014 16:43:33 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 04 Nov 2014 16:43:33 -0600] rev 23176
merge with stable
Tue, 04 Nov 2014 21:54:27 +0100 win32: remove Mercurial.ini file from Inno Setup installer (issue4435)
Pascal Quantin <pascal.quantin@gmail.com> [Tue, 04 Nov 2014 21:54:27 +0100] rev 23175
win32: remove Mercurial.ini file from Inno Setup installer (issue4435)
Tue, 04 Nov 2014 21:35:49 +0100 win32: fix win32 installers generation
Pascal Quantin <pascal.quantin@gmail.com> [Tue, 04 Nov 2014 21:35:49 +0100] rev 23174
win32: fix win32 installers generation cd0c51c07e5f introduced a typo preventing a proper generation of the installers. Also remove ConcatenateFiles() function as it is no more required.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip