equal
deleted
inserted
replaced
1210 |
1210 |
1211 def blockdescendants(fctx, fromline, toline): |
1211 def blockdescendants(fctx, fromline, toline): |
1212 """Yield descendants of `fctx` with respect to the block of lines within |
1212 """Yield descendants of `fctx` with respect to the block of lines within |
1213 `fromline`-`toline` range. |
1213 `fromline`-`toline` range. |
1214 """ |
1214 """ |
|
1215 # First possibly yield 'fctx' if it has changes in range with respect to |
|
1216 # its parents. |
|
1217 try: |
|
1218 c, linerange1 = next(blockancestors(fctx, fromline, toline)) |
|
1219 except StopIteration: |
|
1220 pass |
|
1221 else: |
|
1222 if c == fctx: |
|
1223 yield c, linerange1 |
|
1224 |
1215 diffopts = patch.diffopts(fctx._repo.ui) |
1225 diffopts = patch.diffopts(fctx._repo.ui) |
1216 fl = fctx.filelog() |
1226 fl = fctx.filelog() |
1217 seen = {fctx.filerev(): (fctx, (fromline, toline))} |
1227 seen = {fctx.filerev(): (fctx, (fromline, toline))} |
1218 for i in fl.descendants([fctx.filerev()]): |
1228 for i in fl.descendants([fctx.filerev()]): |
1219 c = fctx.filectx(i) |
1229 c = fctx.filectx(i) |