patch: Fix nullid for binary git diffs (
issue4054)
The index for an empty file in git is not 0, but sha-1("blobl 0\0").
shelve: copy bookmarks and restore them after a commit
cmdutil.commit() will advance the bookmarks. Therefore we have to restore
them afterwards. We have to use update() to ensure we preserve the bmstore
object.
check-code: check that '>' is used for continued lines
Continued lines do not get the SALT mangling.
run-tests: place the .t shell script next to $TESTTMP and with a useful name
--keep can thus keep it around - very convenient for debugging.
tests: fix void and invalid test in test-archive.t
An echo statement was missed in the .t-ification in
afe19a1bf9d3 so we ended up
with invalid sh syntax. But at the same time a continuation line was marked as
$ instead of > and we thus added the salt that made the expression valid again.
cmdutil.service: move pidfile writing to the parent in daemon mode
There is a potential race here, which I suspect I've spotted in the wild, where
something reads the pid file after the parent exits but before the child has
had a chance to write to it. Moving writing the file to the parent causes this
to no longer be an issue.
cmdutil.service: move pidfile writing to a local function
An upcoming patch will reuse this code.
inotify: add pidfile to parent options
An upcoming patch will move pidfile writing from the parent to the child. This
means that if the pid file isn't specified on the command-line but is specified
as a config option, it needs to be added to the parent's opts dict.
get-with-headers: don't block indefinitely if the server had an internal error
If the server had an internal error and returned 500, there's nothing
to read, so "response.read()" blocks indefinitely. Only output the
response if there's really a response.