Mercurial > hgsubversion
changeset 1320:2061fd988f3f
stupid: adapt to Mercurial 3.4 changes
Straightforward API change.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 27 Mar 2015 16:42:50 -0700 |
parents | 43a365f5d13c |
children | a36e87ae2380 |
files | hgsubversion/stupid.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -194,7 +194,12 @@ def patchrepo(ui, meta, parentctx, patch backend = svnbackend(ui, meta.repo, parentctx, store) try: - ret = patch.patchbackend(ui, backend, patchfp, 0, touched) + try: + ret = patch.patchbackend(ui, backend, patchfp, 0, files=touched) + except TypeError: + # Mercurial >= 3.4 have an extra prefix parameter + ret = patch.patchbackend(ui, backend, patchfp, 0, '', + files=touched) if ret < 0: raise BadPatchApply('patching failed') if ret > 0: