Nerdanel wrote:
By the way, how should I convert? I'm confused by how you can have copies and forks and suchlike.
It's a lot like CVS except that you are eliminating the middle-man. Whenever you checkout (clone) a repository, you get a full copy, including all history. You can do all operations in your copy withouth needing a central server (here's the distributed part).
So you can revert, merge stuff, modify, without fear of altering anyone else's work. You can send your changes or get someone else's changes whenever you want.
Cloning a repository is a very fast and efficient task, it's for example a good practice to have 3 repositories, one synced to the official repository, one where you have all your changes and another where you can test someone else patches.
To checkout a repository, you use the clone command:
hg clone
http://example.com/somerepoYou can clone locally, to have as many repositores as you need.
hg clone /path/to/repo /path/to/my/new/repo
To send your changes to another repository, you use the push command, it works for local and remote repositories.
hg push /path/to/repo
If you omit the path, it will default to the repo you cloned from.
To get changes from another repo, you use the pull command, it works similar to the push command and will also default to the repo you cloned from.
hg pull /path/to/changes/repo
However, if you pull, you need to execute the update command, that will actually modify your working directory:
hg update
When you have changed files in your copy, you must commit them. Mercurial will ask you for a commit message, just like CVS
hg commit [files]
But before you commit, make sure you run the status command to review the changes.
hg status [files]
And to see what actually changed, use the diff command:
hg diff [files]
If you omit the files parameter, the command will be applied to all files.
That's a quick introduction, there's much more that can be done, but I think I have covered the basics.