annotate help/topics/34.txt @ 532:06507a59f2b8 easyhg_v1.1

This will do for the Merge topic
author Chris Cannam
date Wed, 23 Nov 2011 17:24:47 +0000
parents f56e5c39aad1
children e40e3ebe9f2e
rev   line source
Chris@531 1 {Sharing changes}
Chris@531 2
Chris@531 3 How do I use the Merge window?
Chris@531 4
Chris@531 5 If you are working with other people on a project, it is likely that
Chris@531 6 at some point you'll find that more than one of you have edited the
Chris@531 7 same lines in the same file, in different ways.
Chris@531 8
Chris@531 9 When that happens and you try to merge the two versions, EasyMercurial
Chris@531 10 will pop up a merge window that looks a bit like this.
Chris@531 11
Chris@531 12 #merge50
Chris@531 13
Chris@532 14 (This is actually a separate program, not part of EasyMercurial: it's
Chris@532 15 a merge tool called kdiff3.)
Chris@531 16
Chris@531 17 This looks a bit complicated, but it is there to help you pick which
Chris@531 18 of the changes from each of the two "rival" versions of the file you
Chris@531 19 want to use in your merged version.
Chris@531 20
Chris@532 21 *The top middle one is _your current version_.* That's
Chris@532 22 the one you had before you decided to merge the other version into
Chris@532 23 it.
Chris@531 24
Chris@532 25 *At top right is _the version you're merging_.* That's the other
Chris@532 26 rival version -- the one that the other person can see in their copy
Chris@532 27 of the repository.
Chris@532 28
Chris@532 29 *At top left is _the common ancestor_.* That's the version that both
Chris@532 30 of you had, before you started editing it in different ways.
Chris@532 31
Chris@532 32 *At the bottom is the output.*
Chris@532 33
Chris@532 34 Each _conflict_ (a line which you have both changed in different ways)
Chris@532 35 is shown with *Merge Conflict* in the output at the bottom. To sort
Chris@532 36 out the conflicts and get the right output, you need to go through
Chris@532 37 them one by one, for each one pressing the A, B, or C button to say
Chris@532 38 whether for this line you want the top-left, top-middle, or top-right
Chris@532 39 version to "win". (You can choose more than one, if you want both
Chris@532 40 versions of a line to appear.)
Chris@532 41
Chris@532 42 Then having resolved a conflict, press the three-arrows-down toolbar
Chris@532 43 button to go to the next one -- and when you've done them all, save
Chris@532 44 and exit.
Chris@532 45
Chris@532 46 The most important thing to remember is that _whatever appears in the
Chris@532 47 bottom pane is what you'll get as a result_.
Chris@532 48
Chris@532 49 No matter how confusing the process, just remember that if it looks
Chris@532 50 correct in the bottom pane, it will be correct when you save and
Chris@532 51 exit. You can even edit the file directly in the bottom pane if you
Chris@532 52 aren't happy with the way the merge is going.
Chris@532 53
Chris@532 54
Chris@532 55
Chris@532 56