Fri, 03 Aug 2018 12:57:11 -0700 changegroup: declare shallow flag in constructor
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 12:57:11 -0700] rev 38904
changegroup: declare shallow flag in constructor Thus begins the process of better formalizing ellipses and shallow changegroup generation mode so it is tracked by cgpacker at construction time instead of bolted on after the fact by a wrapper function. Differential Revision: https://phab.mercurial-scm.org/D4086
Fri, 03 Aug 2018 12:47:15 -0700 changegroup: make some packer attributes private
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 12:47:15 -0700] rev 38903
changegroup: make some packer attributes private These methods and attributes are low level and should not be called or outside outside of instances. Indicate as such through naming. Differential Revision: https://phab.mercurial-scm.org/D4085
Fri, 03 Aug 2018 10:35:10 -0700 changegroup: rename cg1packer to cgpacker
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 10:35:10 -0700] rev 38902
changegroup: rename cg1packer to cgpacker There is now only a single class. We don't need to encode the version in its name since the version is a lie. Differential Revision: https://phab.mercurial-scm.org/D4084
Fri, 03 Aug 2018 10:35:02 -0700 changegroup: control delta parent behavior via constructor
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 10:35:02 -0700] rev 38901
changegroup: control delta parent behavior via constructor The last remaining override on cg2packer related to parent delta computation. We pass a parameter to the constructor to control whether to delta against the previous revision and we inline all parent delta logic into a single function. With this change, cg2packer is empty, so it has been deleted. Differential Revision: https://phab.mercurial-scm.org/D4083
Fri, 03 Aug 2018 10:01:58 -0700 changegroup: control reordering via constructor argument
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 10:01:58 -0700] rev 38900
changegroup: control reordering via constructor argument cg2packer.__init__ exists just to override self._reorder. Let's parameterize this behavior via an argument to the parent's __init__. The logic for self._reorder is kinda wonky. None is used as a special value and the value should be None in some situations. It is probably worth rewriting this logic to make behavior more explicit. This will likely happen as part of future work to control the delta generation process that I have planned. Differential Revision: https://phab.mercurial-scm.org/D4082
Fri, 03 Aug 2018 09:44:30 -0700 changegroup: consolidate tree manifests sending into cg1packer
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 03 Aug 2018 09:44:30 -0700] rev 38899
changegroup: consolidate tree manifests sending into cg1packer Previously, we overrode a method to control how manifests were serialized. This method was redefined on cg3packer to send tree manifests. This commit moves the tree manifests sending variation to cg1packer and teaches the cgpacker constructor to control which version to use. After these changes, cg3packer was empty. So it has been removed. Differential Revision: https://phab.mercurial-scm.org/D4081
Thu, 02 Aug 2018 18:04:51 -0700 changegroup: pass end of manifests marker into constructor
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 02 Aug 2018 18:04:51 -0700] rev 38898
changegroup: pass end of manifests marker into constructor cg3 inserts a custom marker in the stream once all manifests have been transferred. This is currently abstracted out by overriding a method. Let's pass the end of manifests marker in as an argument to avoid the extra method. Differential Revision: https://phab.mercurial-scm.org/D4080
Thu, 02 Aug 2018 17:44:56 -0700 changegroup: pass function to build delta header into constructor
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 02 Aug 2018 17:44:56 -0700] rev 38897
changegroup: pass function to build delta header into constructor Previously, the delta header struct format was defined on each class and each class had a separate function for building the delta header. We replace both of these with an argument to __init__ containing a callable that can format a delta header given a revisiondelta instance. Differential Revision: https://phab.mercurial-scm.org/D4079
Thu, 02 Aug 2018 17:52:21 -0700 changegroup: make delta header struct formatters actual structs
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 02 Aug 2018 17:52:21 -0700] rev 38896
changegroup: make delta header struct formatters actual structs Why we weren't using compiled Struct instances, I don't know. They make code simpler. In theory they are faster. Although I don't believe I was able to measure any meaningful change. That could be because this code is often dominated by compression, deltafication, and function call overhead. Differential Revision: https://phab.mercurial-scm.org/D4078
Thu, 02 Aug 2018 17:33:23 -0700 changegroup: pass version into constructor
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 02 Aug 2018 17:33:23 -0700] rev 38895
changegroup: pass version into constructor Currently, the version is an attribute on each class. Passing the argument into the constructor gets us one step closer to eliminating cg2packer and cg3packer. Differential Revision: https://phab.mercurial-scm.org/D4077
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip