![]() ![]() This shows how the changeset 2e982bdc137f is a child ofĭ312da7770f4. | o changeset: 0:d312da7770f4 user: Alice date: Wed Mar 10 20:10:05 2010 0000 summary: First version of hello It just gives Alice a new command: alice$ hg glog changeset: 1:2e982bdc137f | tag: tip | user: Alice | date: Wed Mar 10 20:15:00 2010 0000 | summary: Added author. Many of the best extensions are shipped with MercurialĪnd they are easy to enable. Keep the core of Mercurial slim, a lot of functionality is delegated Illustrated with the help of the standard graphlog extension. The two changesets in our repository are in sequence. Then use hg log to retrieve theĪssociated commit message, which can hopefully explain what theĬommitter was trying to do when he changed the line: alice$ hg log -r 1 changeset: 1:2e982bdc137f tag: tip user: Alice date: Wed Mar 10 20:15:00 2010 0000 summary: Added author. The bug, you can use hg annotate to find out when the offending line TortoiseHg offersĪ very nice interactive annotate tool, see thg annotate.Īnnotating files is an invaluable help when fixing bugs: after finding Quite right, Mercurial tells us that the first line is from revisionĠ, and that the two final lines are from revision 1. We can now ask Mercurial to annotate the file, that is, to show whenĮach line was last modified: alice$ hg annotate hello.txt 0: Hello World 1: 1: by Alice. Let us make another change to our file: alice$ echo > hello.txt alice$ echo "by Alice." > hello.txt alice$ hg commit -m "Added author." We can change our mind and revert the file back to how it lookedīefore: alice$ hg revert hello.txt alice$ cat hello.txt Hello World ![]() Success, you have made a commit with Mercurial! Let us modify the fileĪnd ask Mercurial to show us how the files in working copy differ from You can see the newly created changeset with hg log: alice$ hg log changeset: 0:d312da7770f4 tag: tip user: Alice date: Wed Mar 10 20:10:05 2010 0000 summary: First version of hello Running hgĭebuginstall should no longer report any problems. We will use Alice įirst and her terminals look like the two you saw above. Create the file with thisīut with your own name. %HOME%\Mercurial.ini (see hg help config for all locations or Systems this is $HOME/.hgrc and on Windows the file is called Set it by putting the name in a configuration file. The username is normally missing immediately after installation. no username supplied (see "hg help config") (specify a username in your configuration file) 1 problems detected, please check your install! Checking templates (/usr/lib/python2.7/dist-packages/mercurial). Checking installed modules (/usr/share/pyshared/mercurial). Verify your installation with: alice$ hg debuginstall Checking encoding (UTF-8). Upgrading to the newest version available for your platform. Mercurial 1.4 is also okay for our purposes, but we always recommend It is of course fine if you see a version number greater than 2.2. There is NO warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Show the repository state in the TortoiseHg Workbench.Īfter installing Mercurial, try running hg version: alice$ hg version Mercurial Distributed SCM (version 2.2) (see for more information) Copyright (C) 2005-2012 Matt Mackall and others This is free software see the source for copying conditions. We will be using the command line in our examples but will sometime ![]() TortoiseHg on Windows, then you’ll be happy to know that you can now Mercurial so you won’t have to worry about that. Mac OS X: We recommend installing recommend MacHg to get a good, fast, and To install TortoiseHg, you need the PyQt bindings. Now symlink the hg script to a directory in your PATH Stable release, unpack it somewhere and run make local If you cannotįind it there, then you can install from source: grab the latest Please install Mercurial using your package manager. Translate them back to the equivalent commands for the Command While the examples will use a few Unix commands, you can easily
0 Comments
Leave a Reply. |