##// END OF EJS Templates
merge: eliminate confusing queued variable
Matt Mackall -
r3113:d1d1cd5b default
parent child Browse files
Show More
@@ -116,8 +116,6 b' def manifestmerge(ui, m1, m2, ma, overwr'
116 # Compare manifests
116 # Compare manifests
117 for f, n in m1.iteritems():
117 for f, n in m1.iteritems():
118 if f in m2:
118 if f in m2:
119 queued = 0
120
121 # are files different?
119 # are files different?
122 if n != m2[f]:
120 if n != m2[f]:
123 a = ma.get(f, nullid)
121 a = ma.get(f, nullid)
@@ -125,25 +123,28 b' def manifestmerge(ui, m1, m2, ma, overwr'
125 if not overwrite and n != a and m2[f] != a:
123 if not overwrite and n != a and m2[f] != a:
126 ui.debug(_(" %s versions differ, resolve\n") % f)
124 ui.debug(_(" %s versions differ, resolve\n") % f)
127 action.append((f, "m", fmerge(f, m1, m2, ma), n[:20], m2[f]))
125 action.append((f, "m", fmerge(f, m1, m2, ma), n[:20], m2[f]))
128 queued = 1
129 # are we clobbering?
126 # are we clobbering?
130 # is remote's version newer?
127 # is remote's version newer?
131 # or are we going back in time and clean?
128 # or are we going back in time and clean?
132 elif overwrite or m2[f] != a or (backwards and not n[20:]):
129 elif overwrite or m2[f] != a or (backwards and not n[20:]):
133 ui.debug(_(" remote %s is newer, get\n") % f)
130 ui.debug(_(" remote %s is newer, get\n") % f)
134 action.append((f, "g", m2.execf(f), m2[f]))
131 action.append((f, "g", m2.execf(f), m2[f]))
135 queued = 1
132 # local is newer, not overwrite, check mode bits
133 elif m1.execf(f) != m2.execf(f):
134 mode = fmerge(f, m1, m2, ma)
135 if mode != m1.execf(f):
136 ui.debug(_(" updating permissions for %s\n") % f)
137 action.append((f, "e", m2.execf(f)))
136
138
137 # do we still need to look at mode bits?
139 # contents same, check mode bits
138 if not queued and m1.execf(f) != m2.execf(f):
140 elif m1.execf(f) != m2.execf(f):
139 if overwrite:
141 if overwrite:
140 ui.debug(_(" updating permissions for %s\n") % f)
142 ui.debug(_(" updating permissions for %s\n") % f)
141 action.append((f, "e", m2.execf(f)))
143 action.append((f, "e", m2.execf(f)))
142 else:
144 else:
143 mode = fmerge(f, m1, m2, ma)
145 mode = fmerge(f, m1, m2, ma)
144 if mode != m1.execf(f):
146 if mode != m1.execf(f):
145 ui.debug(_(" updating permissions for %s\n")
147 ui.debug(_(" updating permissions for %s\n") % f)
146 % f)
147 action.append((f, "e", m2.execf(f)))
148 action.append((f, "e", m2.execf(f)))
148 del m2[f]
149 del m2[f]
149 elif f in ma:
150 elif f in ma:
General Comments 0
You need to be logged in to leave comments. Login now