Show More
@@ -10,6 +10,11 b' from i18n import gettext as _' | |||
|
10 | 10 | from demandload import * |
|
11 | 11 | demandload(globals(), "util os tempfile") |
|
12 | 12 | |
|
13 | def fmerge(f, local, other, ancestor): | |
|
14 | """merge executable flags""" | |
|
15 | a, b, c = ancestor.execf(f), local.execf(f), other.execf(f) | |
|
16 | return ((a^b) | (a^c)) ^ a | |
|
17 | ||
|
13 | 18 | def merge3(repo, fn, my, other, p1, p2): |
|
14 | 19 | """perform a 3-way merge in the working directory""" |
|
15 | 20 | |
@@ -144,11 +149,7 b' def update(repo, node, branchmerge=False' | |||
|
144 | 149 | # are both different from the ancestor? |
|
145 | 150 | if n != a and m2[f] != a: |
|
146 | 151 | repo.ui.debug(_(" %s versions differ, resolve\n") % f) |
|
147 | # merge executable bits | |
|
148 | # "if we changed or they changed, change in merge" | |
|
149 | a, b, c = ma.execf(f), mw.execf(f), m2.execf(f) | |
|
150 | mode = ((a^b) | (a^c)) ^ a | |
|
151 | merge[f] = (mode, m1.get(f, nullid), m2[f]) | |
|
152 | merge[f] = (fmerge(f, mw, m2, ma), m1.get(f, nullid), m2[f]) | |
|
152 | 153 | s = 1 |
|
153 | 154 | # are we clobbering? |
|
154 | 155 | # is remote's version newer? |
@@ -167,9 +168,7 b' def update(repo, node, branchmerge=False' | |||
|
167 | 168 | repo.ui.debug(_(" updating permissions for %s\n") % f) |
|
168 | 169 | util.set_exec(repo.wjoin(f), m2.execf(f)) |
|
169 | 170 | else: |
|
170 |
|
|
|
171 | mode = ((a^b) | (a^c)) ^ a | |
|
172 | if mode != b: | |
|
171 | if fmerge(f, mw, m2, ma) != mw.execf(f): | |
|
173 | 172 | repo.ui.debug(_(" updating permissions for %s\n") |
|
174 | 173 | % f) |
|
175 | 174 | util.set_exec(repo.wjoin(f), mode) |
General Comments 0
You need to be logged in to leave comments.
Login now