{i} This page appears to contain material that is no longer relevant. Please help improve this page by updating its content.

/!\ This page is primarily intended for Mercurial's developers.

This is no longer part of the current plan. Extensive refactoring of the merge code has cleaned it up a bit, but has not made the table-driven approach easier.

The concept here is to replace the complicated set of nested if statements in localrepo:update with an action table. This will make checking and expanding the merge logic easier.

Some ancient notes:

key
? can't happen
a keep a
b take b
3 merge3
f force replace
. nothing

c = current version
w = working version
p = parent version
t = target version?
F = force enabled
M = merge enabled
fw = forward
bw = backward

backwards means p=b

tree actions
w=c p=w p=t n F M
  0   0   0 ! f m
  0   0   1 ! f ?
  0   1   0 ! f f
  0   1   1 . . .
  1   0   0 ! f m
  1   0   1 b f ?
  1   1   0 f f f
  1   1   1 . . .

file actions
p=a p=b  fw  bw  F  M
  0   0   ?   ?  b  3
  0   1   a   b  b  a
  1   0   b   ?  b  b
  1   1   .   .  .  .


CategoryNewFeatures

TableDrivenMerge (last edited 2012-05-13 09:57:51 by LeviBard)