350
edits
mNo edit summary |
No edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{outdated}} | |||
Mercurial is a version control system, like [[svn|subversion]] in that it manages changes in your code, but different in that it's designed to be distributed. Git and bazaar are also distributed version control systems. Mercurial is also written in python, which is [http://xkcd.com/353/ cool]. It's built in web interface is also excellent. | Mercurial is a version control system, like [[svn|subversion]] in that it manages changes in your code, but different in that it's designed to be distributed. Git and bazaar are also distributed version control systems. Mercurial is also written in python, which is [http://xkcd.com/353/ cool]. It's built in web interface is also excellent. | ||
| Line 30: | Line 32: | ||
<pre> | <pre> | ||
RewriteEngine On | |||
################################## | ################################## | ||
# Force all access to over https # | # Force all access to over https # | ||
| Line 35: | Line 38: | ||
RewriteCond %{SERVER_PORT} 80 | RewriteCond %{SERVER_PORT} 80 | ||
RewriteRule (.*) https://www.redbrick.dcu.ie/~receive/hg | RewriteRule (.*) https://www.redbrick.dcu.ie/~receive/hg/ | ||
| Line 98: | Line 101: | ||
with | with | ||
Require user | Require user username1 username2 (Obviously replace username1 username2 with actual usernames etc) | ||
== Cloning the Repo == | == Cloning the Repo == | ||
| Line 107: | Line 109: | ||
Go to whatever computer you want to start writing code on and clone a copy of the repo | Go to whatever computer you want to start writing code on and clone a copy of the repo | ||
andrew@laptop:~ $ hg clone https://www.redbrick.dcu.ie/~receive/hg | andrew@laptop:~ $ hg clone https://www.redbrick.dcu.ie/~receive/hg/ | ||
Now I have a copy of the repo on my laptop I can work on. You should [http://mercurial.selenic.com/guide/ read the guide] to see all the commands that are available, but the basics you'll need are hg add and hg commit. | Now I have a copy of the repo on my laptop I can work on. You should [http://mercurial.selenic.com/guide/ read the guide] to see all the commands that are available, but the basics you'll need are hg add and hg commit. | ||
| Line 114: | Line 116: | ||
== Pushing == | == Pushing == | ||
Before you are able to push changes to your repo you will need to specify which users have permission to do so. You will need to add the following lines to the configuration for your repo (~/hgrepo/.hg/hgrc). | |||
[web] | |||
allow_push = * | |||
If you wish to only give certain users permission to push changes to your repo replace * with their usernames. | |||
Now once you make changes you can push them back to your repo on RedBrick. | |||
andrew@laptop:~/hg $ hg push | andrew@laptop:~/hg $ hg push | ||
You can now look at the changes on the web interface :) | You can now look at the changes on the web interface :) | ||
[[Category:HowTo]] | |||
[[Category:Software]] | |||