Ticket UUID: | 58339f7b10de7c67e09ef41ba9d90c7dc4c972f1 | ||
Title: | The excellent branching wiki, needs a similar "how to merge" page... | ||
Status: | Open | Type: | Documentation |
Severity: | Minor | Priority: | Low |
Subsystem: | Resolution: | Open | |
Last Modified: | 2010-05-23 19:47:41 | ||
Version Found In: | [3343450e64] 2010-05-21 16:21:04 | ||
Description & Comments: | |||
I found the branching page very useful:
http://www.fossil-scm.org/index.html/doc/tip/www/branching.wikithank you for writing that. One bit needs expanding for those of us who are new to version control as well as fossil (just above figure 3): To resolve this situation, Alice can use the fossil merge command to merge in Bob's changes in her local copy of check-in 3. Then she can commit the results as check-in 5. This results in a tree as shown in figure 3. ...but how?!!! I created a fork in the manner described, but it seems that Alice has no indication that Bob has made a fork and would happily carry on on her own making more and more changes... Is there some indicator I'm missing? If she does a fossil update, I can see that fossil diff notices a change, and fossil merge says bad things have happened, but I have no idea what to do about it... Here is what I've been up to: C:\tmp\fossil>dir Volume in drive C has no label. Volume Serial Number is 4C8C-4143 Directory of C:\tmp\fossil 22/05/2010 08:42 PM <DIR> . 22/05/2010 08:42 PM <DIR> .. 22/05/2010 08:38 PM 864,768 fossil.exe 22/05/2010 08:41 PM 209 manifest 22/05/2010 08:41 PM 41 manifest.uuid 22/05/2010 08:41 PM 52,224 Test.fossil 22/05/2010 08:40 PM 32 Test.txt 5 File(s) 917,274 bytes 2 Dir(s) 61,822,676,992 bytes free C:\tmp\fossil>type test.txt Line 1 Line 2 Line 3 Line 4 C:\tmp\fossil>fossil open Test.fossil Test.txt project-name: <unnamed> repository: C:/tmp/fossil/Test.fossil local-root: C:/tmp/fossil/ user-home: C:/Users/Alice/AppData/Local project-code: cd278cccb1fe96312af904be9d2fac0e942a777c server-code: 2b9fde97a0fdf6a42774b4417e325d201b783491 checkout: 6b297dec4f5a51d94e53e416b8926ce84e7f79e2 2010-05-22 19:41:29 UTC parent: 5b5b6a6cc6ab0069b7c5edc3894a01f323ddf651 2010-05-22 19:18:34 UTC tags: trunk C:\tmp\fossil>type test.txt Line 1 Line 2 Line 3 Line 4 C:\tmp\fossil>fossil checkout --latest C:\tmp\fossil>type test.txt Line 1 Line 2 Line 3 Line 4 C:\tmp\fossil>fossil update Autosync: http://Ross@mesh-elite-d805:8080/Test.fossil Bytes Cards Artifacts Deltas Send: 130 1 0 0 Received: 1012 22 0 0 Total network traffic: 330 bytes sent, 737 bytes received C:\tmp\fossil>type test.txt Line 1 Line 2 Line 3 Line 4 C:\tmp\fossil>fossil merge e6fb455f91 MERGE Test.txt ***** 1 merge conflicts in Test.txt C:\tmp\fossil>fossil diff Index: Test.txt =================================================================== --- Test.txt +++ Test.txt @@ -1,4 +1,6 @@ Line 1 Line 2 Line 3 -Line 4 +>>>>>>> BEGIN MERGE CONFLICT +Line 5============================ +Line 4<<<<<<< END MERGE CONFLICT C:\tmp\fossil>fossil merge --cherrypick e6fb455f91 MERGE Test.txt ***** 1 merge conflicts in Test.txt </pre> What does --cherrypick do? Oh, and Bob's Test.txt looks like this: <pre> Line 1 Line 2 Line 3 Line 5 So how is Alice to know Bob made a fork (without having to look on the web page for Branches before editing every file)? She presumably has to use the Branches page to find out the version of her prong of the fork to do the merge, but how does she actually do the merge? anonymous claiming to be Arnel added on 2010-05-23 17:00:51: If there are conflicts that Fossil cannot resolve on its own (like changes made on the same line), you may need to step in and resolve the conflicts yourself. anonymous added on 2010-05-23 19:47:41: I expected Alice to have to notice that a fork had happened, somehow, then copy her local Test.txt elsewhere so it didn't get overwritten, then pull, then use some diff app like kdiff3 to compare the two versions... but all that happens is that fossil adds MERGE CONFLICT to the file in the problem areas, so she can search for those and edit in just the one file. Checked-in binaries are, I guess, a whole different problem? I need to try it again to make sure I've got it: I merged before pulling, which may have made it so Alice didn't need to realise there was a fork... |