Mercurial > hgsubversion
changeset 1278:2ae577a4cd56
stupid: dedent some code
Done as two changes to make the previous change slightly easier to review.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 08 Dec 2014 16:50:22 -0500 |
parents | ada9b39a9eb8 |
children | c791efb7082a |
files | hgsubversion/stupid.py |
diffstat | 1 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -171,22 +171,21 @@ def filteriterhunks(meta): yield data return filterhunks -if True: - class svnbackend(patch.repobackend): - def getfile(self, 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. - f = super(svnbackend, self).getfile(fname) - if f is None: - return None, None - data, flags = f - if data is None: - return None, None - islink, isexec = flags - if islink: - data = 'link ' + data - return data, (islink, isexec) +class svnbackend(patch.repobackend): + def getfile(self, 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. + f = super(svnbackend, self).getfile(fname) + if f is None: + return None, None + data, flags = f + if data is None: + return None, None + islink, isexec = flags + if islink: + data = 'link ' + data + return data, (islink, isexec) def patchrepo(ui, meta, parentctx, patchfp): store = patch.filestore(util.getfilestoresize(ui))