imfreedom/contributors-guide

Re-work the mercurial configuration section

16 months ago, Gary Kramlich
263362a32cd3
Parents c537f53d4899
Children 6e49362c1576
Re-work the mercurial configuration section

It was kind of confusing the way it was structured before and by putting all of
the information in the configuration we're telling users to copy, that means it
will be there for them later.

Testing Done:
Ran codespell and verified in a browser

Reviewed at https://reviews.imfreedom.org/r/2120/
--- a/docs/code_contributions.md Wed May 18 02:20:23 2022 -0500
+++ b/docs/code_contributions.md Mon Dec 12 01:10:52 2022 -0600
@@ -45,83 +45,48 @@
more information about it
[here](https://www.mercurial-scm.org/wiki/EvolveExtension).
-When working with Mercurial repositories it is very important to make sure that
-your username is set properly as it is added to every commit you make. To set
-your username you must add it to the `[ui]` section in your `$HOME/.hgrc` like
-the following example.
+Next you'll want to copy the configuration below and save it in `$HOME/.hgrc`,
+making sure to edit the username of course!
```ini
[ui]
+# Your username will be added to every commit so make sure it's set properly.
+# However, this won't be used when your review requests are landed, for that
+# you need to make sure your name and email are set properly in reviewboard.
username = Full Name <email@example.com>
-```
-
-Next we need to make sure that the ***evolve*** and ***rebase*** extensions are
-loaded. To do so add the lines in the following example. You do not need to put
-anything after the `=` as this will tell Mercurial to look for them in the
-default places for extensions.
-
-```ini
-[extensions]
-evolve =
-rebase =
-```
-
-Next we're going to create a ***revsetalias*** named `wip` which is short for
-"Work In Progress". This will be used to make it easier to look at your history
-and submit your review request.
-
-```ini
-[revsetalias]
-wip = only(.,default)
-```
-
-This alias will show us just the commits that are on our working branch and not
-on the `default` branch. The `default` branch is where all accepted code
-contributions go. Optionally, you can add the `wip` command alias below which
-will show you the revision history of what you are working on.
-```ini
-[alias]
-wip = log --graph --rev wip
-```
-
-There are quite a few other useful configuration changes you can make, and a
-few examples can be found below.
-
-```ini
-[ui]
-# update a large number of settings for a better user experience, highly
-# recommended!!
-tweakdefaults = true
-
-[alias]
-# make hg log show the graph as well as commit phase
-lg = log --graph --template phases
-```
-
-Below is all of the above configuration settings to make it easier to
-copy/paste.
-
-```ini
-[ui]
-username = Full Name <email@example.com>
-# update a large number of settings for a better user experience, highly
-# recommended!!
+# This setting updates a large number of settings for a better user experience,
+# and is highly recommended for that reason!!
tweakdefaults = true
[extensions]
+# Mercurial has support for extensions and there are a few we want to turn on.
+# We do not specify a value which tells Mercurial to look for them in the
+# default locations.
+
+# The rebase extension allows us to move a commit. This is very useful when an
+# upstreamed change causes some conflict with your local code and will make it
+# easier for you to resolve the conflict.
+rebase =
+
+# The evolve extension lets you safely edit history.
evolve =
-rebase =
+
+[revsetalias]
+# revsetaliases are shortcuts to select commits to operate on.
+
+# This wip revsetalias will select all commits that are on your current branch
+# but not on the default branch.
+wip = only(.,default)
[alias]
-# make hg log show the graph as well as commit phase
+# The lg alias is the same as the normal `hg log` but it will show the graph as
+# well as commit phase in its output.
lg = log --graph --template phases
-# show everything between the upstream and your wip
+# The wip alias will show every commit between the upstream and your work in
+# progress.
wip = log --graph --rev wip
-
-[revsetalias]
-wip = only(.,default)
```
### Log in to Review Board