Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 2979:92a0c2200e41
merge: use context code to retrieve manifests
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 22 Aug 2006 19:32:16 -0500 |
parents | 962b9c7df641 |
children | 54d85098fb82 |
comparison
equal
deleted
inserted
replaced
2978:962b9c7df641 | 2979:92a0c2200e41 |
---|---|
86 modified, added, removed, deleted, unknown = repo.status()[:5] | 86 modified, added, removed, deleted, unknown = repo.status()[:5] |
87 if branchmerge and not forcemerge: | 87 if branchmerge and not forcemerge: |
88 if modified or added or removed: | 88 if modified or added or removed: |
89 raise util.Abort(_("outstanding uncommitted changes")) | 89 raise util.Abort(_("outstanding uncommitted changes")) |
90 | 90 |
91 m1n = repo.changelog.read(p1)[0] | 91 m1 = repo.changectx(p1).manifest().copy() |
92 m2n = repo.changelog.read(p2)[0] | 92 m2 = repo.changectx(p2).manifest().copy() |
93 man = repo.manifest.ancestor(m1n, m2n) | 93 ma = repo.changectx(pa).manifest() |
94 m1 = repo.manifest.read(m1n).copy() | |
95 m2 = repo.manifest.read(m2n).copy() | |
96 ma = repo.manifest.read(man) | |
97 | 94 |
98 if not force: | 95 if not force: |
99 for f in unknown: | 96 for f in unknown: |
100 if f in m2: | 97 if f in m2: |
101 if repo.file(f).cmp(m2[f], repo.wread(f)): | 98 if repo.file(f).cmp(m2[f], repo.wread(f)): |
106 # we care about merging | 103 # we care about merging |
107 repo.ui.note(_("resolving manifests\n")) | 104 repo.ui.note(_("resolving manifests\n")) |
108 repo.ui.debug(_(" overwrite %s branchmerge %s partial %s linear %s\n") % | 105 repo.ui.debug(_(" overwrite %s branchmerge %s partial %s linear %s\n") % |
109 (overwrite, branchmerge, bool(partial), linear_path)) | 106 (overwrite, branchmerge, bool(partial), linear_path)) |
110 repo.ui.debug(_(" ancestor %s local %s remote %s\n") % | 107 repo.ui.debug(_(" ancestor %s local %s remote %s\n") % |
111 (short(man), short(m1n), short(m2n))) | 108 (short(p1), short(p2), short(pa))) |
112 | 109 |
113 action = {} | 110 action = {} |
114 forget = [] | 111 forget = [] |
115 | 112 |
116 # update m1 from working dir | 113 # update m1 from working dir |