Mercurial > hgbook
comparison en/ch01-tour-basic.xml @ 826:a17d6390a480
More fixes to chapters 1 and 2.
| author | Bryan O'Sullivan <bos@serpentine.com> |
|---|---|
| date | Sun, 03 May 2009 20:27:09 -0700 |
| parents | d7d09cda83d2 |
| children | d2aacc06e562 |
comparison
equal
deleted
inserted
replaced
| 825:d7d09cda83d2 | 826:a17d6390a480 |
|---|---|
| 865 <para id="x_61">If you look back at the output of <command | 865 <para id="x_61">If you look back at the output of <command |
| 866 role="hg-cmd">hg pull</command> in <xref | 866 role="hg-cmd">hg pull</command> in <xref |
| 867 linkend="sec:tour:pull"/> when we ran it without <option | 867 linkend="sec:tour:pull"/> when we ran it without <option |
| 868 role="hg-opt-pull">-u</option>, you can see that it printed | 868 role="hg-opt-pull">-u</option>, you can see that it printed |
| 869 a helpful reminder that we'd have to take an explicit step to | 869 a helpful reminder that we'd have to take an explicit step to |
| 870 update the working directory:</para> | 870 update the working directory.</para> |
| 871 | |
| 872 <!-- &interaction.xxx.fixme; --> | |
| 873 | 871 |
| 874 <para id="x_62">To find out what revision the working directory | 872 <para id="x_62">To find out what revision the working directory |
| 875 is at, use the <command role="hg-cmd">hg parents</command> | 873 is at, use the <command role="hg-cmd">hg parents</command> |
| 876 command.</para> | 874 command.</para> |
| 877 | 875 |
| 988 it.</para> | 986 it.</para> |
| 989 | 987 |
| 990 &interaction.tour.push.net; | 988 &interaction.tour.push.net; |
| 991 </sect2> | 989 </sect2> |
| 992 </sect1> | 990 </sect1> |
| 991 | |
| 992 <sect1> | |
| 993 <title>Starting a new project</title> | |
| 994 | |
| 995 <para>It is just as easy to begin a new project as to work on one | |
| 996 that already exists. The <command>hg init</command> command | |
| 997 creates a new, empty Mercurial repository.</para> | |
| 998 | |
| 999 &interaction.ch01-new.init; | |
| 1000 | |
| 1001 <para>This simply creates a repository named | |
| 1002 <filename>myproject</filename> in the current directory.</para> | |
| 1003 | |
| 1004 &interaction.ch01-new.ls; | |
| 1005 | |
| 1006 <para>We can tell that <filename>myproject</filename> is a | |
| 1007 Mercurial repository, because it contains a | |
| 1008 <filename>.hg</filename> directory.</para> | |
| 1009 | |
| 1010 &interaction.ch01-new.ls2; | |
| 1011 | |
| 1012 <para>If we want to add some pre-existing files to the repository, | |
| 1013 we copy them into place, and tell Mercurial to start tracking | |
| 1014 them using the <command>hg add</command> command.</para> | |
| 1015 | |
| 1016 &interaction.ch01-new.add; | |
| 1017 | |
| 1018 <para>Once we are satisfied that our project looks right, we | |
| 1019 commit our changes.</para> | |
| 1020 | |
| 1021 &interaction.ch01-new.commit; | |
| 1022 | |
| 1023 <para>It takes just a few moments to start using Mercurial on a | |
| 1024 new project, which is part of its appeal. Revision control is | |
| 1025 now so easy to work with, we can use it on the smallest of | |
| 1026 projects that we might not have considered with a more | |
| 1027 complicated tool.</para> | |
| 1028 </sect1> | |
| 993 </chapter> | 1029 </chapter> |
| 994 | 1030 |
| 995 <!-- | 1031 <!-- |
| 996 local variables: | 1032 local variables: |
| 997 sgml-parent-document: ("00book.xml" "book" "chapter") | 1033 sgml-parent-document: ("00book.xml" "book" "chapter") |
