User:Giszmo/hgsession1From Globulation2ContentsExample: Get a working copyGet all that there is both source and binary data like pictures and sounds. cd ~/projects/ hg clone http://hg.globulation2.org/glob2/ glob2 Example: Create a branchcd ~/projects/ hg clone glob2 name_of_branch_or_not cd name_of_branch_or_not hg branch name_of_branch Example: Edit of existing branchget a working directorycd ~/projects/ hg clone -r unitAssignmentByLeo glob2 hgtest cd hgtest hg update -r unitAssignmentByLeo modifycreate new filesecho "only a test" > hgdemo.txt echo "only a test" > hgdemo2.txt put the new files under the control of hg hg add hgdemo*.txt create a new changeset. (one changeset may contain several changes to files. If we hg remove the files again before we commit we will be told there's nothing to commit. hg commit -m "added a file to show how hg works" pull changes in the main branch called "default" into this branchhg pull -r default ../glob2 hg merge hg commit -m "merged default" undo file additionshg remove hgdemo*.txt hg commit -m "removed demo files again" push to local main repositoryhg push -r unitAssignmentByLeo ../glob2 push to online repositoryAfter checking with "hg history", "hg view" and "hg serve" that everything looks like I want (especially the branch of my changesets should not be "default" for now) I can push it to the server: cd ../glob2/ hg push -r unitAssignmentByLeo https://hg.globulation2.org/glob2/ a full transcript of this exampleleo@Nemo:~/projects$ hg clone -r unitAssignmentByLeo glob2 hgtest requesting all changes adding changesets adding manifests adding file changes added 2968 changesets with 12911 changes to 696 files 411 files updated, 0 files merged, 0 files removed, 0 files unresolved leo@Nemo:~/projects$ cd hgtest leo@Nemo:~/projects/hgtest$ echo "only a test" > hgdemo.txt leo@Nemo:~/projects/hgtest$ echo "only a test" > hgdemo2.txt leo@Nemo:~/projects/hgtest$ hg add hgdemo*.txt leo@Nemo:~/projects/hgtest$ hg commit -m "added a file to show how hg works" leo@Nemo:~/projects/hgtest$ hg pull -r default ../glob2 pulling from ../glob2 searching for changes no changes found leo@Nemo:~/projects/hgtest$ hg update -C 1820 files updated, 0 files merged, 5 files removed, 0 files unresolved leo@Nemo:~/projects/hgtest$ hg remove hgdemo*.txt leo@Nemo:~/projects/hgtest$ hg commit -m "removed demo files again" leo@Nemo:~/projects/hgtest$ hg push -r unitAssignmentByLeo ../glob2 pushing to ../glob2 searching for changes note: unsynced remote changes! adding changesets adding manifests adding file changes added 1 changesets with 0 changes to 0 files leo@Nemo:~/projects/hgtest$ hg branch unitAssignmentByLeo leo@Nemo:~/projects/hgtest$ cd ../glob2/ leo@Nemo:~/projects/glob2$ hg history -l 4 changeset: 3037:386605b3d592 branch: unitAssignmentByLeo tag: tip user: leo <leo.wandersleb@gmx.de> date: Sun Jan 27 03:23:48 2008 +0100 summary: removed demo files again changeset: 3036:b088f08f9787 branch: unitAssignmentByLeo parent: 3035:a581b9697809 parent: 3034:74c0094d81d9 user: leo <leo.wandersleb@gmx.de> date: Sun Jan 27 03:05:33 2008 +0100 summary: merged default changeset: 3035:a581b9697809 branch: unitAssignmentByLeo parent: 3014:a753a0366f75 user: leo <leo.wandersleb@gmx.de> date: Sun Jan 27 03:04:09 2008 +0100 summary: added a file to show how hg works changeset: 3034:74c0094d81d9 user: Stephane Magnenat <stephane at magnenat dot net> date: Sun Jan 20 20:31:21 2008 +0100 summary: Added iterators in the direction of a clean structure for collections leo@Nemo:~/projects/glob2$ hg push -r unitAssignmentByLeo https://hg.globulation2.org/glob2/ pushing to https://hg.globulation2.org/glob2/ http authorization required realm: Enter your globulation 2 mercurial username user: leo password: searching for changes adding changesets adding manifests adding file changes added 3 changesets with 11 changes to 11 files (-1 heads) some great commandsstart a server to inspect your repository using sudo hg serve -p 80 a structural view of the merges is best represented by hg view to see the branches, too use hg history -l 10 | ||