Mercurial > hgsubversion
changeset 1243:3606aff13a22
stupid: in svnbackend, adapt for core Mercurial changes
There's no efficient way to capture this API change in compathacks.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 16 Sep 2014 16:19:43 -0700 |
parents | df6cb54604eb |
children | 012965ab3bf7 |
files | hgsubversion/stupid.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -207,7 +207,13 @@ def patchrepoold(ui, meta, parentctx, pa try: class svnbackend(patch.repobackend): def getfile(self, fname): - data, (islink, isexec) = super(svnbackend, self).getfile(fname) + # In Mercurial >= 3.2, if fname is missing, data will be None and we + # should return None, None in that case. Earlier versions will raise + # an IOError which we let propagate up the stack. + data, flags = super(svnbackend, self).getfile(fname) + if data is None: + return None, None + islink, isexec = flags if islink: data = 'link ' + data return data, (islink, isexec)