Wed, 14 Oct 2015 12:22:09 +0200 exewrapper: report name of failed DLL in error message
Adrian Buehlmann <adrian@cadifra.com> [Wed, 14 Oct 2015 12:22:09 +0200] rev 26662
exewrapper: report name of failed DLL in error message This uses C string literal concatenation. Example output: $ hg version abort: failed to load Python DLL python27.dll Note that HGPYTHONLIB does not contain the trailing .dll, which works here because the documentation of LoadLibrary [1] says, that if no file name extension is specified in the filename parameter, the default library extension .dll is appended. See [2] for a motivation of this change. [1] https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175(v=vs.85).aspx [2] https://selenic.com/pipermail/mercurial/2015-August/048627.html
Tue, 13 Oct 2015 00:16:25 +0200 merge: abort on file/directory case folding collisions (issue4892)
Mads Kiilerich <madski@unity3d.com> [Tue, 13 Oct 2015 00:16:25 +0200] rev 26661
merge: abort on file/directory case folding collisions (issue4892) File/directory case folding collisions cannot be represented on case folding systems and have to fail. To detect this and abort early, utilize that for file/directory collisions, a sorted list of case folded manifest names will have the colliding directory right after the file. (This could perhaps be optimized, but this way of doing it also has directory/directory case folding in mind ... which however not is handled yet.)
Tue, 13 Oct 2015 00:16:25 +0200 tests: test of case-folding merge collisions
Mads Kiilerich <madski@unity3d.com> [Tue, 13 Oct 2015 00:16:25 +0200] rev 26660
tests: test of case-folding merge collisions
Wed, 19 Aug 2015 15:40:13 -0500 copies: group bothnew with other sets
Matt Mackall <mpm@selenic.com> [Wed, 19 Aug 2015 15:40:13 -0500] rev 26659
copies: group bothnew with other sets
Wed, 19 Aug 2015 15:32:27 -0500 copies: rename renamedelete to renamedeleteset for clarity
Matt Mackall <mpm@selenic.com> [Wed, 19 Aug 2015 15:32:27 -0500] rev 26658
copies: rename renamedelete to renamedeleteset for clarity
Wed, 19 Aug 2015 15:26:08 -0500 copies: move _makegetfctx calls into checkcopies
Matt Mackall <mpm@selenic.com> [Wed, 19 Aug 2015 15:26:08 -0500] rev 26657
copies: move _makegetfctx calls into checkcopies
Wed, 19 Aug 2015 15:17:33 -0500 copies: factor out setupctx into _makegetfctx
Matt Mackall <mpm@selenic.com> [Wed, 19 Aug 2015 15:17:33 -0500] rev 26656
copies: factor out setupctx into _makegetfctx This reduces the scope of mergecopies a bit
Fri, 21 Aug 2015 15:12:58 -0500 copies: avoid reference to c1/c2 in makectx
Matt Mackall <mpm@selenic.com> [Fri, 21 Aug 2015 15:12:58 -0500] rev 26655
copies: avoid reference to c1/c2 in makectx
Mon, 12 Oct 2015 03:37:09 -0500 mq: use cmdutil.revert instead of hg.revert
Matt Mackall <mpm@selenic.com> [Mon, 12 Oct 2015 03:37:09 -0500] rev 26654
mq: use cmdutil.revert instead of hg.revert It's the last user.
Wed, 30 Sep 2015 21:48:53 -0700 debugmergestate: add support for printing out driver-resolved files
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Sep 2015 21:48:53 -0700] rev 26653
debugmergestate: add support for printing out driver-resolved files
Wed, 30 Sep 2015 21:47:27 -0700 debugmergestate: add support for printing out merge driver
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Sep 2015 21:47:27 -0700] rev 26652
debugmergestate: add support for printing out merge driver
Wed, 30 Sep 2015 19:43:51 -0700 merge.mergedriver: don't try resolving files marked driver-resolved
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Sep 2015 19:43:51 -0700] rev 26651
merge.mergedriver: don't try resolving files marked driver-resolved The driver is expected to take care of these.
Mon, 28 Sep 2015 18:34:06 -0700 merge.mergestate: add support for persisting driver-resolved files
Siddharth Agarwal <sid0@fb.com> [Mon, 28 Sep 2015 18:34:06 -0700] rev 26650
merge.mergestate: add support for persisting driver-resolved files A driver-resolved file is a file that's handled specially by the driver. A common use case for this state would be autogenerated files, the generation of which should happen only after all source conflicts are resolved. This is done with an uppercase letter because older versions of Mercurial will not know how to treat such files at all.
Wed, 30 Sep 2015 21:42:52 -0700 merge.mergestate: add support for persisting a custom merge driver
Siddharth Agarwal <sid0@fb.com> [Wed, 30 Sep 2015 21:42:52 -0700] rev 26649
merge.mergestate: add support for persisting a custom merge driver A 'merge driver' is a coordinator for the overall merge process. It will be able to control: - tools for individual files, much like the merge-patterns configuration does today - tools that can work across groups of files - the ordering of file resolution - resolution of automatically generated files - adding and removing additional files to and from the dirstate Since it is a critical part of the merge process, it really is part of the merge state. This is a lowercase character (i.e. optional) because ignoring this is fine for older versions of Mercurial -- however, if there are any files that are specially treated by the driver, we should abort. That will happen in upcoming patches. There is a potential security issue with storing the merge driver in the merge state. See the inline comments for more details.
Tue, 13 Oct 2015 12:30:39 -0700 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 12:30:39 -0700] rev 26648
exchange: support sorting URLs by client-side preferences Not all bundles are appropriate for all clients. For example, someone with a slow Internet connection may want to prefer bz2 bundles over gzip bundles because they are smaller and don't take as long to transfer. This is information that a server cannot know on its own. So, we invent a mechanism for "preferring" server-advertised URLs based on their attributes. We could invent a negotiation between client and server where the client sends its preferences and the sorting/filtering is done server-side. However, this feels complex. We can avoid complicating the wire protocol and exposing ourselves to backwards compatible concerns by performing the sorting locally. This patch defines a new config option for expressing preferred attributes in server-advertised bundles. At Mozilla, we leverage this feature so clients in fast data centers prefer uncompressed bundles. (We advertise gzip bundles first because that is a reasonable default.) I consider this an advanced feature. I'm on the fence as to whether it should be documented in `hg help config`.
Tue, 13 Oct 2015 12:31:19 -0700 exchange: extract bundle specification components into own attributes
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 12:31:19 -0700] rev 26647
exchange: extract bundle specification components into own attributes An upcoming patch will enable clients to prefer certain bundles over others. The idea is that we define values of attributes from manifests that are desirable. The BUNDLESPEC attribute is a complex value consisting of multiple parts. Clients may wish to only prefer one of these parts. Having to specify every combination of BUNDLESPEC would be annoying. So, we extract the components of BUNDLESPEC into their own attributes so clients can easily filter on a sub-component.
Tue, 13 Oct 2015 12:29:50 -0700 exchange: support preserving external names when parsing bundle specs
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 12:29:50 -0700] rev 26646
exchange: support preserving external names when parsing bundle specs This will be needed to make client-side preferences work easier.
Tue, 13 Oct 2015 10:59:41 -0700 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 10:59:41 -0700] rev 26645
clonebundles: filter on SNI requirement Server Name Indication (SNI) is commonly used in CDNs and other hosted environments. Unfortunately, Python <2.7.9 does not support SNI and when these older Python versions attempt to negotiate TLS to an SNI server, they raise an opaque error like "_ssl.c:507: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure." We introduce a manifest attribute to denote the URL requires SNI and have clients without SNI support filter these entries.
Tue, 13 Oct 2015 11:45:30 -0700 clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 11:45:30 -0700] rev 26644
clonebundles: filter on bundle specification Not all clients are capable of reading every bundle. Currently, content negotiation to ensure a server sends a client a compatible bundle format is performed at request time. The response bundle is dynamically generated at request time, so this works fine. Clone bundles are statically generated *before* the request. This means that a modern server could produce bundles that a legacy client isn't capable of reading. Without some kind of "type hint" in the clone bundles manifest, a client may attempt to download an incompatible bundle. Furthermore, a client may not realize a bundle is incompatible until it has processed part of the bundle (imagine consuming a 1 GB changegroup bundle2 part only to discover the bundle2 part afterwards is incompatibl). This would waste time and resources. And it isn't very user friendly. Clone bundle manifests thus need to advertise the *exact* format of the hosted bundles so clients may filter out entries that they don't know how to read. This patch introduces that mechanism. We introduce the BUNDLESPEC attribute to declare the "bundle specification" of the entry. Bundle specifications are parsed using exchange.parsebundlespecification, which uses the same strings as the "--type" argument to `hg bundle`. The supported bundle specifications are well defined and backwards compatible. When a client encounters a BUNDLESPEC that is invalid or unsupported, it silently ignores the entry.
Tue, 13 Oct 2015 10:41:54 -0700 clonebundle: support bundle2
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 10:41:54 -0700] rev 26643
clonebundle: support bundle2 exchange.readbundle() can return 2 different types. We weren't handling the bundle2 case. Handle it. At some point we'll likely want a generic API for applying a bundle from a file handle. For now, create another one-off until we figure out what the unified bundle API should look like (addressing this is a can of worms I don't want to open right now).
Mon, 05 Oct 2015 21:31:32 -0700 update: also use 'destupdate' for pull and unbundle
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 21:31:32 -0700] rev 26642
update: also use 'destupdate' for pull and unbundle Update can also be performed by 'hg pull --update' and 'hg unbundle'. We use the destupdate function in these case too.
Tue, 29 Sep 2015 01:03:26 -0700 destupdate: also include bookmark related logic
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 29 Sep 2015 01:03:26 -0700] rev 26641
destupdate: also include bookmark related logic For the same reason, we move the bookmark related update logic into the 'destupdate' function. This requires to extend the returns of the function to include the bookmark that needs to move (more or less) and the bookmark to activate at the end of the function. See function documentation for details on this returns.
Tue, 13 Oct 2015 10:57:54 -0700 exchange: refactor bundle specification parsing
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 10:57:54 -0700] rev 26640
exchange: refactor bundle specification parsing The old code was tailored to `hg bundle` usage and not appropriate for use as a general API, which clone bundles will require. The code has been rewritten to make it more generally suitable. We introduce dedicated error types to represent invalid and unsupported bundle specifications. The reason we need dedicated error types (rather than error.Abort) is because clone bundles will want to catch these exception as part of filtering entries. We don't want to swallow error.Abort on principle.
Tue, 13 Oct 2015 11:43:21 -0700 exchange: move bundle specification parsing from cmdutil
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Oct 2015 11:43:21 -0700] rev 26639
exchange: move bundle specification parsing from cmdutil Clone bundles require a well-defined string to specify the type of bundle that is listed so clients can filter compatible file types. The `hg bundle` command and cmdutil.parsebundletype() already establish the beginnings of a bundle specification format. As part of formalizing this format specification so it can be used by clone bundles, we move the specification parsing bits verbatim to exchange.py, which is a more suitable place than cmdutil.py. A subsequent patch will refactor this code to make it more appropriate as a general API.
Tue, 24 Mar 2015 00:28:28 +0900 revset: add optional offset argument to limit() predicate
Yuya Nishihara <yuya@tcha.org> [Tue, 24 Mar 2015 00:28:28 +0900] rev 26638
revset: add optional offset argument to limit() predicate It's common for GUI or web frontend to fetch chunk of revisions per batch size. Previously it was possible only if revisions were sorted by revision number. $ hg log -r 'limit({revspec} & :{last_known}, 101)' So this patch introduces a general way to retrieve chunk of revisions after skipping offset revisions. $ hg log -r 'limit({revspec}, 100, {last_count})' This is a dumb implementation. We can optimize it for baseset and spanset later.
Mon, 12 Oct 2015 17:19:22 +0900 revset: port limit() to support keyword arguments
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Oct 2015 17:19:22 +0900] rev 26637
revset: port limit() to support keyword arguments The next patch will introduce the third 'offset' argument. This allows us to specify 'offset' without 'n' argument.
Mon, 12 Oct 2015 17:14:47 +0900 revset: eliminate temporary reference to subset in limit() and last()
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Oct 2015 17:14:47 +0900] rev 26636
revset: eliminate temporary reference to subset in limit() and last()
Wed, 14 Oct 2015 02:49:17 +0900 dirstate: read from pending file under HG_PENDING mode if it exists
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 14 Oct 2015 02:49:17 +0900] rev 26635
dirstate: read from pending file under HG_PENDING mode if it exists True/False value of '_pendingmode' means whether 'dirstate.pending' is used to initialize own '_map' and so on. When it is None, neither 'dirstate' nor 'dirstate.pending' is read in yet. This is used to keep consistent view between '_pl()' and '_read()'. Once '_pendingmode' is determined by reading one of 'dirstate' or 'dirstate.pending' in, '_pendingmode' is kept even if 'invalidate()' is invoked. This should be reasonable, because: - effective 'invalidate()' invocation should occur only in wlock scope, and - wlock can't be gotten under HG_PENDING mode '_trypending()' is defined as a normal function to factor similar code path (in bookmarks and phases) out in the future easily.
Wed, 14 Oct 2015 02:49:17 +0900 dirstate: make writing in-memory changes aware of transaction activity
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 14 Oct 2015 02:49:17 +0900] rev 26634
dirstate: make writing in-memory changes aware of transaction activity This patch delays writing in-memory changes out, if transaction is running. '_getfsnow()' is defined as a function, to hook it easily for ambiguous timestamp tests (see also fakedirstatewritetime.py) 'if tr:' code path in this patch is still disabled at this revision, because there is no client invoking 'dirstate.write()' with repo object. BTW, this patch changes 'dirstate.invalidate()' semantics around 'dirstate.write()' in a transaction scope: before: with repo.transaction(): dirstate.CHANGE('A') dirstate.write() # change for A is written out here dirstate.CHANGE('B') dirstate.invalidate() # discards only change for B after: with repo.transaction(): dirstate.CHANGE('A') dirstate.write() # change for A is still kept in memory dirstate.CHANGE('B') dirstate.invalidate() # discards changes for A and B Fortunately, there is no code path expecting the former, at least, in Mercurial itself, because 'dirstateguard' was introduced to remove such 'dirstate.invalidate()'.
Wed, 14 Oct 2015 02:49:17 +0900 dirstate: make functions for backup aware of transaction activity
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 14 Oct 2015 02:49:17 +0900] rev 26633
dirstate: make functions for backup aware of transaction activity Some comments in this patch assume that subsequent patch changes 'dirstate.write()' like as below: def write(self, repo): if not self._dirty: return tr = repo.currenttransaction() if tr: tr.addfilegenerator('dirstate', (self._filename,), self._writedirstate, location='plain') return # omit actual writing out st = self._opener('dirstate', "w", atomictemp=True) self._writedirstate(st) This patch makes '_savebackup()' write in-memory changes out, and it causes clearing 'self._dirty'. If dirstate isn't changed after '_savebackup()', subsequent 'dirstate.write()' never invokes 'tr.addfilegenerator()' because 'not self._dirty' is true. Then, 'tr.writepending()' unintentionally returns False, if there is no other (e.g. changelog) changes pending, even though dirstate changes are already written out at '_savebackup()'. To avoid such situation, this patch makes '_savebackup()' explicitly invoke 'tr.addfilegenerator()', if transaction is running. '_savebackup()' should get awareness of transaction before 'write()', because the former depends on the behavior of the latter before this patch.
Wed, 14 Oct 2015 02:49:17 +0900 dirstate: move code paths for backup from dirstateguard to dirstate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 14 Oct 2015 02:49:17 +0900] rev 26632
dirstate: move code paths for backup from dirstateguard to dirstate This can centralize the logic to write in-memory changes out correctly according to transaction activity into dirstate. Passing 'repo' object to newly added functions is needed to examine current transaction activity in subsequent patches, because 'dirstate' itself doesn't have direct reference to it.
Tue, 13 Oct 2015 12:25:43 -0700 localrepo: restore dirstate to one before rollbacking if not parent-gone
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 13 Oct 2015 12:25:43 -0700] rev 26631
localrepo: restore dirstate to one before rollbacking if not parent-gone 'localrepository.rollback()' explicilty restores dirstate, only if at least one of current parents of the working directory is removed at rollbacking (a.k.a "parent-gone"). After DirstateTransactionPlan, 'dirstate.write()' will cause marking '.hg/dirstate' as a file to be restored at rollbacking. https://mercurial.selenic.com/wiki/DirstateTransactionPlan Then, 'transaction.rollback()' restores '.hg/dirstate' regardless of parents of the working directory at that time, and this causes unexpected dirstate changes if not "parent-gone" (e.g. "hg update" to another branch after "hg commit" or so, then "hg rollback"). To avoid such situation, this patch restores dirstate to one before rollbacking if not "parent-gone". before: b1. restore dirstate explicitly, if "parent-gone" after: a1. save dirstate before actual rollbacking via dirstateguard a2. restore dirstate via 'transaction.rollback()' a3. if "parent-gone" - discard backup (a1) - restore dirstate from 'undo.dirstate' a4. otherwise, restore dirstate from backup (a1) Even though restoring dirstate at (a3) after (a2) seems redundant, this patch keeps this existing code path, because: - it isn't ensured that 'dirstate.write()' was invoked at least once while transaction running If not, '.hg/dirstate' isn't restored at (a2). In addition to it, rude 3rd party extension invoking 'dirstate.write()' without 'repo' while transaction running (see subsequent patches for detail) may break consistency of a file backup-ed by transaction. - this patch mainly focuses on changes for DirstateTransactionPlan Restoring dirstate at (a3) itself should be cheaper enough than rollbacking itself. Redundancy will be removed in next step. Newly added test is almost meaningless at this point. It will be used to detect regression while implementing delayed dirstate write out.
Wed, 14 Oct 2015 02:40:04 +0900 parsers: make pack_dirstate take now in integer for consistency
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 14 Oct 2015 02:40:04 +0900] rev 26630
parsers: make pack_dirstate take now in integer for consistency On recent OS, 'stat.st_mtime' has a double precision floating point value to represent nano seconds, but it is not wide enough for actual file timestamp: nowadays, only 52 - 32 = 20 bit width is available for decimal places in sec. Therefore, casting it to 'int' may cause unexpected result. See also changeset 13272104bb07 fixing issue4836 for detail. For example, changed file A may be treated as "clean" unexpectedly in steps below. "rounded now" is the value gotten by rounding via 'int(st.st_mtime)' or so. ---------------------+--------------------+------------------------ "now" | | timestamp of A (time_t) float rounded time_t| action | FS dirstate ------ ------- ------+--------------------+-------- --------------- N+.nnn N N | | --- --- | update file A | N | dirstate.normal(A) | N N+.999 N+1 N | | | dirstate.write() | N (*1) | : | | change file A | N | : | N+1.00 N+1 N+1 | | | "hg status" (*2) | N N ------ ------- ------+--------------------+-------- --------------- Timestamp N of A in dirstate isn't dropped at (*1), because "rounded now" is N+1 at that time, even if 'st_mtime' in 'time_t' is still N. Then, file A is unexpectedly treated as "clean" at (*2) in this case. For consistent handling of 'stat.st_mtime', this patch makes 'pack_dirstate()' take 'now' argument not in floating point but in integer. This patch makes 'PyArg_ParseTuple()' in 'pack_dirstate()' use format 'i' (= checking type mismatch or overflow), even though it is ensured that 'now' is in the range of 32bit signed integer by masking with '_rangemask' (= 0x7fffffff) on caller side. It should be cheaper enough than packing itself, and useful to detect that legacy code invokes 'pack_dirstate()' with 'now' in floating point value.
Tue, 29 Sep 2015 00:18:49 -0700 destupdate: include the 'check' logic
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 29 Sep 2015 00:18:49 -0700] rev 26629
destupdate: include the 'check' logic After moving logic from 'merge.update' into 'destutil.destupdate', we are now moving logic from 'command.update' in 'destutil.destupdate'. This will make the function actually useful in predicting (and altering) the update behavior.
Mon, 05 Oct 2015 03:50:47 -0700 destupdate: move the check related to the "clean" logic in the function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 03:50:47 -0700] rev 26628
destupdate: move the check related to the "clean" logic in the function We want this function to exactly predict the behavior for update. Moreover, we would like to remove all high level behavior logic out of the merge module so this is a step forward. Now that the 'destupdate' function both compute and validate the destination, we can directly use it at the command level, ensuring that the 'hg update' command never call 'merge.update' without a defined destination. This is a first (but significant) step toward having 'merge.update' always feed with a properly validated destination and free of high level logic.
Mon, 12 Oct 2015 19:22:34 +0200 largefiles: better handling of merge of largefiles that not are available
Mads Kiilerich <madski@unity3d.com> [Mon, 12 Oct 2015 19:22:34 +0200] rev 26627
largefiles: better handling of merge of largefiles that not are available Before, when merging revisions with missing largefiles, the missing largefiles would be fetched as a part of the merge. If that failed (for example because the main repository temporarily was unavailable), the largefile would be left missing. However, the next commit would abort and (seemed to) fail when markcommitted tried to mark the standin file as normal and thus had to hash the largefile that didn't exist. (Actually, the commit would succeed but the largefile update that follows right after the commit transaction would abort - quite confusing.) To fix that, make sure that synclfdirstate only marks files as normal if they actually exist.
Sun, 11 Oct 2015 22:13:03 -0700 patchbomb: check that targets exist at the publicurl
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 11 Oct 2015 22:13:03 -0700] rev 26626
patchbomb: check that targets exist at the publicurl Advertising that the patch are available to be pulled requires that to be true. So we check revision availability on the remote before sending any email.
Mon, 12 Oct 2015 20:13:12 +0200 windows: read all global config files, not just the first (issue4491) (BC)
Mads Kiilerich <madski@unity3d.com> [Mon, 12 Oct 2015 20:13:12 +0200] rev 26625
windows: read all global config files, not just the first (issue4491) (BC) On windows, hgrc.d/*.rc would not be read if mercurial.ini was found. That was far from obvious from the documentation and different from the behavior on posix systems. As a consequence of this, TortoiseHg cacert configuration placed in hgrc.d would not be read if an old global mercurial.ini still existed. "hg config -g" could also crash when no global configuration files could be found. Instead, make windows behave like posix and read all global configuration files. The documentation was in a way right that individual config settings in the global Mercurial.ini would override settings from for example .hgrc.d\*.rc, but only because the .d files not would be read at all if a Mercurial.ini was found. The ordering in the documentation is thus changed to match the code.
Fri, 09 Oct 2015 14:48:59 -0700 strip: factor out revset calculation for strip -B
Ryan McElroy <rmcelroy@fb.com> [Fri, 09 Oct 2015 14:48:59 -0700] rev 26624
strip: factor out revset calculation for strip -B This will allow reusing it in evolve and overriding it in other extensions.
Fri, 09 Oct 2015 11:22:01 -0700 clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2015 11:22:01 -0700] rev 26623
clonebundles: support for seeding clones from pre-generated bundles Cloning can be an expensive operation for servers because the server generates a bundle from existing repository data at request time. For a large repository like mozilla-central, this consumes 4+ minutes of CPU time on the server. It also results in significant network utilization. Multiplied by hundreds or even thousands of clients and the ensuing load can result in difficulties scaling the Mercurial server. Despite generation of bundles being deterministic until the next changeset is added, the generation of bundles to service a clone request is not cached. Each clone thus performs redundant work. This is wasteful. This patch introduces the "clonebundles" extension and related client-side functionality to help alleviate this deficiency. The client-side feature is behind an experimental flag and is not enabled by default. It works as follows: 1) Server operator generates a bundle and makes it available on a server (likely HTTP). 2) Server operator defines the URL of a bundle file in a .hg/clonebundles.manifest file. 3) Client `hg clone`ing sees the server is advertising bundle URLs. 4) Client fetches and applies the advertised bundle. 5) Client performs equivalent of `hg pull` to fetch changes made since the bundle was created. Essentially, the server performs the expensive work of generating a bundle once and all subsequent clones fetch a static file from somewhere. Scaling static file serving is a much more manageable problem than scaling a Python application like Mercurial. Assuming your repository grows less than 1% per day, the end result is 99+% of CPU and network load from clones is eliminated, allowing Mercurial servers to scale more easily. Serving static files also means data can be transferred to clients as fast as they can consume it, rather than as fast as servers can generate it. This makes clones faster. Mozilla has implemented similar functionality of this patch on hg.mozilla.org using a custom extension. We are hosting bundle files in Amazon S3 and CloudFront (a CDN) and have successfully offloaded >1 TB/day in data transfer from hg.mozilla.org, freeing up significant bandwidth and CPU resources. The positive impact has been stellar and I believe it has proved its value to be included in Mercurial core. I feel it is important for the client-side support to be enabled in core by default because it means that clients will get faster, more reliable clones and will enable server operators to reduce load without requiring any client-side configuration changes (assuming clients are up to date, of course). The scope of this feature is narrowly and specifically tailored to cloning, despite "serve pulls from pre-generated bundles" being a valid and useful feature. I would eventually like for Mercurial servers to support transferring *all* repository data via statically hosted files. You could imagine a server that siphons all pushed data to bundle files and instructs clients to apply a stream of bundles to reconstruct all repository data. This feature, while useful and powerful, is significantly more work to implement because it requires the server component have awareness of discovery and a mapping of which changesets are in which files. Full, clone bundles, by contrast, are much simpler. The wire protocol command is named "clonebundles" instead of something more generic like "staticbundles" to leave the door open for a new, more powerful and more generic server-side component with minimal backwards compatibility implications. The name "bundleclone" is used by Mozilla's extension and would cause problems since there are subtle differences in Mozilla's extension. Mozilla's experience with this idea has taught us that some form of "content negotiation" is required. Not all clients will support all bundle formats or even URLs (advanced TLS requirements, etc). To ensure the highest uptake possible, a server needs to advertise multiple versions of bundles and clients need to be able to choose the most appropriate from that list one. The "attributes" in each server-advertised entry facilitate this filtering and sorting. Their use will become apparent in subsequent patches. Initial inspiration and credit for the idea of cloning from static files belongs to Augie Fackler and his "lookaside clone" extension proof of concept.
Tue, 29 Sep 2015 16:17:32 -0700 sslutil: expose attribute indicating whether SNI is supported
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 29 Sep 2015 16:17:32 -0700] rev 26622
sslutil: expose attribute indicating whether SNI is supported This will be used so clone bundles can advertise whether URLs require SNI. This will be explained more in a subsequent patch.
Sun, 11 Oct 2015 23:58:07 -0700 resolve: perform all premerges before performing any file merges (BC)
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 23:58:07 -0700] rev 26621
resolve: perform all premerges before performing any file merges (BC) Just like the BC to merge before it, this allows for a maximally consistent state before providing any prompts to the user.
Sun, 11 Oct 2015 23:56:44 -0700 test-resolve.t: add some tests for .orig file contents
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 23:56:44 -0700] rev 26620
test-resolve.t: add some tests for .orig file contents An upcoming patch will touch some code around this area, and I couldn't find any tests related to this.
Sun, 11 Oct 2015 23:54:40 -0700 test-resolve.t: add some output to show order of operations
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 23:54:40 -0700] rev 26619
test-resolve.t: add some output to show order of operations This basically shows the behavior of resolve with multiple files. An upcoming behavior change will cause this output to also change.
Sun, 11 Oct 2015 21:56:39 -0700 merge.mergestate: perform all premerges before any merges (BC)
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 21:56:39 -0700] rev 26618
merge.mergestate: perform all premerges before any merges (BC) We perform all that we can non-interactively before prompting the user for input via their merge tool. This allows for a maximally consistent state when the user is first prompted. The test output changes indicate the actual behavior change happening.
Sun, 11 Oct 2015 20:12:12 -0700 merge: introduce a preresolve function
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 20:12:12 -0700] rev 26617
merge: introduce a preresolve function The section of code that writes out the version of the file cached in the merge state should only be run at preresolve time. This is so that if the premerge keeps around conflict markers, those don't get overwritten before the main merge.
Sun, 11 Oct 2015 18:37:54 -0700 merge.mergestate._resolve: also return completed status
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 18:37:54 -0700] rev 26616
merge.mergestate._resolve: also return completed status We'll need this for a new 'preresolve' function we're adding.
Sun, 11 Oct 2015 18:29:50 -0700 merge.mergestate: add a wrapper around resolve
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 18:29:50 -0700] rev 26615
merge.mergestate: add a wrapper around resolve The resolve function will be broken up into separate pre-resolve and resolve steps.
Fri, 09 Oct 2015 13:54:52 -0700 simplemerge: move conflict warning message to filemerge
Siddharth Agarwal <sid0@fb.com> [Fri, 09 Oct 2015 13:54:52 -0700] rev 26614
simplemerge: move conflict warning message to filemerge The current output for a failed merge with conflict markers looks something like: merging foo warning: conflicts during merge. merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') merging bar warning: conflicts during merge. merging bar incomplete! (edit conflicts, then use 'hg resolve --mark') We're going to change the way merges are done to perform all premerges before all merges, so that the output above would look like: merging foo merging bar warning: conflicts during merge. merging foo incomplete! (edit conflicts, then use 'hg resolve --mark') warning: conflicts during merge. merging bar incomplete! (edit conflicts, then use 'hg resolve --mark') The 'warning: conflicts during merge' line has no context, so is pretty confusing. This patch will change the future output to: merging foo merging bar warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') warning: conflicts while merging bar! (edit, then use 'hg resolve --mark') The hint on how to resolve the conflicts makes this a bit unwieldy, but solving that is tricky because we already hint that people run 'hg resolve' to retry unresolved merges. The 'hg resolve --mark' mostly applies to conflict marker based resolution.
Sun, 11 Oct 2015 15:04:00 -0700 filemerge: clean up some dead code
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 15:04:00 -0700] rev 26613
filemerge: clean up some dead code We now exit early if we do a premerge, so extra checks are no longer necessary.
Mon, 12 Oct 2015 14:15:04 -0400 run-tests: add b-prefix on two strings to fix python3 support
Augie Fackler <augie@google.com> [Mon, 12 Oct 2015 14:15:04 -0400] rev 26612
run-tests: add b-prefix on two strings to fix python3 support
Sun, 11 Oct 2015 20:47:14 -0700 filemerge: break overall filemerge into separate premerge and merge steps
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 20:47:14 -0700] rev 26611
filemerge: break overall filemerge into separate premerge and merge steps This means that in ms.resolve we must call merge after calling premerge. This doesn't yet mean that all premerges happen before any merges -- however, this does get us closer to our goal. The output differences are because we recompute the merge tool. The only user-visible difference caused by this patch is that if the tool is missing we'll print the warning twice. Not a huge deal, though.
Sun, 11 Oct 2015 20:04:40 -0700 filemerge: only copy to backup during premerge step
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 20:04:40 -0700] rev 26610
filemerge: only copy to backup during premerge step The premerge might leave the original file in an unclean state. Therefore it's important to only copy the file in the beginning.
Sun, 11 Oct 2015 20:02:53 -0700 filemerge: only print out "merging f" output at premerge step
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 20:02:53 -0700] rev 26609
filemerge: only print out "merging f" output at premerge step We're soon going to call this function twice, once for premerge and once for merge. This makes sure the "merging" output only gets printed during the premerge step.
Thu, 08 Oct 2015 00:19:20 -0700 filemerge: deindent the parts of filemerge outside the try block
Siddharth Agarwal <sid0@fb.com> [Thu, 08 Oct 2015 00:19:20 -0700] rev 26608
filemerge: deindent the parts of filemerge outside the try block It is no longer necessary to indent these parts.
Sun, 11 Oct 2015 20:47:04 -0700 filemerge: introduce a premerge flag and function
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 20:47:04 -0700] rev 26607
filemerge: introduce a premerge flag and function This flag will let us get to our overall goal of performing all premerges before any merges.
Sun, 11 Oct 2015 12:56:21 -0700 filemerge: also return whether the merge is complete
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 12:56:21 -0700] rev 26606
filemerge: also return whether the merge is complete In future patches, we'll pause merges after the premerge step. After the premerge step we'll return complete = False.
Sun, 11 Oct 2015 12:31:08 -0700 filemerge: add a wrapper around the filemerge function
Siddharth Agarwal <sid0@fb.com> [Sun, 11 Oct 2015 12:31:08 -0700] rev 26605
filemerge: add a wrapper around the filemerge function We'll introduce a separate premerge function that calls the same code.
Fri, 09 Oct 2015 01:19:37 +0200 context: don't hex encode all unknown 20 char revision specs (issue4890)
Mads Kiilerich <madski@unity3d.com> [Fri, 09 Oct 2015 01:19:37 +0200] rev 26604
context: don't hex encode all unknown 20 char revision specs (issue4890) d3908c911d5e introduced nice hexified display of missing nodes. It did however also make missing 20 character revision specifications be shown as hex - very confusing. Users are often wrong and somehow specify revisions that don't exist. Nodes will however rarely be missing ... and they will only look like a user provided revision specification and be all ascii in 1 of 4*10**9. With this change, missing revisions will only be hexified if they really look like binary nodes. This change will thus improve the error reporting UI in the common case and only very rarely make it confusing in the opposite direction of how it was before.
Mon, 12 Oct 2015 00:45:24 -0700 discovery: put trivial branch first
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 12 Oct 2015 00:45:24 -0700] rev 26603
discovery: put trivial branch first Having the simple and tiny branch of the conditional first help readability. The "else" that appears after a screen of code is harder to relate to a conditional.
Fri, 09 Oct 2015 15:31:50 -0700 shelve: rename 'publicancestors' to something accurate (issue4737)
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 09 Oct 2015 15:31:50 -0700] rev 26602
shelve: rename 'publicancestors' to something accurate (issue4737) That function is actually not returning public ancestors at all. This is pointed by the second line of the docstring... The bundling behavior was made correct in a5141977198d but with confusion remaining regarding what each function was doing. This close issue4737, because this highlight that shelve is actually -not- bundling too much data (this was actually properly tested).
Fri, 09 Oct 2015 12:30:46 -0500 makefile: add wheel build target
Nathan Goldbaum <ngoldbau@ucsc.edu> [Fri, 09 Oct 2015 12:30:46 -0500] rev 26601
makefile: add wheel build target
Fri, 09 Oct 2015 12:25:51 -0500 setup: import setup from setuptools if FORCE_SETUPTOOLS is set
Nathan Goldbaum <ngoldbau@ucsc.edu> [Fri, 09 Oct 2015 12:25:51 -0500] rev 26600
setup: import setup from setuptools if FORCE_SETUPTOOLS is set This should allow easier experimentation with using setuptools in mercurial's build automation, without breaking anything that currently depends on distutils behavior
Mon, 12 Oct 2015 14:46:51 +0100 hgweb: remove obsolete -webkit-border-radius property
Gijs Kruitbosch <gijskruitbosch@gmail.com> [Mon, 12 Oct 2015 14:46:51 +0100] rev 26599
hgweb: remove obsolete -webkit-border-radius property
Mon, 12 Oct 2015 15:20:04 +0800 monoblue: add a link to the latest file revision
Anton Shestakov <av6@dwimlabs.net> [Mon, 12 Oct 2015 15:20:04 +0800] rev 26598
monoblue: add a link to the latest file revision For reference, this was added to paper/coal in bb00a159e594 and to gitweb in b3b57ecbda50.
Fri, 09 Oct 2015 15:44:00 -0700 discovery: reference relevant bug in the faulty code
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 09 Oct 2015 15:44:00 -0700] rev 26597
discovery: reference relevant bug in the faulty code We extend the comment about this code flaw with more code flaw.
Fri, 09 Oct 2015 15:37:05 -0700 discovery: fix a typo in a comment
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 09 Oct 2015 15:37:05 -0700] rev 26596
discovery: fix a typo in a comment The idea here is that the code is imperfect, not that it is impossible to get something behaving properly.
Fri, 09 Oct 2015 14:59:37 -0700 getsubset: get the unpacker version from the bundler
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 09 Oct 2015 14:59:37 -0700] rev 26595
getsubset: get the unpacker version from the bundler The current setup requires to pass both a packer and, optionally, the version of the unpacker. This is confusing and error prone as the two value cannot mismatch. Instead, we simply grab the version from the packer. This fixes a bug where requesting a cg2 from 'hg bundle' were reported as changegroup 1. I should have caught that in the initial changeset but I missed it somehow.
Mon, 12 Oct 2015 15:42:32 +0300 test-convert-cvs: add sleep so cvs notices changes
Emanuele Giaquinta <emanuele.giaquinta@gmail.com> [Mon, 12 Oct 2015 15:42:32 +0300] rev 26594
test-convert-cvs: add sleep so cvs notices changes This change makes the test pass on gcc112.fsffrance.org.
Wed, 07 Oct 2015 11:33:52 +0300 cvsps: fix computation of parent revisions when log caching is on
Emanuele Giaquinta <emanuele.giaquinta@gmail.com> [Wed, 07 Oct 2015 11:33:52 +0300] rev 26593
cvsps: fix computation of parent revisions when log caching is on cvsps computes the parent revisions of log entries by walking the cvs log sorted by (rcs, revision) and by iteratively maintaining a 'versions' dictionary which maps a (rcs, branch) pair onto the last revision seen for that pair. When log caching is on and a log cache exists, cvsps fails to set the parent revisions of new log entries because it does not iterate over the log cache in the parents computation. A complication is that a file rcs can change (move to/from the attic), with respect to its value in the log cache, if the file is removed/added back. This patch adds an iteration over the log cache to update the rcs of cached log entries, if changed, and to properly populate the 'versions' dictionary.
Tue, 06 Oct 2015 16:26:20 -0500 dirstate: batch calls to statfiles (issue4878)
Matt Mackall <mpm@selenic.com> [Tue, 06 Oct 2015 16:26:20 -0500] rev 26592
dirstate: batch calls to statfiles (issue4878) This makes it more interruptible.
Sun, 11 Oct 2015 18:30:47 +0900 parsers: fix infinite loop or out-of-bound read in fm1readmarkers (issue4888)
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Oct 2015 18:30:47 +0900] rev 26591
parsers: fix infinite loop or out-of-bound read in fm1readmarkers (issue4888) The issue4888 was caused by 0-length obsolete marker. If msize is zero, fm1readmarkers() never ends. This patch adds several bound checks to fm1readmarker(). Therefore, 0-length and invalid-size marker should be rejected.
Sun, 11 Oct 2015 18:41:41 +0900 parsers: read sizes of metadata pair of obsolete marker at once
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Oct 2015 18:41:41 +0900] rev 26590
parsers: read sizes of metadata pair of obsolete marker at once This will make it easy to implement bound checking. Currently fm1readmarker() has no protection for corrupted obsstore and can cause infinite loop or out-of-bound reads.
Wed, 07 Oct 2015 21:51:24 -0700 filemerge: clean up temp files in a finally block
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Oct 2015 21:51:24 -0700] rev 26589
filemerge: clean up temp files in a finally block This isn't really a big deal because the temp files are created in $TMPDIR, but it makes some upcoming work simpler.
Thu, 08 Oct 2015 12:53:09 -0700 check-code: detect and ban 'util.Abort'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 08 Oct 2015 12:53:09 -0700] rev 26588
check-code: detect and ban 'util.Abort' We have seen the light, please use the new way.
Thu, 08 Oct 2015 12:55:45 -0700 error: get Abort from 'error' instead of 'util'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 08 Oct 2015 12:55:45 -0700] rev 26587
error: get Abort from 'error' instead of 'util' The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be confused about that and gives all the credit to 'util' instead of the hardworking 'error'. In a spirit of equity, we break the cycle of injustice and give back to 'error' the respect it deserves. And screw that 'util' poser. For great justice.
Mon, 05 Oct 2015 22:49:24 -0700 eol: rename 'error' to 'haserror'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 22:49:24 -0700] rev 26586
eol: rename 'error' to 'haserror' The variable 'error' conflict with the module name that we would like to import and use in a coming changeset.
Mon, 05 Oct 2015 22:29:57 -0700 discovery: rename 'error' to 'errormsg'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 22:29:57 -0700] rev 26585
discovery: rename 'error' to 'errormsg' The variable 'error' conflict with the module name that we would like to import and use in a coming changeset.
Mon, 05 Oct 2015 16:44:45 -0700 histedit: delete histedit statefile on any exception during abort
Christian Delahousse <cdelahousse@fb.com> [Mon, 05 Oct 2015 16:44:45 -0700] rev 26584
histedit: delete histedit statefile on any exception during abort When an user aborts a histedit, many things could go wrong. At a minimum, after a histedit abort failure, their repository should be out of that state. We've found situations where the user could not exit the histedit state without manually deleting the histedit state file. This patch ensures that if any exception happens during an abort, the histedit statefile will be deleted so that users are out of the histedit state and can at least manually get the repo back to a workable condition.
Tue, 06 Oct 2015 15:09:28 -0700 histedit: check presence of statefile before deleting it
Christian Delahousse <cdelahousse@fb.com> [Tue, 06 Oct 2015 15:09:28 -0700] rev 26583
histedit: check presence of statefile before deleting it When the histeditstate class instance has it's clear() method called, there is nothing to check to see if the state file exists before deleting it. It may not exist, which would create an exception. This patch allows clear to be called at any time. This will be needed for the following patch.
Mon, 05 Oct 2015 16:34:17 -0700 histedit: add inprogress method to state class
Christian Delahousse <cdelahousse@fb.com> [Mon, 05 Oct 2015 16:34:17 -0700] rev 26582
histedit: add inprogress method to state class If a histedit is progress, the 'histedit-state' file should exist. The patch implements a convenience function to do check if a histedit is in progress. This method will be use in next patch in the series.
Fri, 09 Oct 2015 03:53:47 +0900 commands: use dirstateguard instead of begin/end-parentchange for backout
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:47 +0900] rev 26581
commands: use dirstateguard instead of begin/end-parentchange for backout Before this patch, "hg backout" uses 'begin'/'end'-'parentchange()' of 'dirstate' class to avoid writing incomplete dirstate changes out at failure. But this framework doesn't work as expected, if 'dirstate.write()' is invoked between them. In fact, in-memory dirstate changes may be written out at 'repo.status()' implied by 'merge.update()', even before this patch. To restore dirstate as expected at failure of "hg backout", this patch uses 'dirstateguard' instead of 'begin'/'end'-'parentchange()'.
Fri, 09 Oct 2015 03:53:47 +0900 commands: make "hg import" use dirstateguard only for --no-commit
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:47 +0900] rev 26580
commands: make "hg import" use dirstateguard only for --no-commit Previous patch made dirstate changes in a transaction scope "all or nothing". Therefore, 'dirstateguard' is meaningless, if its scope is as same as one of the related transaction. Before this patch, "hg import" uses 'dirstateguard' always, but transaction is also started if '--no-commit' isn't specified. To avoid redundancy, this patch makes "hg import" use dirstateguard only if transaction isn't started (= '--no-commit' is specified). In this patch, 'if dsguard' can be examined safely, because 'dsguard' is initialized (with None) before outermost 'try'.
Fri, 09 Oct 2015 03:53:46 +0900 cmdutil: stop tryimportone from using dirstateguard (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:46 +0900] rev 26579
cmdutil: stop tryimportone from using dirstateguard (BC) There is no user of 'cmdutil.tryimportone()' other than 'commands.import_()', which can restore dirstate at failure of applying patches by transaction or dirstateguard. Therefore, it is reasonable to stop 'tryimportone()' from using redundant 'dirstateguard', even though it changes behavior of 'tryimportone()'. After this patch, 3rd party extensions should use 'dirstateguard' or so explicitly, if they want to restore dirstate at failure of importing a patch.
Fri, 09 Oct 2015 03:53:46 +0900 dirstate: remove meaningless dirstateguard
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:46 +0900] rev 26578
dirstate: remove meaningless dirstateguard Previous patch made dirstate changes in a transaction scope "all or nothing". Therefore, 'dirstateguard' is meaningless, if its scope is as same as one of the related transaction. This patch removes such meaningless 'dirstateguard' usage.
Fri, 09 Oct 2015 03:53:46 +0900 localrepo: execute appropriate actions for dirstate at releasing transaction
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:46 +0900] rev 26577
localrepo: execute appropriate actions for dirstate at releasing transaction Before this patch, in-memory dirstate changes are still kept over a transaction scope boundary regardless of the result of it. For "all or nothing" policy of the transaction, in-memory dirstate changes should be: - written out at successful closing a transaction, because subsequent 'dirstate.invalidate()' can lose them - discarded at failure of a transaction, because outer 'wlock.release()' or so may write them out To discard all changes in a transaction completely, this patch also restores '.hg/dirstate' by '.hg/journal.dirstate' at failure, because 'transaction' itself does nothing for files related to '.hg/journal.*' in such case (therefore, renaming in this patch is safe enough). This is a part of preparations for "transactional dirstate". See also the wiki page below for detail about it. https://mercurial.selenic.com/wiki/DirstateTransactionPlan This patch also removes redundant 'dirstate.invalidate()' just before aborting a transaction for shelve/unshelve.
Fri, 09 Oct 2015 03:53:46 +0900 transaction: add releasefn to notify the end of a transaction scope
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Oct 2015 03:53:46 +0900] rev 26576
transaction: add releasefn to notify the end of a transaction scope 'releasefn' is used by subsequent patch, to do appropriate action according to the result of it at the end of a transaction scope. To ensure that 'releasefn' is invoked only once, this patch invokes it after assignment 'self.journal = None', because such assignment prevents from invoked 'transaction._abort()' again via '__del__()'. def __del__(self): if self.journal: self._abort()
Wed, 07 Oct 2015 23:35:30 -0700 filemerge: move post-merge checks into a separate function
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Oct 2015 23:35:30 -0700] rev 26575
filemerge: move post-merge checks into a separate function This makes the overall filemerge function easier to follow, and makes upcoming work simpler.
Thu, 08 Oct 2015 14:18:43 -0700 filemerge._xmerge: drop no longer necessary 'if r:' check
Siddharth Agarwal <sid0@fb.com> [Thu, 08 Oct 2015 14:18:43 -0700] rev 26574
filemerge._xmerge: drop no longer necessary 'if r:' check Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
Thu, 08 Oct 2015 14:17:31 -0700 filemerge._idump: drop no longer necessary 'if r:' check
Siddharth Agarwal <sid0@fb.com> [Thu, 08 Oct 2015 14:17:31 -0700] rev 26573
filemerge._idump: drop no longer necessary 'if r:' check Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
Thu, 08 Oct 2015 14:16:19 -0700 filemerge._merge: drop no longer necessary 'if r:' check
Siddharth Agarwal <sid0@fb.com> [Thu, 08 Oct 2015 14:16:19 -0700] rev 26572
filemerge._merge: drop no longer necessary 'if r:' check Cleanup from an earlier patch to make premerge be directly called from the main filemerge function.
Mon, 05 Oct 2015 02:33:45 -0700 revset: delete _updatedefaultdest as it has no users
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 02:33:45 -0700] rev 26571
revset: delete _updatedefaultdest as it has no users The revset is not used anywhere anymore. We delete the function until we use (and therefore test it again).
Mon, 28 Sep 2015 22:11:23 -0700 merge: get the default update destination from the function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 28 Sep 2015 22:11:23 -0700] rev 26570
merge: get the default update destination from the function There is no value in using the revset instead of the extracted function.
Mon, 05 Oct 2015 01:46:47 -0700 update: move default destination computation to a function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 01:46:47 -0700] rev 26569
update: move default destination computation to a function We ultimately want this to be accessible through a revset, but there is too much complexity here for that to work. Especially we'll have to return more than just the destination to control the behavior (eg: bookmarks to activate, etc). To prevent cycle, a new module is created, it will receive other destination/behavior function in the future.
Thu, 08 Oct 2015 10:57:03 -0700 worker: restore old countcpus code (issue4869)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2015 10:57:03 -0700] rev 26568
worker: restore old countcpus code (issue4869) This is a backout of d29859cfcfc2. The stdlib implementation of multiprocessing.cpu_count() attempts to invoke a process on BSD and Darwin platforms (at least on 2.7). Under certain conditions (such as cwd being removed) this could raise. Our old code was silently catching the exception. The old code was more robust, so restore it.
Wed, 07 Oct 2015 21:22:16 -0700 filemerge: call premerge directly from main merge function
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Oct 2015 21:22:16 -0700] rev 26567
filemerge: call premerge directly from main merge function The merge code currently does (in pseudocode): for f in tomerge: premerge f merge f We'd like to change this to look more like: for f in tomerge: premerge f for f in tomerge: merge f This makes sure as many files are resolved as possible before prompting for the others. This restructuring is also necessary for custom merge drivers. This function separates out the premerge step from the merge step. In future patches we'll actually turn these into separate steps in the merge driver. The 'if r:' occurrences will be cleaned up in subsequent patches.
Mon, 05 Oct 2015 16:19:54 -0700 bundle2: allow lazily acquiring the lock
Durham Goode <durham@fb.com> [Mon, 05 Oct 2015 16:19:54 -0700] rev 26566
bundle2: allow lazily acquiring the lock In the external pushrebase extension, it is valuable to be able to do some work without taking the lock (like running expensive hooks). This enables significantly higher commit throughput. This patch adds an option to lazily acquire the lock. It means that all bundle2 part handlers that require writing to the repo must first call op.gettransction(), when in this mode.
Tue, 06 Oct 2015 14:42:29 -0700 bundle2: add op.gettransaction() to handlers that need the lock
Durham Goode <durham@fb.com> [Tue, 06 Oct 2015 14:42:29 -0700] rev 26565
bundle2: add op.gettransaction() to handlers that need the lock A future patch will allow the bundle2 lock be taken lazily. We need to introduce transaction-gets to each handler that needs the lock. The tests caught these issues when I added lazy locking.
Thu, 08 Oct 2015 17:44:22 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 08 Oct 2015 17:44:22 -0500] rev 26564
merge with stable
Thu, 01 Oct 2015 23:13:57 -0700 patchbomb: add a 'bundletype' config under 'patchbomb'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 01 Oct 2015 23:13:57 -0700] rev 26563
patchbomb: add a 'bundletype' config under 'patchbomb' patchbomb relies on the 'hg bundle' command to generate an attached bundle using --bundle. However, while 'hg bundle' has a --type option, patchbomb did not. This is becoming very relevant since we are about to issue bundle2 for general-delta repository. This was tracked as issue4863
Wed, 07 Oct 2015 13:05:25 -0700 import: allow processing of extra part header after import
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 07 Oct 2015 13:05:25 -0700] rev 26562
import: allow processing of extra part header after import As we have a way for extension to add more header, we need a way for them to actually process them. We add a basic hook point to do extra work after the import have been committed.
Tue, 06 Oct 2015 09:51:24 -0700 import: allow processing of extra part header during import
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 09:51:24 -0700] rev 26561
import: allow processing of extra part header during import As we have a way for extension to add more header, we need a way for them to actually process them. We add a basic hook points to alter the changeset (especially extra) before we commit. There would be more to do for a full featured hooking, but this currently fit my needs.
Tue, 06 Oct 2015 02:23:21 -0700 extract: parse 'nodeid' using the generic mechanism
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:23:21 -0700] rev 26560
extract: parse 'nodeid' using the generic mechanism Parsing 'nodeid' is very simple and a good first test.
Tue, 06 Oct 2015 02:22:23 -0700 extract: parse 'branch' using the generic mechanism
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:22:23 -0700] rev 26559
extract: parse 'branch' using the generic mechanism Parsing 'branch' is very simple and a good first test.
Wed, 07 Oct 2015 01:13:36 -0700 extract: parse 'date' using the generic mechanism
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 07 Oct 2015 01:13:36 -0700] rev 26558
extract: parse 'date' using the generic mechanism Parsing 'date' is very simple and a good first test.
Wed, 07 Oct 2015 01:20:49 -0700 extract: add some facility for extensible header parsing
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 07 Oct 2015 01:20:49 -0700] rev 26557
extract: add some facility for extensible header parsing We need a way for extension to extend the header we can parse. We start with a very simple mechanism that will be used in the next changeset.
Tue, 06 Oct 2015 02:16:24 -0700 extract: remove the 'user' variable
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:16:24 -0700] rev 26556
extract: remove the 'user' variable It is not heavily used enough to justify being something other than a dictionary entry.
Tue, 06 Oct 2015 02:11:09 -0700 extract: use a single return
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:11:09 -0700] rev 26555
extract: use a single return The differences between both returns are now very thin, we factor out that part.
Wed, 07 Oct 2015 00:50:53 -0700 extract: move 'nodeid' assignment where it is parsed
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 07 Oct 2015 00:50:53 -0700] rev 26554
extract: move 'nodeid' assignment where it is parsed The is one setter and no consumer, we can move it there directly.
Tue, 06 Oct 2015 02:08:32 -0700 extract: move 'date' assignment where it is parsed
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:08:32 -0700] rev 26553
extract: move 'date' assignment where it is parsed There is one setter and no consumer, we can move it there directly.
Tue, 06 Oct 2015 02:07:33 -0700 extract: assign user to 'data' earlier
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:07:33 -0700] rev 26552
extract: assign user to 'data' earlier This is used in both case, we can assign it once.
Tue, 06 Oct 2015 02:06:36 -0700 extract: move 'branch' assignment where it is parsed
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:06:36 -0700] rev 26551
extract: move 'branch' assignment where it is parsed There is one setter and no consumer, we can move it there directly.
Tue, 06 Oct 2015 02:05:56 -0700 extract: directly assign parent to data dictionary
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:05:56 -0700] rev 26550
extract: directly assign parent to data dictionary The temporary variables are not adding anything.
Tue, 06 Oct 2015 02:04:46 -0700 extract: assign message only once
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:04:46 -0700] rev 26549
extract: assign message only once This return is shared between the two cases. We can move it earlier.
Tue, 06 Oct 2015 02:04:06 -0700 extract: simplify parents assignement
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:04:06 -0700] rev 26548
extract: simplify parents assignement We move to the more standard style of: value = default if special: value = other This is more consistent and compact.
Tue, 06 Oct 2015 02:01:53 -0700 patch: move 'extract' return to a dictionnary
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 02:01:53 -0700] rev 26547
patch: move 'extract' return to a dictionnary The final goal here is to be able to parse, return and process arbitrary data from patch. This mirror the recently added ability to add arbitrary data to patch headers. The first step is to return something more flexible, so we return a dict without changing any other logic.
Tue, 06 Oct 2015 01:49:04 -0700 patchbomb: add experimental config of a "pullurl" and export it
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 06 Oct 2015 01:49:04 -0700] rev 26546
patchbomb: add experimental config of a "pullurl" and export it This config allows to specify a public location where your changeset can be found. It then include a dedicated patch header show a command to be used to retrieve the change. See the test for example. This is flagged as experimental because this feature is not safe until we have more logic to test that: - changeset actually exists on destination - changeset is draft on destination. As all this is experimental, bike shedding can happily happens before we remove the experimental flag.
Mon, 05 Oct 2015 23:17:01 -0700 export: introduce a generic way to add patch header on export
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 23:17:01 -0700] rev 26545
export: introduce a generic way to add patch header on export Extensions currently have no easy way to add data to exported patch. This is now fixed using a generic mechanism in the same fashion used by bundle2. Tests are coming in the next changeset with its first user.
Mon, 05 Oct 2015 00:23:20 -0700 incoming: request a bundle2 when possible (BC)
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 00:23:20 -0700] rev 26544
incoming: request a bundle2 when possible (BC) Incoming was using bundle1 in all cases, as bundle1 is restricted to changegroup1 and does not support general delta, this can lead to significant CPU overhead if the server is using general delta storage. We now properly request and store a bundle2 to disk. If the server include any output or error in the bundle, they will be stored on disk and replayed when the bundle is read. As 'hg incoming' is going to read the bundle right away, we call that 'good' enough and go back to the bigger plan of having general delta on by default. This was tracked as 4864
Mon, 05 Oct 2015 00:18:11 -0700 bundlerepo: indent some code to prepare next patch
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 05 Oct 2015 00:18:11 -0700] rev 26543
bundlerepo: indent some code to prepare next patch We are about to add a new condition. Code is indented in a separated patch for readability.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip