- Offline use: You can check in and have the complete history even when you are not connected.
- Branches: If you have something that is not yet finished (say, when moving from your work computer to your home computer) or want to try out things, you can always introduce an intermediate repository. If you are not happy with where you ended up, you can discard this repository, otherwise you push its changes.
Quickstart:
- Install: a binary (easy_install works really well)
- Test on command line: hg debuginstall
- If the test fails on Mac OS X: In Terminal, uncheck the option “Preferences -> Settings -> Advanced -> Set LANG environment variable on startup”.
- Eclipse: Merclipse plugin (simpler than Mercurial Eclipse).
- After installing it, check its section among the Eclipse preferences and make sure that it finds the “hg” command.
- If not, there are two ways to fix things under Mac OS X: Start Eclipse from the command line (where it uses the same environment variables as during the debuginstall test). Or set the GUI environment variables in ~/.MacOSX/environment.plist
- Netbeans: support is built in
- Authentication under Merclipse: work-around via user:password@http://hosting.org/repo/
- Cannot group several projects in one “module”, need a repository for each.
- Mercurial files are only in the top-level directory: .hg/ and .hgignore
- More information: at the Mercurial web site.
cd mydirFirst steps (downloading)
hg init # turns the directory into a repository
hg stat # check what files are visible to Mercurial, edit .hgignore accordingly
hg add # add all files that are visible to Mercurial
hg commit # commit the changes to the local repository
hg push http://hosting.org/repo/ # push change (URL only needed for the 1st time)
hg clone http://hosting.org/repo/Mercurial hosting: There are many great options if you want to host your Mercurial repository on a public server. Free examples:
# perform changes
hg commit
hg push
- freeHg.org: Only hosting, nothing else (issue tracker, wiki, ...)
- Bitbucket: Nice clean interface, adequate free plan.
- ShareSource: For open source projects, a bit more complicated than Bitbucket.
ليست هناك تعليقات:
إرسال تعليق