Mercurial > python-hglib
diff hglib/client.py @ 192:7a84a8656679
client: do not append an option to a list of arguments
It wouldn't work if args are terminated with "--".
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 11 Nov 2017 20:21:26 +0900 |
parents | 6987d6cd420c |
children | 22767a1e61ac |
line wrap: on
line diff
--- a/hglib/client.py Mon Aug 21 17:13:37 2017 +0200 +++ b/hglib/client.py Sat Nov 11 20:21:26 2017 +0900 @@ -852,9 +852,8 @@ args = cmdbuilder(b('grep'), all=all, a=text, f=follow, i=ignorecase, l=fileswithmatches, n=line, u=user, d=date, - I=include, X=exclude, hidden=self.hidden, + I=include, X=exclude, hidden=self.hidden, print0=True, *[pattern] + files) - args.append(b('-0')) def eh(ret, out, err): if ret != 1: @@ -1136,13 +1135,14 @@ """ # we can't really use --preview since merge doesn't support --template - args = cmdbuilder(b('merge'), r=rev, f=force, t=tool) + args = cmdbuilder(b('merge'), r=rev, f=force, t=tool, + y=(cb is merge.handlers.noninteractive)) prompt = None if cb is merge.handlers.abort: prompt = cb elif cb is merge.handlers.noninteractive: - args.append(b('-y')) + pass else: prompt = lambda size, output: cb(output) + b('\n') @@ -1473,9 +1473,7 @@ args = cmdbuilder(b('status'), rev=rev, change=change, A=all, m=modified, a=added, r=removed, d=deleted, c=clean, u=unknown, i=ignored, C=copies, S=subrepos, I=include, - X=exclude, hidden=self.hidden) - - args.append(b('-0')) + X=exclude, hidden=self.hidden, print0=True) out = self.rawcommand(args) l = []