# HG changeset patch # User Siddharth Agarwal # Date 1427499770 25200 # Node ID 2061fd988f3fccdcfc9b241534ab94afe86321ad # Parent 43a365f5d13cf48776ca830023cb9770303a3e78 stupid: adapt to Mercurial 3.4 changes Straightforward API change. diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- 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: