Mercurial > public > mercurial-scm > hg
comparison mercurial/copies.py @ 6646:9eb274d773d9
copies: teach copies about dirstate.copies
When we're using copies() to find changes between the working directory and
its first parent for diff/status/etc., use dirstate.copies() directly.
This avoids doing a full statwalk for simple diffs (issue1090) and
removes a special case from the status command.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 03 Jun 2008 15:41:09 -0500 |
parents | a42d8d3e6ea9 |
children | fb42030d79d6 |
comparison
equal
deleted
inserted
replaced
6645:37eedb1a1848 | 6646:9eb274d773d9 |
---|---|
107 """ | 107 """ |
108 # avoid silly behavior for update from empty dir | 108 # avoid silly behavior for update from empty dir |
109 if not c1 or not c2 or c1 == c2: | 109 if not c1 or not c2 or c1 == c2: |
110 return {}, {} | 110 return {}, {} |
111 | 111 |
112 # avoid silly behavior for parent -> working dir | |
113 if c2.node() == None and c1.node() == repo.dirstate.parents()[0]: | |
114 return repo.dirstate.copies(), {} | |
115 | |
112 limit = _findlimit(repo, c1.rev(), c2.rev()) | 116 limit = _findlimit(repo, c1.rev(), c2.rev()) |
113 m1 = c1.manifest() | 117 m1 = c1.manifest() |
114 m2 = c2.manifest() | 118 m2 = c2.manifest() |
115 ma = ca.manifest() | 119 ma = ca.manifest() |
116 | 120 |