Mon, 29 Aug 2016 00:00:05 +0900 formatter: add context manager interface for convenience
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Aug 2016 00:00:05 +0900] rev 29882
formatter: add context manager interface for convenience And port "hg files" to test it. As you can see, extra indent is necessary to port to this API. I don't think we should switch every fm.formatter() call to "with" statement.
Fri, 26 Aug 2016 21:06:31 +0200 histedit: remove now unused 'constraints' related code
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 21:06:31 +0200] rev 29881
histedit: remove now unused 'constraints' related code Now that the one action that need different logic handle that using inheritance and overriding, we can remove that code.
Fri, 26 Aug 2016 21:00:33 +0200 histedt: use inheritance to override the constraints in 'base'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 21:00:33 +0200] rev 29880
histedt: use inheritance to override the constraints in 'base' All actions but one actually have the same constraints when it comes to validate the 'action.node' value. So we actually just add this code to a method that can be overwritten in the one action where it matters. The now unused 'contraints' related enum and class attribute will be cleaned up in the next changeset.
Fri, 26 Aug 2016 20:54:52 +0200 histedit: move constraint verification to the 'action.verify' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:52 +0200] rev 29879
histedit: move constraint verification to the 'action.verify' method Action has a method dedicated to verifying its validity. So we move code related to constrains into that method. This requires a bit more context to the 'verify' method in the same fashion we were passing the 'prev' argument. This is an extra step before we can simplify the constraint handling code further.
Fri, 26 Aug 2016 20:54:32 +0200 histedit: directly use node in 'verifyactions'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:54:32 +0200] rev 29878
histedit: directly use node in 'verifyactions' It does not seem useful to convert to hex: it is an extra step and they are longer strings. So we stick to node for the logic. We only convert to short hex for error when needed. As a nice side effect this remove the explicit constant usage in'[12:]'. This will also help moving the code around later as we just have to access action.node.
Fri, 26 Aug 2016 20:42:18 +0200 histedit: temporarily shorten name of 'constraints' variable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:42:18 +0200] rev 29877
histedit: temporarily shorten name of 'constraints' variable An upcoming changeset will make the line where this variable is used slightly too long. Other later changesets will clean that up further and makes the variable unnecessary, so this is only temporary and it does seems useful to put anything more complicate in place.
Fri, 26 Aug 2016 20:38:37 +0200 histedit: drop the 'nodetoverify' local variable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:38:37 +0200] rev 29876
histedit: drop the 'nodetoverify' local variable We can just use 'action.node'.
Fri, 26 Aug 2016 20:34:58 +0200 histedit: make 'constraints' a class attribute instead of a method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:34:58 +0200] rev 29875
histedit: make 'constraints' a class attribute instead of a method There does not seem to be a reason for this to be a method. So we initialise the class attribute once and for all at creation time and drop the instance method.
Fri, 26 Aug 2016 20:31:33 +0200 histedit: drop the 'nodetoverify' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 26 Aug 2016 20:31:33 +0200] rev 29874
histedit: drop the 'nodetoverify' method That method is just returning self.node and is never overridden. We just use the attribute directly instead and get rid of the method. This is the beginning of series to simplify and unify verification of constraints for actions.
Mon, 29 Aug 2016 22:59:39 +0900 test-gpg: start gpg-agent by gpg-connect-agent only if GnuPG v2.1+ detected
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Aug 2016 22:59:39 +0900] rev 29873
test-gpg: start gpg-agent by gpg-connect-agent only if GnuPG v2.1+ detected Danek Duvall found that gpg-connect-agent of GnuPG 2.0 never starts gpg-agent daemon. The 2.1 way is documented as "gpg-coonect-agent /bye" [1], which appears to be different from the 2.0 way [2]. [1]: https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html [2]: https://www.gnupg.org/documentation/manuals/gnupg-2.0/Invoking-GPG_002dAGENT.html Since "gpg-agent --daemon" of GnuPG 2.1 never prints environment variables, "eval $(gpg-agent --daemon)" would be valid only for GnuPG < 2.1, and we'll need a different workaround for 2.0. I have no 2.0 environment, I won't implement it.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip