Mercurial > hgsubversion
comparison hgsubversion/pushmod.py @ 1572:51e105c7f0c6
compathacks: deal with removed aliases in mercurial.util
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 27 May 2018 00:29:38 -0400 |
parents | ae572c9be4e6 |
children |
comparison
equal
deleted
inserted
replaced
1571:f8ca09a97492 | 1572:51e105c7f0c6 |
---|---|
1 from mercurial import error as hgerror | 1 from mercurial import error as hgerror |
2 from mercurial import util as hgutil | 2 from mercurial import util as hgutil |
3 | 3 |
4 import compathacks | |
4 import svnwrap | 5 import svnwrap |
5 import svnexternals | 6 import svnexternals |
6 import util | 7 import util |
7 | 8 |
8 class NoFilesException(Exception): | 9 class NoFilesException(Exception): |
121 | 122 |
122 if 'x' in fctx.flags(): | 123 if 'x' in fctx.flags(): |
123 props.setdefault(file, {})['svn:executable'] = '*' | 124 props.setdefault(file, {})['svn:executable'] = '*' |
124 if 'l' in fctx.flags(): | 125 if 'l' in fctx.flags(): |
125 props.setdefault(file, {})['svn:special'] = '*' | 126 props.setdefault(file, {})['svn:special'] = '*' |
126 isbinary = hgutil.binary(new_data) | 127 isbinary = compathacks.binary(new_data) |
127 if isbinary: | 128 if isbinary: |
128 props.setdefault(file, {})['svn:mime-type'] = 'application/octet-stream' | 129 props.setdefault(file, {})['svn:mime-type'] = 'application/octet-stream' |
129 | 130 |
130 if file not in parent: | 131 if file not in parent: |
131 renamed = fctx.renamed() | 132 renamed = fctx.renamed() |
149 props.setdefault(file, {})['svn:executable'] = None | 150 props.setdefault(file, {})['svn:executable'] = None |
150 if 'l' in parent.filectx(file).flags(): | 151 if 'l' in parent.filectx(file).flags(): |
151 base_data = 'link ' + base_data | 152 base_data = 'link ' + base_data |
152 if 'l' not in rev_ctx.filectx(file).flags(): | 153 if 'l' not in rev_ctx.filectx(file).flags(): |
153 props.setdefault(file, {})['svn:special'] = None | 154 props.setdefault(file, {})['svn:special'] = None |
154 if hgutil.binary(base_data) and not isbinary: | 155 if compathacks.binary(base_data) and not isbinary: |
155 props.setdefault(file, {})['svn:mime-type'] = None | 156 props.setdefault(file, {})['svn:mime-type'] = None |
156 action = 'modify' | 157 action = 'modify' |
157 else: | 158 else: |
158 pos = file.rfind('/') | 159 pos = file.rfind('/') |
159 if pos >= 0: | 160 if pos >= 0: |