Re: Signing by StGIT broken
From: Karl Hasselström <hidden>
Date: 2016-06-15 22:44:06
On 2008-01-11 23:58:03 -0500, Pavel Roskin wrote:
On Thu, 2008-01-10 at 08:42 +0100, Karl Hasselström wrote:quoted
On 2008-01-09 21:53:16 -0500, Pavel Roskin wrote:quoted
"stg edit --sign" is not working anymore. It was working in version 0.14.Thanks for the report and the detailed analysis. I'll write a test and fix it (but not quite immediately, so feel free to beat me to it).The fix below appears to work (thus making it a self-signing patch :)) but with my modest Python experience it absolutely needs to be reviewed. I don't even know how to wrap the long line without making it look misleading.
It works by virtue of avoiding passing None to parse_patch(), which
expects a string object. So the fix is correct.
There are two ways to do line breaking in Python:
1. Break the line between a pair of parentheses. That way, the
parser knows that the line can't possibly end here:
foo(1, 2, 3,
4, 5, 6)
x = { 'foo': 5,
'bar': 17 }
2. As a last resort, you can end a line with backslash:
x = 1 + 2 + 3 \
+ 4 + 5 + 6
But you should never use this. Insert a pair of otherwise
redundant parentheses instead:
x = (1 + 2 + 3
+ 4 + 5 + 6)
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle