First install Mercurial and TortoiseHg.
With hg init you create a new repository.
- Your project folder
/projectcontaining your wackowiki folder /wacko and source files is called Working Directory.
- Mercurial adds subdirectory
/project/.hgin your project folder. This new subdirectory is your new Repository, where all version data is kept.
$ cd /project $ hg init
Your new repository will be added to the Registry of your TortoiseHg workbench.
Mercurial does not work with files unless you tell it to manage them. To do that use the add command.
With hg add you add tracking of existing files to your new repository.
- all your files existing in folder:
/project/wackowill be introduced to new repository
- /project/.hg/dirstate will be added
- the entry in the output of hg status changes from “?” to “A”
$ hg add
To add files, select them in explorer. To select all files use [Ctrl]+A.
Then right click and select + Add in the context menu.
With hg commit you create a new changeset.
- enter a commit message
- hg status will have remove added files from output
$ hg commit -m "inital commit to new repository"
Now you need to check in all files. Use the checkbox up top ( #### filter text #### ) to select all files.
By clicking the commit button in the explorer, you will be asked to enter a commit message.
With hg clone, you easily make an identical (local) copy of a repository.
- /project/.hg added to project root directory (new or existing)
- for basic configuration you might want to add and edit
$ cd /project (e.g. /home/user/WackoWiki/wacko-dev) $ hg clone https://bitbucket.org/wackowiki/wackowiki-dev ./WackoWiki/wacko-dev
TortoiseHg: File > Clone Repository
https://bitbucket.org/wackowiki/wackowiki-dev (latest Development Version of WackoWiki)
./WackoWiki/wacko-dev (local WackoWiki project folder)
You should now have a local project directory ( /home/username/WackoWiki/wacko-dev ).
Further Reading: Mercurial: The Definitive Guide – Working with a repository
Create a Mercurial Configuration file
- Configure mercurial?
With hg pull you will easily download just the latest code changes.
With hg commit making changes to your local repository is easy.
Make your edits.
Or find and edit your
Mercurial.ini on Windows,
/.hgrc on Unix, or
.hg/hgrc inside a repo. /Org/Tools/Repository/Doc/HowTos#h1474-5?
Use two clones. Work in clone "main", push and merge in clone "sync", and pull back into clone "main".
Shared Repository Model?
/project/.hgignorecan be used to exclude files from any command on the Working Directory
- /WackoWiki/project/wacko (/home/user/WackoWiki/wackowiki-dev/wacko)
- description of Windows Explorer context menu
- description of configuration file .hgrc
- description of hg-git plugin