Mercurial > hg
comparison mercurial/copies.py @ 23982:751d1138ce35 stable
copies: use linkrev for file tracing limit
This lets us lazily evaluate _adjustlinkrev.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 01 Feb 2015 16:25:12 -0600 |
parents | c1ce5442453f |
children | a63c2b159df4 9372180b8c9b |
comparison
equal
deleted
inserted
replaced
23981:24b57c3899f8 | 23982:751d1138ce35 |
---|---|
131 manifest am, stopping after the first ancestor lower than limit''' | 131 manifest am, stopping after the first ancestor lower than limit''' |
132 | 132 |
133 for f in fctx.ancestors(): | 133 for f in fctx.ancestors(): |
134 if am.get(f.path(), None) == f.filenode(): | 134 if am.get(f.path(), None) == f.filenode(): |
135 return f | 135 return f |
136 if f.rev() < limit: | 136 if limit >= 0 and f.linkrev() < limit and f.rev() < limit: |
137 return None | 137 return None |
138 | 138 |
139 def _dirstatecopies(d): | 139 def _dirstatecopies(d): |
140 ds = d._repo.dirstate | 140 ds = d._repo.dirstate |
141 c = ds.copies().copy() | 141 c = ds.copies().copy() |