##// END OF EJS Templates
merge: hoist partial code out of manifest loops
Matt Mackall -
r2971:33dcf03e default
parent child Browse files
Show More
@@ -79,7 +79,7 b' def update(repo, node, branchmerge=False'
79 raise util.Abort(_("there is nothing to merge, just use "
79 raise util.Abort(_("there is nothing to merge, just use "
80 "'hg update' or look at 'hg heads'"))
80 "'hg update' or look at 'hg heads'"))
81
81
82 if not overwrite and not linear_path and not branchmerge:
82 if not linear_path and not (overwrite or branchmerge):
83 raise util.Abort(_("update spans branches, use 'hg merge' "
83 raise util.Abort(_("update spans branches, use 'hg merge' "
84 "or 'hg update -C' to lose changes"))
84 "or 'hg update -C' to lose changes"))
85
85
@@ -140,10 +140,14 b' def update(repo, node, branchmerge=False'
140 if linear_path and f not in m2:
140 if linear_path and f not in m2:
141 forget.append(f)
141 forget.append(f)
142
142
143 if partial:
144 for f in mw.keys():
145 if not partial(f): del mw[f]
146 for f in m2.keys():
147 if not partial(f): del m2[f]
148
143 # Compare manifests
149 # Compare manifests
144 for f, n in mw.iteritems():
150 for f, n in mw.iteritems():
145 if partial and not partial(f):
146 continue
147 if f in m2:
151 if f in m2:
148 queued = 0
152 queued = 0
149
153
@@ -205,8 +209,6 b' def update(repo, node, branchmerge=False'
205 repo.ui.debug(_("working dir created %s, keeping\n") % f)
209 repo.ui.debug(_("working dir created %s, keeping\n") % f)
206
210
207 for f, n in m2.iteritems():
211 for f, n in m2.iteritems():
208 if partial and not partial(f):
209 continue
210 if f[0] == "/":
212 if f[0] == "/":
211 continue
213 continue
212 if f in ma and n != ma[f]:
214 if f in ma and n != ma[f]:
General Comments 0
You need to be logged in to leave comments. Login now