Show More
@@ -420,16 +420,18 b' def overridefilemerge(origfn, repo, myno' | |||||
420 | if not lfutil.isstandin(orig): |
|
420 | if not lfutil.isstandin(orig): | |
421 | return origfn(repo, mynode, orig, fcd, fco, fca) |
|
421 | return origfn(repo, mynode, orig, fcd, fco, fca) | |
422 |
|
422 | |||
423 | if not fco.cmp(fcd): # files identical? |
|
423 | ahash = fca.data().strip().lower() | |
424 | return None |
|
424 | dhash = fcd.data().strip().lower() | |
425 |
|
425 | ohash = fco.data().strip().lower() | ||
426 | if repo.ui.promptchoice( |
|
426 | if (ohash != ahash and | |
427 | _('largefile %s has a merge conflict\nancestor was %s\n' |
|
427 | ohash != dhash and | |
428 | 'keep (l)ocal %s or\ntake (o)ther %s?' |
|
428 | (dhash == ahash or | |
429 | '$$ &Local $$ &Other') % |
|
429 | repo.ui.promptchoice( | |
430 | (lfutil.splitstandin(orig), |
|
430 | _('largefile %s has a merge conflict\nancestor was %s\n' | |
431 | fca.data().strip(), fcd.data().strip(), fco.data().strip()), |
|
431 | 'keep (l)ocal %s or\ntake (o)ther %s?' | |
432 | 0) == 1: |
|
432 | '$$ &Local $$ &Other') % | |
|
433 | (lfutil.splitstandin(orig), ahash, dhash, ohash), | |||
|
434 | 0) == 1)): | |||
433 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) |
|
435 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) | |
434 | return 0 |
|
436 | return 0 | |
435 |
|
437 |
@@ -2226,6 +2226,79 b" merge action 'd' for 'local renamed dire" | |||||
2226 | 0 largefiles updated, 0 removed |
|
2226 | 0 largefiles updated, 0 removed | |
2227 | $ cd .. |
|
2227 | $ cd .. | |
2228 |
|
2228 | |||
|
2229 | ||||
|
2230 | Merge conflicts: | |||
|
2231 | ||||
|
2232 | $ hg init merge | |||
|
2233 | $ cd merge | |||
|
2234 | $ echo 0 > f-different | |||
|
2235 | $ echo 0 > f-same | |||
|
2236 | $ echo 0 > f-unchanged-1 | |||
|
2237 | $ echo 0 > f-unchanged-2 | |||
|
2238 | $ hg add --large * | |||
|
2239 | $ hg ci -m0 | |||
|
2240 | Invoking status precommit hook | |||
|
2241 | A f-different | |||
|
2242 | A f-same | |||
|
2243 | A f-unchanged-1 | |||
|
2244 | A f-unchanged-2 | |||
|
2245 | $ echo tmp1 > f-unchanged-1 | |||
|
2246 | $ echo tmp1 > f-unchanged-2 | |||
|
2247 | $ echo tmp1 > f-same | |||
|
2248 | $ hg ci -m1 | |||
|
2249 | Invoking status precommit hook | |||
|
2250 | M f-same | |||
|
2251 | M f-unchanged-1 | |||
|
2252 | M f-unchanged-2 | |||
|
2253 | $ echo 2 > f-different | |||
|
2254 | $ echo 0 > f-unchanged-1 | |||
|
2255 | $ echo 1 > f-unchanged-2 | |||
|
2256 | $ echo 1 > f-same | |||
|
2257 | $ hg ci -m2 | |||
|
2258 | Invoking status precommit hook | |||
|
2259 | M f-different | |||
|
2260 | M f-same | |||
|
2261 | M f-unchanged-1 | |||
|
2262 | M f-unchanged-2 | |||
|
2263 | $ hg up -qr0 | |||
|
2264 | $ echo tmp2 > f-unchanged-1 | |||
|
2265 | $ echo tmp2 > f-unchanged-2 | |||
|
2266 | $ echo tmp2 > f-same | |||
|
2267 | $ hg ci -m3 | |||
|
2268 | Invoking status precommit hook | |||
|
2269 | M f-same | |||
|
2270 | M f-unchanged-1 | |||
|
2271 | M f-unchanged-2 | |||
|
2272 | created new head | |||
|
2273 | $ echo 1 > f-different | |||
|
2274 | $ echo 1 > f-unchanged-1 | |||
|
2275 | $ echo 0 > f-unchanged-2 | |||
|
2276 | $ echo 1 > f-same | |||
|
2277 | $ hg ci -m4 | |||
|
2278 | Invoking status precommit hook | |||
|
2279 | M f-different | |||
|
2280 | M f-same | |||
|
2281 | M f-unchanged-1 | |||
|
2282 | M f-unchanged-2 | |||
|
2283 | $ hg merge | |||
|
2284 | largefile f-different has a merge conflict | |||
|
2285 | ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 | |||
|
2286 | keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or | |||
|
2287 | take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a? l | |||
|
2288 | 0 files updated, 4 files merged, 0 files removed, 0 files unresolved | |||
|
2289 | (branch merge, don't forget to commit) | |||
|
2290 | getting changed largefiles | |||
|
2291 | 1 largefiles updated, 0 removed | |||
|
2292 | $ cat f-different | |||
|
2293 | 1 | |||
|
2294 | $ cat f-same | |||
|
2295 | 1 | |||
|
2296 | $ cat f-unchanged-1 | |||
|
2297 | 1 | |||
|
2298 | $ cat f-unchanged-2 | |||
|
2299 | 1 | |||
|
2300 | $ cd .. | |||
|
2301 | ||||
2229 | Check whether "largefiles" feature is supported only in repositories |
|
2302 | Check whether "largefiles" feature is supported only in repositories | |
2230 | enabling largefiles extension. |
|
2303 | enabling largefiles extension. | |
2231 |
|
2304 |
General Comments 0
You need to be logged in to leave comments.
Login now