X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug;h=755bd7db8ee23ef4d8360a62d8096a55b5fc63e2;hb=e263c5b1f9e21d049ab04be0bec3ec7dc5bbc30e;hp=1dd5f14fe7b4dbaf01a4fdfbd1d5332ae15b983a;hpb=92d8eae8f182e4eebc87d76f8d4f37e6c018883a;p=notmuch diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index 1dd5f14f..755bd7db 100755 --- a/devel/nmbug/nmbug +++ b/devel/nmbug/nmbug @@ -169,8 +169,9 @@ class _SubprocessContextManager(object): stream.close() setattr(self._process, name, None) status = self._process.wait() - _LOG.debug('collect {args} with status {status}'.format( - args=self._args, status=status)) + _LOG.debug( + 'collect {args} with status {status} (expected {expect})'.format( + args=self._args, status=status, expect=self._expect)) if status not in self._expect: raise SubprocessError(args=self._args, status=status) @@ -211,13 +212,14 @@ def _spawn(args, input=None, additional_env=None, wait=False, stdin=None, input = input.encode(encoding) (stdout, stderr) = p.communicate(input=input) status = p.wait() - _LOG.debug('collect {args} with status {status}'.format( - args=args, status=status)) + _LOG.debug( + 'collect {args} with status {status} (expected {expect})'.format( + args=args, status=status, expect=expect)) if stdout is not None: stdout = stdout.decode(encoding) if stderr is not None: stderr = stderr.decode(encoding) - if status: + if status not in expect: raise SubprocessError( args=args, status=status, stdout=stdout, stderr=stderr) return (status, stdout, stderr) @@ -475,7 +477,7 @@ def log(args=()): 'nmbug log HEAD..@{upstream}'. """ # we don't want output trapping here, because we want the pager. - args = ['log', '--name-status'] + list(args) + args = ['log', '--name-status', '--no-renames'] + list(args) with _git(args=args, expect=(0, 1, -13)) as p: p.wait()