Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

merge with stable

Changeset ee4e27d92f01

Parents 174f73d980d2

Parents 0decf4fabc67

by Steve Borho

Changes to 3 files · Browse files at ee4e27d92f01 Showing diff from parent 174f73d980d2 0decf4fabc67 Diff from another changeset...

Added image
 
15
16
17
18
 
19
20
21
 
15
16
17
 
18
19
20
21
@@ -15,7 +15,7 @@
 On Windows,   TortoiseHg consists of a shell extension, which provides overlay   icons and context menus in your file explorer, and a command line - program named hgtk.exe which can launch the TortoiseHg tools. + program named :file:`hgtk.exe` which can launch the TortoiseHg tools.   Binary packages of TortoiseHg for Windows come with Mercurial and a   merge tool and are thus completely ready for use "Out of the Box".  
 
11
12
13
14
15
16
17
18
 
 
 
 
 
 
 
 
19
20
21
 
27
28
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
31
 
 
 
 
 
 
 
 
 
 
32
33
34
35
36
37
38
39
 
 
40
41
 
 
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
44
45
 
 
 
 
 
46
47
48
 
 
 
49
50
51
52
53
 
 
 
54
55
56
 
 
 
 
 
57
58
59
 
63
64
65
66
 
 
 
67
68
69
 
 
 
 
 
70
71
72
 
11
12
13
 
 
 
 
 
14
15
16
17
18
19
20
21
22
23
24
 
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
 
66
67
68
 
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
 
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
 
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 
135
136
137
 
138
139
140
141
142
143
144
145
146
147
148
149
150
151
@@ -11,11 +11,14 @@
   To get started, suppose you volunteer to create the first version. There are  `ways of importing already existing repositories <http://mercurial.selenic.com/wiki/RepositoryConversion>`_ -but lets assume we're starting from scratch. First you need to make sure -that you are correctly identified in TortoiseHg. You do this by -adjusting the global settings of TortoiseHg. Try right-clicking your -source folder and following -:menuselection:`TortoiseHg --> Global Settings` +but lets assume we're starting from scratch. + +Configuring TortoiseHg +====================== + +First you need to make sure that you are correctly identified in TortoiseHg. +You do this by adjusting the global settings of TortoiseHg. Try right-clicking your +source folder and following :menuselection:`TortoiseHg --> Global Settings`    .. figure:: figures/contextmenu.png   :alt: Context Menu @@ -27,33 +30,102 @@
  If you forget to set your name TortoiseHg will ask you for it at the   first *commit*, when the name is first required.   +.. note:: + There is no written rule on how to write the user name, and you can + set any text, but it is commonly used the following convention:: + + name <email> + + for example :: + + Donald Duck <donaldduck@example.net> + + TortoiseHg only strips the email address in changelog viewer, while + the built-in web server obfuscates email addresses to prevent spams. + +Initialize the repository +========================= +  Create the repository on your local machine by using the -:guilabel:`Create Repository Here` selection above. Mercurial places a +:guilabel:`Create Repository Here` selection above, or, within the folder, +type :command:`hgtk init`. + +.. figure:: figures/init.png + :alt: Init dialog + +We suggest to keep checked :guilabel:`Add special files (.hgignore, ...)` +and do not check :guilabel:`Make repo compatible with Mercurial 1.0` +(unless you have a strong reason to do this). +After pressing :guilabel:`Create` Mercurial places a  subdirectory in your folder called :file:`.hg`. This is where it keeps  all its versioning information. It is called the *repository*, and the  directory containing the repository is called the *working directory*.  You never specify the :file:`.hg` directory. It is mentioned here just  so you'll better understand how Mercurial is working.   -Add the files contained in the folder by following the menu -:menuselection:`TortoiseHg --> Add Files`. +Add files +=========   -.. {{images/image008.gif}} +Now it's time to say to Mercurial which files must be tracked and which +files must be ignored. There are a lot of way to do this:   +1. To add files, select them in explorer and then select :menuselection:`TortoiseHg --> Add Files` + in the context menu. In this way the adding action happens immediately and no + TortoiseHg dialogs appear, you can see the overlay icons changed. + +2. Open the status dialog: :menuselection:`TortoiseHg --> View File Status` or + from command line :command:`hgtk status`. Check the files you want to add and + then press the :guilabel:`Add` button. In this dialog you can open the + ignore filter dialog from the context menu :guilabel:`ignore` over a unknown file. + +3. Skip this step and wait the next commit. The commit tool is very similar to the + status dialog and you can do the same things. In this dialog you can, also, add a + file by just check it and commit. + +4. To ignore files, open the ignore filter dialog: :menuselection:`TortoiseHg --> Edit Ignore Filter` + or from command line :command:`hgtk hgignore`. Choose the file from the list + and then press or write a *Glob* or *Regular expression* filter and then press + :guilabel:`Add`. + +.. warning:: + The :file:`.hgignore` file, which contains the list of file to ignore, must be + tracked by Mercurial. Remember to add it. + +.. note:: + It is not a good practice to have a lot of *unknown* files. Keep the + :file:`.hgignore` file updated. + +Commit +====== +  Commit to your local repository by right-clicking anywhere in the  folder, or on the folder itself, and then selecting -:guilabel:`HG Commit ...`. +:guilabel:`HG Commit ...`, or from command line type :command:`hgtk commit`. +Select the files you want to commit, write a message and then press +:guilabel:`Commit`. If, after the commit, you realize that something was wrong +(the message or the selected files) you can cancel the last commit using the +:guilabel:`Undo` button.    .. {{images/image001.png}}   +Share the repository +==================== +  Now you are ready to share your work. You do this by making a copy of  your repository in a public place that everyone in your group can  access. Mercurial calls this *cloning your repository*. Clone your  repository to a common area, such as a shared drive or web site, which -will be the merge point for the team. +will be the merge point for the team. From the shared drive select +:menuselection:`TortoiseHg --> Clone a Repository`, or +:command:`hgtk clone` from command line.    .. {{images/image003.gif}}   +When you create a clone for *central repository* purpose there is no +reason to have here an updated working directory. Check +:guilabel:`do not update the new working directory` in order to have +an empty working directory. +  Other team members will then work from this clone.    Fetching from the group repository @@ -63,10 +135,17 @@
 like *fetch the repository from x*. What does it mean? It means that  you want to make a copy of the repository saved at x on your local  machine. Mercurial calls this cloning and has a special interface for -it. Right click in the directory where you want your copy +it. Right click in the directory where you want your copy and select +:menuselection:`TortoiseHg --> Clone a Repository`, or +:command:`hgtk clone` from command line (exactly as share the repository).    .. {{images/Clone.gif}}   +This time you want to update the working directory because you want to +work on the project, uncheck :guilabel:`do not update the new working directory` +so Mercurial update the working directory with the *tip* revision. + +  Working with your repository  ============================