Does merge direction matter in Mercurial? -


take simple example: i'm working on default branch, have changesets committed locally, , pulled few more master repository. i've been working few days in isolated local repository, there's quite few changes merge before can push results master.

default ---o-o-o-o-o-o-o-o-o-o-o  (pulled stuff)             \              o----o------------o  (my stuff) 

i can 2 things now.

option #1:

hg pull hg merge 

result #1:

default ---o-o-o-o-o-o-o-o-o-o-o             \                   \              o----o------------o-o 

option #2:

hg pull hg update hg merge 

result #2:

default ---o-o-o-o-o-o-o-o-o-o-o-o             \                   /              o----o------------o 

these 2 results isomorphic me, in practice seems option #2 results in way smaller changesets (because applies few changes mainline instead of applying mainline changes few).

my question is: matter? should care direction of merges? saving space if this? (doing hg log --patch --rev tip after merge suggests so.)

they're (effectively) identical. see difference in hg log --patch --rev x output size because log shows diff of result , (arbitrarily) 'left' parent (officially p1), that's not how it's stored (mercurial has binary diff storage format isn't patch/diff based) , it's how it's computed (p1, p2, , most-recent-common-ancestor used).

the real difference is, if you're using named branches, branch name of left parent.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -