|
1 | | -====== W3C Mercurial (hg) for Dummies ====== |
| 1 | +====== Installing Mercurial ====== |
2 | 2 |
|
3 | | -===== What you need beforehand ===== |
4 | | - - A W3C member access username and password |
| 3 | +===== Windows ===== |
5 | 4 |
|
6 | | -===== Installing Mercurial ===== |
| 5 | + * Install [[http://tortoisehg.bitbucket.org/|TortoiseHg]] to get both GUI and command line tools installed. |
7 | 6 |
|
8 | | -==== Windows ==== |
| 7 | +===== Linux (Debian-based) ===== |
| 8 | + |
| 9 | + $ sudo apt-get install mercurial |
| 10 | + |
| 11 | +===== Linux (Fedora-based) ===== |
| 12 | + # yum install mercurial |
9 | 13 |
|
10 | | - * Install [[http://tortoisehg.bitbucket.org/|TortoiseHg]] to get both GUI and command line tools installed. |
11 | 14 |
|
12 | | -==== Mac OS X ==== |
| 15 | +===== Mac OS X ===== |
13 | 16 |
|
14 | 17 | You need to first install Mercurial on your system. |
15 | 18 |
|
@@ -152,53 +155,3 @@ If you already have the latest version of Mercurial, you should not get any mess |
152 | 155 | <code bash>sudo port uninstall outdated</code> |
153 | 156 |
|
154 | 157 | Note that Mercurial is a Python application. Although OS X has Python pre-instaled, MacPorts will install its own version of Python into /opt/local/bin so that it can manage dependencies between packages. This will not interfere with your normal Python installation. Currently, on OS X Mercurial will use Python version 2.7. Note that if you install any extensions to Mercurial via MacPorts, you'll need to use the py27- version of the extension. |
155 | | - |
156 | | -Skip to "Configuring Mercurial for use with W3C specs". |
157 | | - |
158 | | -==== Linux (Debian-based) ==== |
159 | | - |
160 | | - $ sudo apt-get install mercurial |
161 | | -==== Linux (Fedora-based) ==== |
162 | | - # yum install mercurial |
163 | | - |
164 | | -===== Configuring Mercurial for use with W3C specs ===== |
165 | | -Create a file in your home directory called ".hgrc", or "%USERPROFILE%\mercurial.ini" on Windows. Give it the following contents, but with the name, email, username, and password replaced appropriately: |
166 | | - |
167 | | - [ui] |
168 | | - username = Your Full Name <your@email.address.example> |
169 | | - |
170 | | - [auth] |
171 | | - w3c.prefix = https://dvcs.w3.org/hg/ |
172 | | - w3c.username = yourusername |
173 | | - w3c.password = yourpassword |
174 | | - |
175 | | -If you don't want to store your password in the config file, you can [[http://mercurial.selenic.com/wiki/KeyringExtension|install the Keyring extension]] and omit the password line. The Keyring extension will prompt you for your password the first time it is needed and store it securely in your system keyring. |
176 | | - |
177 | | -If you access the web through a proxy, you'll also need to set that up now. [[http://www.selenic.com/mercurial/hgrc.5.html#http-proxy|Details of proxy settings can be found here]]. |
178 | | - |
179 | | -===== Using Mercurial to edit a W3C spec ===== |
180 | | - |
181 | | -Mercurial is a distributed version control system. (See [[tools:hg| Mercurial Quick Guide]] for more information.) |
182 | | - |
183 | | -TO DO: explain atomic commits (and how you should use them) |
184 | | - |
185 | | -TO DO: explain distributed nature (and attribution of commits) Note: we have the quick guide page (linked above), we should merge all general Mercurial info there, and have this page be only about accessing the specs. The quick guide page is currently targeted towards test suite access, that should be factored into it's own access page. |
186 | | - |
187 | | -==== Clone a repository ==== |
188 | | - |
189 | | -First, you need to clone the repository to your local machine so you have a copy of it. Go to a command prompt in the parent of the directory you want the repository in, and then run the command: |
190 | | - hg clone https://dvcs.w3.org/hg/FXTF/ |
191 | | -You should then see output like this: |
192 | | - destination directory: FXTF |
193 | | - requesting all changes |
194 | | - adding changesets |
195 | | - adding manifests |
196 | | - adding file changes |
197 | | - added 78 changesets with 799 changes to 642 files |
198 | | - updating to branch default |
199 | | - 137 files updated, 0 files merged, 0 files removed, 0 files unresolved |
200 | | -This has now created a directory called "FXTF" inside of that directory with all of the FX task force specs |
201 | | - |
202 | | -==== hg pull / push ( / incoming / outgoing) ==== |
203 | | - |
204 | | -==== hg commit / update ( / diff) ==== |
0 commit comments