Show More
@@ -470,7 +470,7 b' def _itagmerge(repo, mynode, orig, fcd, ' | |||||
470 | success, status = tagmerge.merge(repo, fcd, fco, fca) |
|
470 | success, status = tagmerge.merge(repo, fcd, fco, fca) | |
471 | return success, status, False |
|
471 | return success, status, False | |
472 |
|
472 | |||
473 | @internaltool('dump', fullmerge) |
|
473 | @internaltool('dump', fullmerge, binary=True, symlink=True) | |
474 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
474 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
475 | """ |
|
475 | """ | |
476 | Creates three versions of the files to merge, containing the |
|
476 | Creates three versions of the files to merge, containing the | |
@@ -496,7 +496,7 b' def _idump(repo, mynode, orig, fcd, fco,' | |||||
496 | repo.wwrite(fd + ".base", fca.data(), fca.flags()) |
|
496 | repo.wwrite(fd + ".base", fca.data(), fca.flags()) | |
497 | return False, 1, False |
|
497 | return False, 1, False | |
498 |
|
498 | |||
499 | @internaltool('forcedump', mergeonly) |
|
499 | @internaltool('forcedump', mergeonly, binary=True, symlink=True) | |
500 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, |
|
500 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, | |
501 | labels=None): |
|
501 | labels=None): | |
502 | """ |
|
502 | """ |
@@ -399,7 +399,8 b' class internalmerge(_funcregistrarbase):' | |||||
399 | internalmerge = registrar.internalmerge() |
|
399 | internalmerge = registrar.internalmerge() | |
400 |
|
400 | |||
401 | @internalmerge('mymerge', internalmerge.mergeonly, |
|
401 | @internalmerge('mymerge', internalmerge.mergeonly, | |
402 |
onfailure=None, precheck=None |
|
402 | onfailure=None, precheck=None, | |
|
403 | binary=False, symlink=False): | |||
403 | def mymergefunc(repo, mynode, orig, fcd, fco, fca, |
|
404 | def mymergefunc(repo, mynode, orig, fcd, fco, fca, | |
404 | toolconf, files, labels=None): |
|
405 | toolconf, files, labels=None): | |
405 | '''Explanation of this internal merge tool .... |
|
406 | '''Explanation of this internal merge tool .... | |
@@ -430,6 +431,12 b' class internalmerge(_funcregistrarbase):' | |||||
430 | 'files' and 'labels'. If it returns false value, merging is aborted |
|
431 | 'files' and 'labels'. If it returns false value, merging is aborted | |
431 | immediately (and file is marked as "unresolved"). |
|
432 | immediately (and file is marked as "unresolved"). | |
432 |
|
433 | |||
|
434 | Optional argument 'binary' is a binary files capability of internal | |||
|
435 | merge tool. 'nomerge' merge type implies binary=True. | |||
|
436 | ||||
|
437 | Optional argument 'symlink' is a symlinks capability of inetrnal | |||
|
438 | merge function. 'nomerge' merge type implies symlink=True. | |||
|
439 | ||||
433 | 'internalmerge' instance in example above can be used to |
|
440 | 'internalmerge' instance in example above can be used to | |
434 | decorate multiple functions. |
|
441 | decorate multiple functions. | |
435 |
|
442 | |||
@@ -447,7 +454,14 b' class internalmerge(_funcregistrarbase):' | |||||
447 | fullmerge = 'fullmerge' # both premerge and merge |
|
454 | fullmerge = 'fullmerge' # both premerge and merge | |
448 |
|
455 | |||
449 | def _extrasetup(self, name, func, mergetype, |
|
456 | def _extrasetup(self, name, func, mergetype, | |
450 |
onfailure=None, precheck=None |
|
457 | onfailure=None, precheck=None, | |
|
458 | binary=False, symlink=False): | |||
451 | func.mergetype = mergetype |
|
459 | func.mergetype = mergetype | |
452 | func.onfailure = onfailure |
|
460 | func.onfailure = onfailure | |
453 | func.precheck = precheck |
|
461 | func.precheck = precheck | |
|
462 | ||||
|
463 | binarycap = binary or mergetype == self.nomerge | |||
|
464 | symlinkcap = symlink or mergetype == self.nomerge | |||
|
465 | ||||
|
466 | # actual capabilities, which this internal merge tool has | |||
|
467 | func.capabilities = {"binary": binarycap, "symlink": symlinkcap} |
General Comments 0
You need to be logged in to leave comments.
Login now