Mercurial > hgsubversion
comparison hgsubversion/wrappers.py @ 1551:22137e94411f
wrappers: cope with removal of text= kwarg on vfs
Fixes #472.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 24 Mar 2018 15:16:11 -0400 |
parents | 0212c3a84ccd |
children | cff81f35b31e |
comparison
equal
deleted
inserted
replaced
1550:67b28d657f62 | 1551:22137e94411f |
---|---|
686 srcrepo = data.get('srcrepo') | 686 srcrepo = data.get('srcrepo') |
687 dst = dstrepo.local() | 687 dst = dstrepo.local() |
688 | 688 |
689 if dstrepo.local() and srcrepo.capable('subversion'): | 689 if dstrepo.local() and srcrepo.capable('subversion'): |
690 dst = dstrepo.local() | 690 dst = dstrepo.local() |
691 fd = dst.vfs("hgrc", "a", text=True) | 691 try: |
692 # hg before 4.5 requires text=True here | |
693 fd = dst.vfs("hgrc", "a", text=True) | |
694 except TypeError: | |
695 fd = dst.vfs("hgrc", "a") | |
692 preservesections = set(s for s, v in optionmap.itervalues()) | 696 preservesections = set(s for s, v in optionmap.itervalues()) |
693 preservesections |= extrasections | 697 preservesections |= extrasections |
694 for section in preservesections: | 698 for section in preservesections: |
695 config = dict(ui.configitems(section)) | 699 config = dict(ui.configitems(section)) |
696 for name in dontretain[section]: | 700 for name in dontretain[section]: |