Mercurial > public > mercurial-scm > hg
comparison mercurial/copies.py @ 13878:a8d13ee0ce68
misc: replace .parents()[0] with p1()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 04 Apr 2011 16:21:59 -0500 |
parents | ada47c38f4e5 |
children | 1ffeeb91c55d |
comparison
equal
deleted
inserted
replaced
13877:653121e6941f | 13878:a8d13ee0ce68 |
---|---|
91 # avoid silly behavior for update from empty dir | 91 # avoid silly behavior for update from empty dir |
92 if not c1 or not c2 or c1 == c2: | 92 if not c1 or not c2 or c1 == c2: |
93 return {}, {} | 93 return {}, {} |
94 | 94 |
95 # avoid silly behavior for parent -> working dir | 95 # avoid silly behavior for parent -> working dir |
96 if c2.node() is None and c1.node() == repo.dirstate.parents()[0]: | 96 if c2.node() is None and c1.node() == repo.dirstate.p1(): |
97 return repo.dirstate.copies(), {} | 97 return repo.dirstate.copies(), {} |
98 | 98 |
99 limit = _findlimit(repo, c1.rev(), c2.rev()) | 99 limit = _findlimit(repo, c1.rev(), c2.rev()) |
100 if limit is None: | 100 if limit is None: |
101 # no common ancestor, no copies | 101 # no common ancestor, no copies |