diff -r 3461814417f3 -r 0bd56c291359 mercurial/sparse.py --- a/mercurial/sparse.py Mon Jan 21 15:29:14 2019 +0000 +++ b/mercurial/sparse.py Fri Jan 25 23:36:23 2019 -0800 @@ -336,7 +336,7 @@ if branchmerge: # If we're merging, use the wctx filter, since we're merging into # the wctx. - sparsematch = matcher(repo, [wctx.parents()[0].rev()]) + sparsematch = matcher(repo, [wctx.p1().rev()]) else: # If we're updating, use the target context's filter, since we're # moving to the target context.