Mercurial > hgsubversion
comparison hgsubversion/stupid.py @ 1549:8410a978c650
compathacks: be compatible with upstream 8a0cac20a1ad memfilectx change
See hg change 8a0cac20a1ad. Since the interface has changed
more than one time, switch to explicit keywords arguments to avoid
surprises.
Since hgsubversion targets hg >= 3.2.4, drop support for hg 3.0 and 3.1
here.
author | Jun Wu <quark@fb.com> |
---|---|
date | Tue, 19 Dec 2017 14:29:55 -0800 |
parents | d03995e69785 |
children | cff81f35b31e |
comparison
equal
deleted
inserted
replaced
1548:7f83be82d03f | 1549:8410a978c650 |
---|---|
345 # TODO this branch feels like it should not be required, | 345 # TODO this branch feels like it should not be required, |
346 # and this may actually imply a bug in getcopies | 346 # and this may actually imply a bug in getcopies |
347 if copied not in parentctx.manifest(): | 347 if copied not in parentctx.manifest(): |
348 copied = None | 348 copied = None |
349 return compathacks.makememfilectx(repo, | 349 return compathacks.makememfilectx(repo, |
350 memctx=memctx, | |
350 path=path, | 351 path=path, |
351 data=data, | 352 data=data, |
352 islink=islink, | 353 islink=islink, |
353 isexec=isexe, | 354 isexec=isexe, |
354 copied=copied) | 355 copied=copied) |
557 # TODO this branch feels like it should not be required, | 558 # TODO this branch feels like it should not be required, |
558 # and this may actually imply a bug in getcopies | 559 # and this may actually imply a bug in getcopies |
559 if copied not in parentctx.manifest(): | 560 if copied not in parentctx.manifest(): |
560 copied = None | 561 copied = None |
561 return compathacks.makememfilectx(repo, | 562 return compathacks.makememfilectx(repo, |
563 memctx=memctx, | |
562 path=path, | 564 path=path, |
563 data=data, | 565 data=data, |
564 islink=islink, | 566 islink=islink, |
565 isexec=isexec, | 567 isexec=isexec, |
566 copied=copied) | 568 copied=copied) |
734 def filectxfn(repo, memctx, path): | 736 def filectxfn(repo, memctx, path): |
735 if path in externals: | 737 if path in externals: |
736 if externals[path] is None: | 738 if externals[path] is None: |
737 raise IOError(errno.ENOENT, 'no externals') | 739 raise IOError(errno.ENOENT, 'no externals') |
738 return compathacks.makememfilectx(repo, | 740 return compathacks.makememfilectx(repo, |
741 memctx=memctx, | |
739 path=path, | 742 path=path, |
740 data=externals[path], | 743 data=externals[path], |
741 islink=False, | 744 islink=False, |
742 isexec=False, | 745 isexec=False, |
743 copied=None) | 746 copied=None) |