Show More
@@ -1156,21 +1156,21 b' class filectx(basefilectx):' | |||
|
1156 | 1156 | return [filectx(self._repo, self._path, fileid=x, |
|
1157 | 1157 | filelog=self._filelog) for x in c] |
|
1158 | 1158 | |
|
1159 | def blockancestors(fctx, fromline, toline): | |
|
1160 | """Yield ancestors of `fctx` with respect to the block of lines within | |
|
1161 | `fromline`-`toline` range. | |
|
1162 | """ | |
|
1163 | def changesrange(fctx1, fctx2, linerange2): | |
|
1159 | def _changesrange(fctx1, fctx2, linerange2, diffopts): | |
|
1164 | 1160 |
|
|
1165 | 1161 |
|
|
1166 | 1162 |
|
|
1167 | 1163 |
|
|
1168 | diffopts = patch.diffopts(fctx._repo.ui) | |
|
1169 | 1164 |
|
|
1170 | 1165 |
|
|
1171 | 1166 |
|
|
1172 | 1167 |
|
|
1173 | 1168 | |
|
1169 | def blockancestors(fctx, fromline, toline): | |
|
1170 | """Yield ancestors of `fctx` with respect to the block of lines within | |
|
1171 | `fromline`-`toline` range. | |
|
1172 | """ | |
|
1173 | diffopts = patch.diffopts(fctx._repo.ui) | |
|
1174 | 1174 | visit = {(fctx.linkrev(), fctx.filenode()): (fctx, (fromline, toline))} |
|
1175 | 1175 | while visit: |
|
1176 | 1176 | c, linerange2 = visit.pop(max(visit)) |
@@ -1181,7 +1181,7 b' def blockancestors(fctx, fromline, tolin' | |||
|
1181 | 1181 | continue |
|
1182 | 1182 | inrange = False |
|
1183 | 1183 | for p in pl: |
|
1184 | inrangep, linerange1 = changesrange(p, c, linerange2) | |
|
1184 | inrangep, linerange1 = _changesrange(p, c, linerange2, diffopts) | |
|
1185 | 1185 | inrange = inrange or inrangep |
|
1186 | 1186 | if linerange1[0] == linerange1[1]: |
|
1187 | 1187 | # Parent's linerange is empty, meaning that the block got |
General Comments 0
You need to be logged in to leave comments.
Login now