Wed, 01 Oct 2014 23:40:23 -0500 bundle2: change header size and make them signed (new format)
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 01 Oct 2014 23:40:23 -0500] rev 23009
bundle2: change header size and make them signed (new format) We are changing all integers that denote the size of a chunk to read to int32. There are two main motivations for that. First, we change everything to the same width (32 bits) to make it possible for a reasonably agnostic actor to forward a bundle2 without any extra processing. With this change, this could be achieved by just reading int32s and forwarding chunks of the size read. A bit a smartness would be logic to detect the end of stream but nothing too complicated. Second, we need some capacity to transmit special information during the bundle processing. For example we would like to be able to raise an exception while a part is being read if this exception happend while this part was generated. Having signed integer let us use negative numbers to trigger special events during the parsing of the bundle. The format is renamed for B2X to B2Y because this breaks binary compatibility. The B2X format support is dropped. It was experimental to allow this kind of things. All elements not directly related to the binary format remain flagged "b2x" because they are still compatible.
Tue, 14 Oct 2014 02:32:26 -0700 bundle2: extract processing of part into its own function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 02:32:26 -0700] rev 23008
bundle2: extract processing of part into its own function This is code movement only. This will be useful to have it separated for reuse purposes. We plan to introduce a new feature to the bundle format that allow inserting a part in the middle of another part payload. This will be useful to transmit a exception raised during a part generation.
Tue, 14 Oct 2014 13:23:03 -0700 bundle2: add a test for exceptions raised during the generation process
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 13:23:03 -0700] rev 23007
bundle2: add a test for exceptions raised during the generation process We would like exceptions raised during the generation process to be gracefully handled on the receiver side. We add a test for it. It shows that we are not doing it yet.
Wed, 08 Oct 2014 02:43:51 -0700 dagwalker: drop a useless intermediate variable
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Oct 2014 02:43:51 -0700] rev 23006
dagwalker: drop a useless intermediate variable The variable used to contain revs.set() but as the `.set()` has been removed it is now useless.
Sat, 11 Oct 2014 01:39:20 -0700 revset-node: speedup by a few hundred fold
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Oct 2014 01:39:20 -0700] rev 23005
revset-node: speedup by a few hundred fold Instead of checking all elements of the subset against a single rev, just check if this rev is in the subset. The old way was inherited from when the subset was a list. Non surprise, this provide massive speedup. id("d82e2223f132") before) wall 0.008205 comb 0.000000 user 0.000000 sys 0.000000 (best of 302) after) wall 0.000069 comb 0.000000 user 0.000000 sys 0.000000 (best of 34518) revset #1: public() and id("d82e2223f132") before) wall 0.019763 comb 0.020000 user 0.020000 sys 0.000000 (best of 124) after) wall 0.000101 comb 0.000000 user 0.000000 sys 0.000000 (best of 20130)
Fri, 10 Oct 2014 17:28:18 -0700 revset-only: use `subset &` instead of filtering
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Oct 2014 17:28:18 -0700] rev 23004
revset-only: use `subset &` instead of filtering The & version is more likely to be optimised. only(.) before) wall 0.003216 comb 0.000000 user 0.000000 sys 0.000000 (best of 768) after) wall 0.001086 comb 0.000000 user 0.000000 sys 0.000000 (best of 2231) only(default, stable) before) wall 0.018469 comb 0.020000 user 0.020000 sys 0.000000 (best of 138) after) wall 0.015888 comb 0.010000 user 0.010000 sys 0.000000 (best of 156)
Tue, 30 Sep 2014 15:03:54 -0500 revset-_ancestor: use & instead of filter
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 30 Sep 2014 15:03:54 -0500] rev 23003
revset-_ancestor: use & instead of filter The & operation is more likely optimised. ::10 before) wall 0.028189 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) after) wall 0.001050 comb 0.000000 user 0.000000 sys 0.000000 (best of 2326) ::tip before) wall 0.081132 comb 0.080000 user 0.080000 sys 0.000000 (best of 100) after) wall 0.055418 comb 0.050000 user 0.050000 sys 0.000000 (best of 100)
Thu, 16 Oct 2014 14:46:37 -0700 obsstore: record data as floating point in fm0 format
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 16 Oct 2014 14:46:37 -0700] rev 23002
obsstore: record data as floating point in fm0 format For python struct module, "d" is double. But for python string formating, "d" is integer. We want to preserve the floating point nature of the data, so we store it in the metadata as floating point. We use "%r" to make sure we get as many significant digitis as necessary to restore the float to the exact same value on the other side. The fm1 is transmitting the information as float. The lack of this made fm1-stored markers not survive a round-trip to fm0 leading to duplicated markers (or two markers very alike).
Tue, 14 Oct 2014 01:27:25 -0700 bundle2: add a comment about addchangegroup source and url
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 01:27:25 -0700] rev 23001
bundle2: add a comment about addchangegroup source and url
Wed, 15 Oct 2014 04:19:37 -0700 pull: call the `b2x-transactionclose` hook when closing the transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Oct 2014 04:19:37 -0700] rev 23000
pull: call the `b2x-transactionclose` hook when closing the transaction We need a wider set of hooks to process all the changes that happened during the pull transaction. We reuse the experimental `b2x-transactionclose` hook set from server's unbundle for consistency. This hook is experimental and will not remains as-is forever, but this will open the door for experimentation in 3.2.
Wed, 08 Oct 2014 02:45:21 -0700 revset-only: use __nonzero__ to check if a revset is empty
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 08 Oct 2014 02:45:21 -0700] rev 22999
revset-only: use __nonzero__ to check if a revset is empty For some smartsets, computing length is more expensive than checking if the set is empty.
Wed, 15 Oct 2014 12:38:47 -0700 _spanset: drop __getitem__ implementation
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Oct 2014 12:38:47 -0700] rev 22998
_spanset: drop __getitem__ implementation It is expensive and not part of the official smartset API.
Wed, 15 Oct 2014 12:38:32 -0700 filteredset: drop __getitem__ implementation
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Oct 2014 12:38:32 -0700] rev 22997
filteredset: drop __getitem__ implementation It is expensive and not part of the official smartset API.
Wed, 15 Oct 2014 04:28:55 -0700 generatorset: implement __len__
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Oct 2014 04:28:55 -0700] rev 22996
generatorset: implement __len__ It was the only smartset class without a `__len__` implementation.
Wed, 15 Oct 2014 04:26:23 -0700 revset: make __len__ part of the offical API
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 15 Oct 2014 04:26:23 -0700] rev 22995
revset: make __len__ part of the offical API It is common for code to ask for the length of a revset. In fact, all but generatorset already implement it.
Sat, 04 Oct 2014 16:46:50 +0900 cmdserver: add service that listens on unix domain socket and forks process
Yuya Nishihara <yuya@tcha.org> [Sat, 04 Oct 2014 16:46:50 +0900] rev 22994
cmdserver: add service that listens on unix domain socket and forks process Typical use case of 'unix' mode is a background hg daemon. $ hg serve --cmdserver unix --cwd / -a /tmp/hg-`id -u`.sock Unlike 'pipe' mode in which parent process keeps stdio channel, 'unix' server can be detached. So clients can freely connect and disconnect from server, saving Python start-up time. It might be better to write "--cmdserver socket -a unix:/sockpath" instead of "--cmdserver unix -a /sockpath" in case hgweb gets the ability to listen on unix domain socket.
Sat, 27 Sep 2014 19:18:20 +0900 test-commandserver: add connector for unix domain socket server
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 19:18:20 +0900] rev 22993
test-commandserver: add connector for unix domain socket server The next patch will introduce --cmdserver unix.
Sat, 27 Sep 2014 23:14:26 +0900 test-commandserver: allow check() to make connection in different way
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 23:14:26 +0900] rev 22992
test-commandserver: allow check() to make connection in different way The next patch will add connector for 'unix' mode server.
Sat, 27 Sep 2014 22:39:01 +0900 test-commandserver: remove unused repopath argument from check()
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 22:39:01 +0900] rev 22991
test-commandserver: remove unused repopath argument from check() Instead of repopath, check() will receive connect() function as argument. It will allow to connect to server of different mode.
Sat, 27 Sep 2014 15:10:14 +0900 cmdserver: make server streams switchable
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 15:10:14 +0900] rev 22990
cmdserver: make server streams switchable In 'unix' mode, server instance will be created per connection, and fin/fout are set to socket files.
Sat, 27 Sep 2014 15:04:46 +0900 cmdserver: switch service objects by mode
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 15:04:46 +0900] rev 22989
cmdserver: switch service objects by mode server class will be changed to accept fin/fout pair instead of mode string so that it can interact with socket files.
Sat, 27 Sep 2014 14:52:09 +0900 cmdserver: wrap 'pipe' mode server by service object
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 14:52:09 +0900] rev 22988
cmdserver: wrap 'pipe' mode server by service object This is the stub for new mode that will listen for connections on unix domain socket. Though --daemon option is not banned in 'pipe' mode, it is useless because the detached 'pipe' mode server exits immediately due to null stdin. Should it abort if --daemon is specified with --cmdserver pipe or --stdio?
Thu, 16 Oct 2014 14:55:45 -0400 histedit: miscellaneous style cleanups
Augie Fackler <raf@durin42.com> [Thu, 16 Oct 2014 14:55:45 -0400] rev 22987
histedit: miscellaneous style cleanups Fix some mis-wrapped lines, re-wrap some lines to be more compact, remove superfluous parens.
Thu, 16 Oct 2014 14:51:15 -0400 histedit: update docstring on histeditstate.read()
Augie Fackler <raf@durin42.com> [Thu, 16 Oct 2014 14:51:15 -0400] rev 22986
histedit: update docstring on histeditstate.read() The docstring showed the previous class-less heritage of read(). Now that it's classy, update the docstring.
Thu, 16 Oct 2014 14:49:46 -0400 histedit: remove now-superfluous repo argument from processreplacement
Augie Fackler <raf@durin42.com> [Thu, 16 Oct 2014 14:49:46 -0400] rev 22985
histedit: remove now-superfluous repo argument from processreplacement Spotted by Olle on the mailing list during review.
Wed, 15 Oct 2014 08:38:36 -0700 histedit: move locks into state
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 08:38:36 -0700] rev 22984
histedit: move locks into state Allow action functions to control the locks. This is necessary for an implementation of x/exec or similar.
Wed, 15 Oct 2014 08:38:16 -0700 histedit: read state from histeditstate
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 08:38:16 -0700] rev 22983
histedit: read state from histeditstate Read the state in histeditstate. This allows us to correctly update internal variables when necessary without having to recreate a new state. When we read a state in _histedit state while we will already have state passed from histedit(), we can read the state in place and don't have to merge two histeditstates.
Wed, 15 Oct 2014 08:18:26 -0700 histedit: pass state to action functions
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 08:18:26 -0700] rev 22982
histedit: pass state to action functions
Thu, 16 Oct 2014 10:06:49 -0700 histedit: pass state to processreplacement
David Soria Parra <davidsp@fb.com> [Thu, 16 Oct 2014 10:06:49 -0700] rev 22981
histedit: pass state to processreplacement
Wed, 15 Oct 2014 08:06:15 -0700 histedit: pass state to boostrapcontinue
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 08:06:15 -0700] rev 22980
histedit: pass state to boostrapcontinue Pass the state to boostrapcontinue and remove the unecessary passing of repo.
Wed, 15 Oct 2014 17:11:54 -0700 histedit: let the state expose a context but serialize correctly to nodes
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 17:11:54 -0700] rev 22979
histedit: let the state expose a context but serialize correctly to nodes The histedit code often expects a context. However histedit hands around the tuple for the serialization and therefore hand over a parentctxnode. This leads to code having to return a context based on the parentctxnode. We let the state only return a context but correctly serialize and deserialze to a node.
Wed, 15 Oct 2014 17:30:57 -0700 histedit: add clear method to remove state
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 17:30:57 -0700] rev 22978
histedit: add clear method to remove state Encapsulate the unlinking histedit-state and use the vfs layer instead of os.unlink.
Tue, 14 Oct 2014 20:35:17 -0700 histedit: use state object where necessary
David Soria Parra <davidsp@fb.com> [Tue, 14 Oct 2014 20:35:17 -0700] rev 22977
histedit: use state object where necessary We are using the properties from the state object where necessary and ensure that the state is set correctly.
Wed, 15 Oct 2014 17:17:12 -0700 histedit: add histedit state class
David Soria Parra <davidsp@fb.com> [Wed, 15 Oct 2014 17:17:12 -0700] rev 22976
histedit: add histedit state class Add an histeditstate class that is intended to hold the current state. This allows us encapsulate the state and avoids passing around a tuple which is based on the serialization format. In particular this will give actions more control over the state and allow external sources to have more control of histedits behavior, e.g. an external implementation of x/exec.
Fri, 17 Oct 2014 02:07:05 +0900 import-checker: check modules for pure Python build correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Oct 2014 02:07:05 +0900] rev 22975
import-checker: check modules for pure Python build correctly Before this patch, "import-checker.py" just replaces "/" in specified filenames by ".". This makes modules for pure Python build belong to "mercurial.pure" package, and prevents "import-checker.py" from correctly checking about cyclic dependency in them. This patch discards "pure" component from fully qualified name of such modules. To avoid discarding "pure" from the module name of standard libraries unexpectedly, this patch allows "dotted_name_of_path" to discard "pure" only from Mercurial specific modules, which are specified via command line arguments.
Fri, 17 Oct 2014 02:07:05 +0900 import-checker: treat "from mercurial import XXXX" style correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Oct 2014 02:07:05 +0900] rev 22974
import-checker: treat "from mercurial import XXXX" style correctly Before this patch, "import-checker.py" assumes that the name of Mercurial module recognized by "imported_modules" doesn't have package part: for example, "util". This is reason why "import-checker.py" always builds fully qualified module name up relatively, if the given module doesn't belong to standard Python library. But in fact, modules imported in "from mercurial import XXXX" style already have fully qualified name: for example, "mercurial.util" module imported by "mercurial.parsers" is treated as "mercurial.mercurial.util" because of building module name up relatively. This prevents "import-checker.py" from correctly checking about cyclic dependency in them. This patch avoids building module name up relatively, also if module name starts with "mercurial.", to treat modules imported in "from mercurial import XXXX" style correctly.
Fri, 17 Oct 2014 02:07:04 +0900 encoding: avoid cyclic dependency around "parsers" in pure Python build
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 17 Oct 2014 02:07:04 +0900] rev 22973
encoding: avoid cyclic dependency around "parsers" in pure Python build 80f2b63dd83a brought "asciilower" and "import parsers" into "encoding.py". This works fine with "parsers" module in C implementation, but doesn't with one in pure Python implementation, because the latter causes cyclic dependency below and aborting execution: util => i18n => encoding => parsers => util This patch delays importing "parsers" module until it is really needed, to avoid cyclic dependency around "parsers" in pure Python build.
Tue, 14 Oct 2014 01:40:04 -0700 pull: add source information to the transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 01:40:04 -0700] rev 22972
pull: add source information to the transaction The source information can, should be applied once when opening the transaction for the pull. This will lets element processed within a bundle2 be aware of them and open the door to running a set of hooks when closing this pull transaction. This is similar to what is done in server's unbundle call.
Tue, 14 Oct 2014 00:06:46 -0700 changegroup: store source and url in the `hookargs` dict
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 00:06:46 -0700] rev 22971
changegroup: store source and url in the `hookargs` dict We store the source and url of the current data into `transaction.hookargs` this let us inherit it from upper layers that may have created a much wider transaction. We have to modify bundle2 at the same time to register the source and url in the transaction. We have to do it in the same patch otherwise, the `addchangegroup` call would fill these values and the hook calling will crash because of the duplicated 'source' and 'url' arguments passed to the hook call.
Tue, 14 Oct 2014 00:43:20 -0700 prechangegroup: use hook argument from the transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 00:43:20 -0700] rev 22970
prechangegroup: use hook argument from the transaction There can be useful data in there (eg: bundle2 related one)
Tue, 14 Oct 2014 00:09:25 -0700 addchangegroup: call `prechangegroup` hook after transaction retrieval
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 00:09:25 -0700] rev 22969
addchangegroup: call `prechangegroup` hook after transaction retrieval We want to reused some possible information stored in the transaction `hookargs` dict that may be stored by something handling the transaction at an upper level (eg: bundle2) So we move the running of the hooks after transaction creation. This has no visible effects (but an empty transaction roolback if the hook fails) because nothing had happened in the transaction yet.
Tue, 14 Oct 2014 00:03:03 -0700 addchangegroup: get the `node` argument of `incoming` hook from transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Oct 2014 00:03:03 -0700] rev 22968
addchangegroup: get the `node` argument of `incoming` hook from transaction The transaction is now carrying hook-related informations. So we use it to retrieve the `node` argument. This will also carry around all kinds of other useful informations (like: "are we in a bundle2 processing")
Tue, 14 Oct 2014 23:53:35 -0700 dicthelpers: delete now that they are no longer used
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 14 Oct 2014 23:53:35 -0700] rev 22967
dicthelpers: delete now that they are no longer used
Tue, 14 Oct 2014 23:18:07 -0700 manifest: transpose pair of pairs from diff()
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 14 Oct 2014 23:18:07 -0700] rev 22966
manifest: transpose pair of pairs from diff() It makes more sense for the file nodeids and returned from diff() to be ((n1,fl1),(n2,fl2)) than ((n1,n2),(fl1,fl2)), so change it to the former.
Tue, 14 Oct 2014 22:48:44 -0700 manifest: for diff(), only iterate over files, not flags
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 14 Oct 2014 22:48:44 -0700] rev 22965
manifest: for diff(), only iterate over files, not flags From manifest.diff(), we return a dict from filename to pairs of pairs of file nodeids and flags (values of the form ((n1,n2),(fl1,fl2))). To create this dict, we currently generate one dict for files (with (n1,n2) values) and one for flags (with (fl1,fl2) values) and then join these dicts. Missing files are represented by None and missing flags by '', but due to the dict joining, the inner pairs themselves can also be None. The only caller, merge.manifestmerge(), then unpacks these values while checking for None values. By inlining the calls to dicthelpers and simplifying it to only iterate over files (ignoring flags-only differences), we can simplify life for our caller.
Tue, 14 Oct 2014 17:09:16 -0700 manifest: repurpose flagsdiff() into (node-and-flag)diff()
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 14 Oct 2014 17:09:16 -0700] rev 22964
manifest: repurpose flagsdiff() into (node-and-flag)diff() The manifestdict class already has a method for diff flags between two manifests (presumably because there is no full access to the private _flags field). The only caller is merge.manifestmerge(), which also wants a diff of files between the same manifests. Let's combine the code for diffing files and flags into a single method on manifestdict. This puts all the manifest diffing in one place and will allow for further simplification. It might also be useful for it to be encapsulated in manifestdict if we later decide to to shard manifests. The docstring is intentionally unclear about missing entries for now.
Thu, 16 Oct 2014 17:03:21 +0900 util: add a file handle wrapper class that does hash digest validation
Mike Hommey <mh@glandium.org> [Thu, 16 Oct 2014 17:03:21 +0900] rev 22963
util: add a file handle wrapper class that does hash digest validation It is going to be used for the remote-changegroup feature in bundle2.
Thu, 16 Oct 2014 17:02:51 +0900 util: add a helper class to compute digests
Mike Hommey <mh@glandium.org> [Thu, 16 Oct 2014 17:02:51 +0900] rev 22962
util: add a helper class to compute digests It is going to be used for the remote-changegroup feature in bundle2.
Thu, 16 Oct 2014 16:03:04 +0900 bundle2: merge return values when bundle contains multiple changegroups
Mike Hommey <mh@glandium.org> [Thu, 16 Oct 2014 16:03:04 +0900] rev 22961
bundle2: merge return values when bundle contains multiple changegroups A bundle2 may contain multiple parts adding changegroups, in which case there are multiple operation records for changegroups, each with its own return value. Those multiple return values are aggregated in a single cgresult value for the whole operation. As can be seen in the associated test case, the situation with hooks is not really the best, but without deeper thoughts and changes, we can't do much better. Hopefully, things will be improved before bundle2 is enabled by default. In the meanwhile, multiple changegroups is not expected to be in widespread use, and even less expected to be used for pushes. Also, not many clients cloning or pulling bundle2 with multiple changesets are not expected to have changegroup hooks anyways.
Thu, 16 Oct 2014 15:54:53 +0900 changegroup: use a copy of hookargs when invoking the changegroup hook
Mike Hommey <mh@glandium.org> [Thu, 16 Oct 2014 15:54:53 +0900] rev 22960
changegroup: use a copy of hookargs when invoking the changegroup hook addchangegroup creates a runhook function that is used to invoke the changegroup and incoming hooks, but at the time the function is called, the contents of hookargs associated with the transaction may have been modified externally. For instance, bundle2 code affects it with obsolescence markers and bookmarks info. It also creates problems when a single transaction is used with multiple changegroups added (as per an upcoming change), whereby the contents of hookargs are that of after adding a latter changegroup when invoking the hook for the first changegroup.
Thu, 16 Oct 2014 13:48:51 +0900 tests: pull common http server setup out of individual tests
Mike Hommey <mh@glandium.org> [Thu, 16 Oct 2014 13:48:51 +0900] rev 22959
tests: pull common http server setup out of individual tests There are currently two different tests using roughly the same code to create temporary scripts acting as HTTP servers. As there is going to be at least one more in an upcoming change, factor those out in a standalone dumbhttp.py script.
Wed, 24 Sep 2014 16:00:47 +0900 util: move md5 back next to sha1 and allow to call it without an argument
Mike Hommey <mh@glandium.org> [Wed, 24 Sep 2014 16:00:47 +0900] rev 22958
util: move md5 back next to sha1 and allow to call it without an argument This effectively backs out changeset 908c5906091b. The API change is done so that both util.sha1 and util.md5 can be called the same way. The function is moved in order to use it for md5 checksumming for an upcoming bundle2 feature.
Thu, 16 Oct 2014 03:22:51 -0700 test-bundle2-exchange: do not drop HG_NODE from the hook output
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 16 Oct 2014 03:22:51 -0700] rev 22957
test-bundle2-exchange: do not drop HG_NODE from the hook output HG_NODE is precisely something we would like to test.
Tue, 14 Oct 2014 13:34:57 -0700 obsolete: update test-commit-amend to use obsolete option
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:34:57 -0700] rev 22956
obsolete: update test-commit-amend to use obsolete option This test actually used the obs.py file as part of the test, so we need to fix up the test a little more than usual to work with the new obsolete option flags.
Tue, 14 Oct 2014 13:34:25 -0700 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:34:25 -0700] rev 22955
obsolete: update tests to use obsolete options The obsolete._enabled flag has become a config option. This updates all but one of the tests to use the minimal number of flags necessary for them to pass. For most tests this is just 'createmarkers', for a couple tests it's 'allowunstable', and for even fewer it's 'exchange'.
Tue, 14 Oct 2014 13:27:00 -0700 obsolete: prevent options from being used without createmarkers
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:27:00 -0700] rev 22954
obsolete: prevent options from being used without createmarkers exchange and allowunstable should only be enabled if createmarkers is enabled, so check for that and raise an exception if that's not the case.
Tue, 14 Oct 2014 13:26:01 -0700 obsolete: add exchange option
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:26:01 -0700] rev 22953
obsolete: add exchange option This adds an option that enables obsolete marker exchange.
Tue, 14 Oct 2014 13:25:13 -0700 obsolete: add allowunstable option
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:25:13 -0700] rev 22952
obsolete: add allowunstable option This option allows the creation of unstable commits. This allows things like amending in the middle of a stack of commits, etc.
Tue, 14 Oct 2014 13:23:52 -0700 obsolete: add createmarkers option
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:23:52 -0700] rev 22951
obsolete: add createmarkers option The basic obsolete option is allowing the creation of obsolete markers. This does not enable other features, such as allowing unstable commits or exchanging obsolete markers.
Tue, 14 Oct 2014 13:20:31 -0700 obsolete: add readonly flag to obstore constructor
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:20:31 -0700] rev 22950
obsolete: add readonly flag to obstore constructor Previously, obstore read the obsolete._enabled flag to determine whether to allow writes to the obstore. Since obsolete._enabled will be moving into a repo specific config, we can't read it globally, and therefore must pass the information into the constructor.
Tue, 14 Oct 2014 13:17:35 -0700 obsolete: add isenabled function for option checking
Durham Goode <durham@fb.com> [Tue, 14 Oct 2014 13:17:35 -0700] rev 22949
obsolete: add isenabled function for option checking Previously, obsolete used the module level _enabled flag to determine whether it was on or off. We need a bit more granular control, so we'll be introducing toggle options. The isenabled() function is how you check if a particular option is enabled for the given repository. Future patches will add options such as 'createmarkers', 'allowunstable', and 'exchange' to enable various features of obsolete markers.
Wed, 15 Oct 2014 12:52:10 -0700 obsstore: fix defaultformat option passing
Durham Goode <durham@fb.com> [Wed, 15 Oct 2014 12:52:10 -0700] rev 22948
obsstore: fix defaultformat option passing The obsstore format passing was not actually being passed to the obsstore. This fixes it.
Wed, 15 Oct 2014 15:35:59 -0400 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com> [Wed, 15 Oct 2014 15:35:59 -0400] rev 22947
tests: use $PYTHON instead of hardcoding python This makes running the testsuite with pypy possible.
Wed, 15 Oct 2014 15:13:43 -0400 checklink: always close the NamedTemporaryFile
Augie Fackler <raf@durin42.com> [Wed, 15 Oct 2014 15:13:43 -0400] rev 22946
checklink: always close the NamedTemporaryFile This fixes test-patchbomb.t when using pypy with --pure.
Mon, 13 Oct 2014 11:46:04 +0200 hgignore: ignore the PyCharm workspace folder
Angel Ezquerra <angel.ezquerra@gmail.com> [Mon, 13 Oct 2014 11:46:04 +0200] rev 22945
hgignore: ignore the PyCharm workspace folder
Wed, 15 Oct 2014 04:08:06 +0200 revset: better naming of variables containing the value of a single argument
Mads Kiilerich <madski@unity3d.com> [Wed, 15 Oct 2014 04:08:06 +0200] rev 22944
revset: better naming of variables containing the value of a single argument Calling them args is not helpful.
Tue, 14 Oct 2014 14:42:25 -0400 manifest: add docstring to text() method
Augie Fackler <raf@durin42.com> [Tue, 14 Oct 2014 14:42:25 -0400] rev 22943
manifest: add docstring to text() method
Fri, 10 Oct 2014 14:09:37 -0400 manifest: rename ambiguously-named set to setflag
Augie Fackler <raf@durin42.com> [Fri, 10 Oct 2014 14:09:37 -0400] rev 22942
manifest: rename ambiguously-named set to setflag Just makes it a little clearer what this method does.
Sun, 12 Oct 2014 08:29:31 -0700 bookmarks: inform transaction-related hooks that some bookmarks were moved
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Oct 2014 08:29:31 -0700] rev 22941
bookmarks: inform transaction-related hooks that some bookmarks were moved We do not have enough information to provide any finer data, but this is still useful information.
Sun, 12 Oct 2014 08:03:20 -0700 phases: inform transaction-related hooks that a phase was moved
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Oct 2014 08:03:20 -0700] rev 22940
phases: inform transaction-related hooks that a phase was moved We do not have enough information to provide finer data, but this is still useful information.
Mon, 13 Oct 2014 14:52:38 -0700 test-bundle2: also test the argument of the changegroup hook
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 13 Oct 2014 14:52:38 -0700] rev 22939
test-bundle2: also test the argument of the changegroup hook We also track execution of the changegroup hook. The important information here is to make sure the information that the transaction was processing a bundle2 is passed to hook. This will let most hooks disable themselves while waiting for the hook concluding bundle2 processing (the one we discovered to be not called for pull in the previous changesets).
Mon, 13 Oct 2014 14:47:36 -0700 test-bundle2: test that we got appropriate hook called with appropriate data
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 13 Oct 2014 14:47:36 -0700] rev 22938
test-bundle2: test that we got appropriate hook called with appropriate data We can notice that this transaction wide hook is only happening during push and it is missing changegroup-related information. We'll want to fix this but this is not what this patch is about.
Sun, 12 Oct 2014 06:40:36 -0700 pull: use `stepsdone` instead of `todosteps`
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Oct 2014 06:40:36 -0700] rev 22937
pull: use `stepsdone` instead of `todosteps` The push process uses a `stepsdone` attribute instead of a `todosteps` one (with the logic swapped). We unify the two process by picking the `stepsdone` version. I feel like `stepsdone` better fits extensions that would want to extend the push exchange process.
Sat, 27 Sep 2014 00:29:06 -0700 pull: make discovery phase extensible
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 27 Sep 2014 00:29:06 -0700] rev 22936
pull: make discovery phase extensible We apply the same approach as for push and make the discovery extensible. There is only one user in core right now, but we already know we'll need something smarter for obsmarkers. In fact the evolve extension could use this to cleanly extend discovery. The main motivation for this change is consistency between push and pull.
Tue, 14 Oct 2014 21:59:39 +0900 sshpeer: forward stdout of remote "hg init" to appropriate output channel
Yuya Nishihara <yuya@tcha.org> [Tue, 14 Oct 2014 21:59:39 +0900] rev 22935
sshpeer: forward stdout of remote "hg init" to appropriate output channel Otherwise, commandserver channel could be corrupted.
Wed, 03 Sep 2014 16:34:29 -0400 revlog: support importing censored file revision tombstones
Mike Edgar <adgar@google.com> [Wed, 03 Sep 2014 16:34:29 -0400] rev 22934
revlog: support importing censored file revision tombstones This change allows a revision log to not fail integrity checks when applying a changegroup delta (eg from a bundle) results in a censored file tombstone. The tombstone is inserted as-is, so future integrity verification will observe the tombstone. Deltas based on the tombstone will also remain correct. The new code path is encountered for *exactly* the cases where _addrevision is importing a tombstone from a changegroup. When committing a file containing the "magic" tombstone text, the "text" parameter will be non-empty and the checkhash call is not executed (and when committing, the node will be computed to match the "magic" tombstone text).
Tue, 14 Oct 2014 16:16:04 -0400 verify: report censored nodes if configured policy is abort
Mike Edgar <adgar@google.com> [Tue, 14 Oct 2014 16:16:04 -0400] rev 22933
verify: report censored nodes if configured policy is abort
Tue, 14 Oct 2014 15:46:16 -0400 context: handle censored data in an on-disk file context based on config
Mike Edgar <adgar@google.com> [Tue, 14 Oct 2014 15:46:16 -0400] rev 22932
context: handle censored data in an on-disk file context based on config Two possible behaviors are defined for handling censored data: abort, and ignore. When we ignore censored data we return an empty file to callers requesting the file data.
Wed, 08 Oct 2014 15:20:14 -0400 manifest: add fastdelta method to manifestdict
Augie Fackler <raf@durin42.com> [Wed, 08 Oct 2014 15:20:14 -0400] rev 22931
manifest: add fastdelta method to manifestdict This is another step closer to alternate manifest implementations that can offer different hashing algorithms.
Wed, 08 Oct 2014 15:21:59 -0400 manifest: move _search to module level and rename to _msearch
Augie Fackler <raf@durin42.com> [Wed, 08 Oct 2014 15:21:59 -0400] rev 22930
manifest: move _search to module level and rename to _msearch The rename is intended to provide a slight hint that it is manifest-specific.
Wed, 08 Oct 2014 14:47:30 -0400 manifest: move manifestdict-to-text encoding to manifest class
Augie Fackler <raf@durin42.com> [Wed, 08 Oct 2014 14:47:30 -0400] rev 22929
manifest: move manifestdict-to-text encoding to manifest class A future patch will introduce a new format, with a new class.
Fri, 03 Oct 2014 13:22:31 -0700 localrepo: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 13:22:31 -0700] rev 22928
localrepo: access status fields by name rather than index
Sat, 11 Oct 2014 22:43:14 -0700 subrepo: use separate instances of empty lists in status
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 11 Oct 2014 22:43:14 -0700] rev 22927
subrepo: use separate instances of empty lists in status We do modify the lists that make up the status in several places, so it seems risky to use the same instance of a list for several different status types. Use a separate empty list for each type instead.
Fri, 03 Oct 2014 09:29:48 -0700 summary: make status code more readable
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 09:29:48 -0700] rev 22926
summary: make status code more readable In commands.summary(), we currently zip a list of labels with a list of statuses. This means the order of the status list has to match the list of the labels, which in turn means the status elements have to be inserted into specific places in the list. Let's instead group the labels and status data we want to display in a single list of pairs.
Sat, 04 Oct 2014 20:53:05 -0700 strip: make checklocalchanges() return full status tuple
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 04 Oct 2014 20:53:05 -0700] rev 22925
strip: make checklocalchanges() return full status tuple By making checklocalchanges() return the full instance of the status class instead of just the first 4 elements of it, we can take advantage of the field names and not require the caller to remember the element indices.
Sat, 04 Oct 2014 21:58:01 -0700 fileset: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 04 Oct 2014 21:58:01 -0700] rev 22924
fileset: access status fields by name rather than index
Sat, 04 Oct 2014 21:19:44 -0700 histedit: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 04 Oct 2014 21:19:44 -0700] rev 22923
histedit: access status fields by name rather than index
Fri, 03 Oct 2014 22:12:43 -0700 shelve: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 22:12:43 -0700] rev 22922
shelve: access status fields by name rather than index
Fri, 03 Oct 2014 10:44:07 -0700 record: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 10:44:07 -0700] rev 22921
record: access status fields by name rather than index It is safe to pass the full status to patch.diff() since it does its own slicing.
Fri, 03 Oct 2014 10:38:43 -0700 purge: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 10:38:43 -0700] rev 22920
purge: access status fields by name rather than index
Fri, 03 Oct 2014 22:10:08 -0700 largefiles: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 22:10:08 -0700] rev 22919
largefiles: access status fields by name rather than index
Fri, 03 Oct 2014 10:05:54 -0700 keyword: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 10:05:54 -0700] rev 22918
keyword: access status fields by name rather than index
Fri, 03 Oct 2014 09:51:39 -0700 hgcia: access status fields by name rather than index
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 09:51:39 -0700] rev 22917
hgcia: access status fields by name rather than index
Sat, 04 Oct 2014 21:05:41 -0700 context: store status class instead of plain tuple in self._status
Martin von Zweigbergk <martinvonz@gmail.com> [Sat, 04 Oct 2014 21:05:41 -0700] rev 22916
context: store status class instead of plain tuple in self._status This improves readability a bit by allowing us to refer to statuses by name rather than index.
Fri, 10 Oct 2014 10:14:35 -0700 status: update and move documentation of status types to status class
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 10 Oct 2014 10:14:35 -0700] rev 22915
status: update and move documentation of status types to status class The various status types are currently documented on the dirstate.status() method. Now that we have a class for the status types, it makese sense to document the status types there instead. Only leave the bits related to lookup/unsure in the status() method documentation.
Tue, 14 Oct 2014 00:52:27 -0500 status: update various other methods to return new class
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 14 Oct 2014 00:52:27 -0500] rev 22914
status: update various other methods to return new class
Fri, 10 Oct 2014 14:32:36 -0700 status: create class for status lists
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 10 Oct 2014 14:32:36 -0700] rev 22913
status: create class for status lists Callers of various status() methods (on dirstate, context, repo) get a tuple of 7 elements, where each element is a list of files. This results in lots of uses of indexes where names would be much more readable. For example, "status.ignored" seems clearer than "status[4]" [1]. So, let's introduce a simple named tuple containing the 7 status fields: modified, added, removed, deleted, unknown, ignored, clean. This patch introduces the class and updates the status methods to return instances of it. Later patches will update the callers. [1] Did you even notice that it should have been "status[5]"? (tweaked by mpm to introduce the class in scmutil and only change one user)
Fri, 03 Oct 2014 21:21:20 -0700 lfutil: avoid creating unnecessary copy of status tuple
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 21:21:20 -0700] rev 22912
lfutil: avoid creating unnecessary copy of status tuple In lfdirstatestatus(), the status tuple gets deconstructed, the lists get updated, and then an identical status tuple gets created and returned. Change it so we simply return the original tuple.
Fri, 03 Oct 2014 21:44:10 -0700 dirstate: separate 'lookup' status field from others
Martin von Zweigbergk <martinvonz@gmail.com> [Fri, 03 Oct 2014 21:44:10 -0700] rev 22911
dirstate: separate 'lookup' status field from others The status tuple returned from dirstate.status() has an additional field compared to the other status tuples: lookup/unsure. This field is just an optimization and not something most callers care about (they want the resolved value of 'modified' or 'clean'). To prepare for a single future status type, let's separate out the 'lookup' field from the rest by having dirstate.status() return a pair: (lookup, status).
Mon, 13 Oct 2014 14:18:47 -0700 commit: update file nodeid and flags in the same place
Martin von Zweigbergk <martinvonz@gmail.com> [Mon, 13 Oct 2014 14:18:47 -0700] rev 22910
commit: update file nodeid and flags in the same place Now that we have a separate variable for the original 'm1' manifest, we can safely update the nodeid of the file in the new manifest in the same place as we update the flags.
Mon, 13 Oct 2014 14:11:47 -0700 commit: use separate variable for p1 manifest and new manifest
Martin von Zweigbergk <martinvonz@gmail.com> [Mon, 13 Oct 2014 14:11:47 -0700] rev 22909
commit: use separate variable for p1 manifest and new manifest In localrepo.commitctx(), p1's manifest is copied and used as the basis for the manifest that is about to be committed. The way the copy is updated makes it safe to use it where the original p1's manifest is wanted. For readability, though, a separate variable for each purpose would be clearer. Make it so.
Mon, 13 Oct 2014 14:34:53 -0700 commit: remove dead initialization of 'lock'
Martin von Zweigbergk <martinvonz@gmail.com> [Mon, 13 Oct 2014 14:34:53 -0700] rev 22908
commit: remove dead initialization of 'lock' The 'lock' variable is initialized to None, but before it's ever read, it's assigned again.
Mon, 13 Oct 2014 16:43:37 -0700 commit: reduce scope of 'removed' variable
Martin von Zweigbergk <martinvonz@gmail.com> [Mon, 13 Oct 2014 16:43:37 -0700] rev 22907
commit: reduce scope of 'removed' variable The variable is closely related to 'added' and 'changed', so it makes sense to have it declared next to them.
Mon, 13 Oct 2014 18:00:39 -0500 rebase: fix some weird mixed-case naming
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 18:00:39 -0500] rev 22906
rebase: fix some weird mixed-case naming
Mon, 13 Oct 2014 17:55:45 -0500 rebase: move duplicatecopies next to merge
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 17:55:45 -0500] rev 22905
rebase: move duplicatecopies next to merge This is preparation for removing open-coded rebase/graft operations. As a side-effect, this exposes proper renames in the working copy when there are conflicts, which shows up in test-shelve.t.
Mon, 13 Oct 2014 17:12:47 -0500 histedit: use merge.graft
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 17:12:47 -0500] rev 22904
histedit: use merge.graft
Mon, 13 Oct 2014 17:12:31 -0500 graft: use merge.graft
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 17:12:31 -0500] rev 22903
graft: use merge.graft
Mon, 13 Oct 2014 17:12:12 -0500 merge: add merge.graft helper
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 17:12:12 -0500] rev 22902
merge: add merge.graft helper This will help unify all the open-coded graft/rebase operations.
Mon, 13 Oct 2014 14:33:13 -0500 duplicatecopies: move from cmdutil to copies
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 14:33:13 -0500] rev 22901
duplicatecopies: move from cmdutil to copies This is in preparation for moving its primary caller into merge.py, which would be a layering violation in the current location.
Mon, 13 Oct 2014 14:04:11 -0500 histedit: fix indent
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 14:04:11 -0500] rev 22900
histedit: fix indent The duplicatecopies call should be part of the rebase block.
Mon, 13 Oct 2014 13:21:03 -0500 graft: move rebase cleanup code next to actual rebase
Matt Mackall <mpm@selenic.com> [Mon, 13 Oct 2014 13:21:03 -0500] rev 22899
graft: move rebase cleanup code next to actual rebase This is prep for refactoring the rebase logic.
Fri, 10 Oct 2014 13:44:40 -0500 shelve: add a bundlerepo method
Matt Mackall <mpm@selenic.com> [Fri, 10 Oct 2014 13:44:40 -0500] rev 22898
shelve: add a bundlerepo method
Sat, 11 Oct 2014 14:05:09 -0500 dirstate: merge falls through to otherparent
Matt Mackall <mpm@selenic.com> [Sat, 11 Oct 2014 14:05:09 -0500] rev 22897
dirstate: merge falls through to otherparent This lets us more correctly fix the state when we use setparents, as demonstrated in the change in test-graft.t.
Fri, 10 Oct 2014 13:31:06 -0500 dirstate: use 'm' state in otherparent to reduce ambiguity
Matt Mackall <mpm@selenic.com> [Fri, 10 Oct 2014 13:31:06 -0500] rev 22896
dirstate: use 'm' state in otherparent to reduce ambiguity In rebase-like operations where we abandon the second parent, we can correctly fix up the state in setparents.
Fri, 10 Oct 2014 13:05:50 -0500 dirstate: properly clean-up some more merge state on setparents
Matt Mackall <mpm@selenic.com> [Fri, 10 Oct 2014 13:05:50 -0500] rev 22895
dirstate: properly clean-up some more merge state on setparents
Tue, 07 Oct 2014 11:42:37 -0700 phases: move root phase assignment to it's own function
Durham Goode <durham@fb.com> [Tue, 07 Oct 2014 11:42:37 -0700] rev 22894
phases: move root phase assignment to it's own function This moves the initial root phase assignment to it's own function. Future patches which make phase calculations lazy will use this function to pre-fill certain phases which can be deduced from the roots.
Tue, 07 Oct 2014 11:37:54 -0700 phases: add invalidate function
Durham Goode <durham@fb.com> [Tue, 07 Oct 2014 11:37:54 -0700] rev 22893
phases: add invalidate function Phase cache invalidation was spread all over the place. Let's add a function to unify it. Later more will be added to this function.
Sun, 12 Oct 2014 23:30:04 -0700 phases: change phase command change detection
Durham Goode <durham@fb.com> [Sun, 12 Oct 2014 23:30:04 -0700] rev 22892
phases: change phase command change detection A future patch is going to make phase computation lazy, so the phase command can no longer read and diff the entire phase list directly. This changes the phase command to build it's own list for diff purposes.
Fri, 10 Oct 2014 13:09:22 -0700 spanset: remove `.set()` definition
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Oct 2014 13:09:22 -0700] rev 22891
spanset: remove `.set()` definition All my friends are dead.
Fri, 10 Oct 2014 13:08:49 -0700 generatorset: remove `.set()` definition
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Oct 2014 13:08:49 -0700] rev 22890
generatorset: remove `.set()` definition All my friends are dead.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip