comparison po/zh.po @ 740:8b73656f95c9

Update file location in po files
author Dongsheng Song <dongsheng.song@gmail.com>
date Tue, 17 Mar 2009 10:47:54 +0800
parents 17fe2fe38373
children a4b71115602d
comparison
equal deleted inserted replaced
739:a13813534ccd 740:8b73656f95c9
39 # ... 39 # ...
40 # 40 #
41 msgid "" 41 msgid ""
42 msgstr "" 42 msgstr ""
43 "Project-Id-Version: hgbook 1.2\n" 43 "Project-Id-Version: hgbook 1.2\n"
44 "POT-Creation-Date: 2009-03-12 16:06+0800\n" 44 "POT-Creation-Date: 2009-03-17 10:44+0800\n"
45 "PO-Revision-Date: 2009-03-16 18:32+0800\n" 45 "PO-Revision-Date: 2009-03-16 18:32+0800\n"
46 "Last-Translator: \n" 46 "Last-Translator: \n"
47 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 47 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n"
48 "MIME-Version: 1.0\n" 48 "MIME-Version: 1.0\n"
49 "Content-Type: text/plain; charset=UTF-8\n" 49 "Content-Type: text/plain; charset=UTF-8\n"
2782 msgstr "" 2782 msgstr ""
2783 2783
2784 #. type: Content of: <book><chapter><sect1><para> 2784 #. type: Content of: <book><chapter><sect1><para>
2785 #: ../en/ch02-tour-basic.xml:253 2785 #: ../en/ch02-tour-basic.xml:253
2786 msgid "" 2786 msgid ""
2787 "Figure <xref linkend=\"fig.tour-basic.history\"/> provides a graphical " 2787 "Figure <xref endterm=\"fig.tour-basic.history.caption\" linkend=\"fig.tour-"
2788 "representation of the history of the <filename class=\"directory\">hello</" 2788 "basic.history\"/> provides a graphical representation of the history of the "
2789 "filename> repository, to make it a little easier to see which direction " 2789 "<filename class=\"directory\">hello</filename> repository, to make it a "
2790 "history is <quote>flowing</quote> in. We'll be returning to this figure " 2790 "little easier to see which direction history is <quote>flowing</quote> in. "
2791 "several times in this chapter and the chapter that follows." 2791 "We'll be returning to this figure several times in this chapter and the "
2792 "chapter that follows."
2792 msgstr "" 2793 msgstr ""
2793 2794
2794 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 2795 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject>
2795 #: ../en/ch02-tour-basic.xml:263 2796 #: ../en/ch02-tour-basic.xml:264
2796 msgid "" 2797 msgid ""
2797 "<imageobject><imagedata fileref=\"images/tour-history.png\"/></imageobject>" 2798 "<imageobject><imagedata fileref=\"images/tour-history.png\"/></imageobject>"
2798 msgstr "" 2799 msgstr ""
2799 2800
2800 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><textobject><phrase> 2801 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><textobject><phrase>
2801 #: ../en/ch02-tour-basic.xml:264 ../en/ch03-tour-merge.xml:48 2802 #: ../en/ch02-tour-basic.xml:265 ../en/ch03-tour-merge.xml:48
2802 #: ../en/ch03-tour-merge.xml:76 ../en/ch03-tour-merge.xml:124 2803 #: ../en/ch03-tour-merge.xml:78 ../en/ch03-tour-merge.xml:126
2803 #: ../en/ch03-tour-merge.xml:181 ../en/ch03-tour-merge.xml:248 2804 #: ../en/ch03-tour-merge.xml:182 ../en/ch03-tour-merge.xml:254
2804 #: ../en/ch04-concepts.xml:54 ../en/ch04-concepts.xml:104 2805 #: ../en/ch04-concepts.xml:56 ../en/ch04-concepts.xml:108
2805 #: ../en/ch04-concepts.xml:189 ../en/ch04-concepts.xml:293 2806 #: ../en/ch04-concepts.xml:194 ../en/ch04-concepts.xml:301
2806 #: ../en/ch04-concepts.xml:342 ../en/ch04-concepts.xml:356 2807 #: ../en/ch04-concepts.xml:353 ../en/ch04-concepts.xml:370
2807 #: ../en/ch04-concepts.xml:396 ../en/ch04-concepts.xml:415 2808 #: ../en/ch04-concepts.xml:414 ../en/ch04-concepts.xml:436
2808 #: ../en/ch04-concepts.xml:456 ../en/ch06-collab.xml:275 2809 #: ../en/ch04-concepts.xml:480 ../en/ch06-collab.xml:277
2809 #: ../en/ch09-undo.xml:363 ../en/ch09-undo.xml:411 ../en/ch09-undo.xml:476 2810 #: ../en/ch09-undo.xml:366 ../en/ch09-undo.xml:417 ../en/ch09-undo.xml:485
2810 #: ../en/ch09-undo.xml:516 ../en/ch12-mq.xml:408 2811 #: ../en/ch09-undo.xml:527 ../en/ch12-mq.xml:409
2811 msgid "XXX add text" 2812 msgid "XXX add text"
2812 msgstr "" 2813 msgstr ""
2813 2814
2814 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> 2815 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para>
2815 #: ../en/ch02-tour-basic.xml:265 2816 #: ../en/ch02-tour-basic.xml:266
2816 msgid "" 2817 msgid ""
2817 "Graphical history of the <filename class=\"directory\">hello</filename> " 2818 "Graphical history of the <filename class=\"directory\">hello</filename> "
2818 "repository" 2819 "repository"
2819 msgstr "" 2820 msgstr ""
2820 2821
2821 #. type: Content of: <book><chapter><sect1><sect2><title> 2822 #. type: Content of: <book><chapter><sect1><sect2><title>
2822 #: ../en/ch02-tour-basic.xml:272 2823 #: ../en/ch02-tour-basic.xml:273
2823 msgid "Changesets, revisions, and talking to other people" 2824 msgid "Changesets, revisions, and talking to other people"
2824 msgstr "改变集,版本,与其它用户交互" 2825 msgstr "改变集,版本,与其它用户交互"
2825 2826
2826 #. type: Content of: <book><chapter><sect1><sect2><para> 2827 #. type: Content of: <book><chapter><sect1><sect2><para>
2827 #: ../en/ch02-tour-basic.xml:275 2828 #: ../en/ch02-tour-basic.xml:276
2828 msgid "" 2829 msgid ""
2829 "As English is a notoriously sloppy language, and computer science has a " 2830 "As English is a notoriously sloppy language, and computer science has a "
2830 "hallowed history of terminological confusion (why use one term when four will " 2831 "hallowed history of terminological confusion (why use one term when four will "
2831 "do?), revision control has a variety of words and phrases that mean the same " 2832 "do?), revision control has a variety of words and phrases that mean the same "
2832 "thing. If you are talking about Mercurial history with other people, you " 2833 "thing. If you are talking about Mercurial history with other people, you "
2834 "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a " 2835 "<quote>change</quote> or (when written) <quote>cset</quote>, and sometimes a "
2835 "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>." 2836 "changeset is referred to as a <quote>revision</quote> or a <quote>rev</quote>."
2836 msgstr "" 2837 msgstr ""
2837 2838
2838 #. type: Content of: <book><chapter><sect1><sect2><para> 2839 #. type: Content of: <book><chapter><sect1><sect2><para>
2839 #: ../en/ch02-tour-basic.xml:285 2840 #: ../en/ch02-tour-basic.xml:286
2840 msgid "" 2841 msgid ""
2841 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to " 2842 "While it doesn't matter what <emphasis>word</emphasis> you use to refer to "
2842 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</" 2843 "the concept of <quote>a changeset</quote>, the <emphasis>identifier</"
2843 "emphasis> that you use to refer to <quote>a <emphasis>specific</emphasis> " 2844 "emphasis> that you use to refer to <quote>a <emphasis>specific</emphasis> "
2844 "changeset</quote> is of great importance. Recall that the <literal>changeset</" 2845 "changeset</quote> is of great importance. Recall that the <literal>changeset</"
2845 "literal> field in the output from <command role=\"hg-cmd\">hg log</command> " 2846 "literal> field in the output from <command role=\"hg-cmd\">hg log</command> "
2846 "identifies a changeset using both a number and a hexadecimal string." 2847 "identifies a changeset using both a number and a hexadecimal string."
2847 msgstr "" 2848 msgstr ""
2848 2849
2849 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 2850 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
2850 #: ../en/ch02-tour-basic.xml:294 2851 #: ../en/ch02-tour-basic.xml:295
2851 msgid "" 2852 msgid ""
2852 "The revision number is <emphasis>only valid in that repository</emphasis>," 2853 "The revision number is <emphasis>only valid in that repository</emphasis>,"
2853 msgstr "" 2854 msgstr ""
2854 2855
2855 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 2856 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
2856 #: ../en/ch02-tour-basic.xml:296 2857 #: ../en/ch02-tour-basic.xml:297
2857 msgid "" 2858 msgid ""
2858 "while the hex string is the <emphasis>permanent, unchanging identifier</" 2859 "while the hex string is the <emphasis>permanent, unchanging identifier</"
2859 "emphasis> that will always identify that exact changeset in <emphasis>every</" 2860 "emphasis> that will always identify that exact changeset in <emphasis>every</"
2860 "emphasis> copy of the repository." 2861 "emphasis> copy of the repository."
2861 msgstr "" 2862 msgstr ""
2862 2863
2863 #. type: Content of: <book><chapter><sect1><sect2><para> 2864 #. type: Content of: <book><chapter><sect1><sect2><para>
2864 #: ../en/ch02-tour-basic.xml:301 2865 #: ../en/ch02-tour-basic.xml:302
2865 msgid "" 2866 msgid ""
2866 "This distinction is important. If you send someone an email talking about " 2867 "This distinction is important. If you send someone an email talking about "
2867 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 " 2868 "<quote>revision 33</quote>, there's a high likelihood that their revision 33 "
2868 "will <emphasis>not be the same</emphasis> as yours. The reason for this is " 2869 "will <emphasis>not be the same</emphasis> as yours. The reason for this is "
2869 "that a revision number depends on the order in which changes arrived in a " 2870 "that a revision number depends on the order in which changes arrived in a "
2871 "the same order in different repositories. Three changes $a,b,c$ can easily " 2872 "the same order in different repositories. Three changes $a,b,c$ can easily "
2872 "appear in one repository as $0,1,2$, while in another as $1,0,2$." 2873 "appear in one repository as $0,1,2$, while in another as $1,0,2$."
2873 msgstr "" 2874 msgstr ""
2874 2875
2875 #. type: Content of: <book><chapter><sect1><sect2><para> 2876 #. type: Content of: <book><chapter><sect1><sect2><para>
2876 #: ../en/ch02-tour-basic.xml:311 2877 #: ../en/ch02-tour-basic.xml:312
2877 msgid "" 2878 msgid ""
2878 "Mercurial uses revision numbers purely as a convenient shorthand. If you " 2879 "Mercurial uses revision numbers purely as a convenient shorthand. If you "
2879 "need to discuss a changeset with someone, or make a record of a changeset for " 2880 "need to discuss a changeset with someone, or make a record of a changeset for "
2880 "some other reason (for example, in a bug report), use the hexadecimal " 2881 "some other reason (for example, in a bug report), use the hexadecimal "
2881 "identifier." 2882 "identifier."
2882 msgstr "" 2883 msgstr ""
2883 2884
2884 #. type: Content of: <book><chapter><sect1><sect2><title> 2885 #. type: Content of: <book><chapter><sect1><sect2><title>
2885 #: ../en/ch02-tour-basic.xml:319 2886 #: ../en/ch02-tour-basic.xml:320
2886 msgid "Viewing specific revisions" 2887 msgid "Viewing specific revisions"
2887 msgstr "察看指定版本" 2888 msgstr "察看指定版本"
2888 2889
2889 #. type: Content of: <book><chapter><sect1><sect2><para> 2890 #. type: Content of: <book><chapter><sect1><sect2><para>
2890 #: ../en/ch02-tour-basic.xml:321 2891 #: ../en/ch02-tour-basic.xml:322
2891 msgid "" 2892 msgid ""
2892 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a " 2893 "To narrow the output of <command role=\"hg-cmd\">hg log</command> down to a "
2893 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option " 2894 "single revision, use the <option role=\"hg-opt-log\">-r</option> (or <option "
2894 "role=\"hg-opt-log\">--rev</option>) option. You can use either a revision " 2895 "role=\"hg-opt-log\">--rev</option>) option. You can use either a revision "
2895 "number or a long-form changeset identifier, and you can provide as many " 2896 "number or a long-form changeset identifier, and you can provide as many "
2896 "revisions as you want." 2897 "revisions as you want."
2897 msgstr "" 2898 msgstr ""
2898 2899
2899 #. type: Content of: <book><chapter><sect1><sect2><para> 2900 #. type: Content of: <book><chapter><sect1><sect2><para>
2900 #: ../en/ch02-tour-basic.xml:330 2901 #: ../en/ch02-tour-basic.xml:331
2901 msgid "" 2902 msgid ""
2902 "If you want to see the history of several revisions without having to list " 2903 "If you want to see the history of several revisions without having to list "
2903 "each one, you can use <emphasis>range notation</emphasis>; this lets you " 2904 "each one, you can use <emphasis>range notation</emphasis>; this lets you "
2904 "express the idea <quote>I want all revisions between <literal>abc</literal> " 2905 "express the idea <quote>I want all revisions between <literal>abc</literal> "
2905 "and <literal>def</literal>, inclusive</quote>." 2906 "and <literal>def</literal>, inclusive</quote>."
2906 msgstr "" 2907 msgstr ""
2907 2908
2908 #. type: Content of: <book><chapter><sect1><sect2><para> 2909 #. type: Content of: <book><chapter><sect1><sect2><para>
2909 #: ../en/ch02-tour-basic.xml:338 2910 #: ../en/ch02-tour-basic.xml:339
2910 msgid "" 2911 msgid ""
2911 "Mercurial also honours the order in which you specify revisions, so <command " 2912 "Mercurial also honours the order in which you specify revisions, so <command "
2912 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command " 2913 "role=\"hg-cmd\">hg log -r 2:4</command> prints 2, 3, and 4. while <command "
2913 "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2." 2914 "role=\"hg-cmd\">hg log -r 4:2</command> prints 4, 3, and 2."
2914 msgstr "" 2915 msgstr ""
2915 2916
2916 #. type: Content of: <book><chapter><sect1><sect2><title> 2917 #. type: Content of: <book><chapter><sect1><sect2><title>
2917 #: ../en/ch02-tour-basic.xml:345 2918 #: ../en/ch02-tour-basic.xml:346
2918 msgid "More detailed information" 2919 msgid "More detailed information"
2919 msgstr "更详细的信息" 2920 msgstr "更详细的信息"
2920 2921
2921 #. type: Content of: <book><chapter><sect1><sect2><para> 2922 #. type: Content of: <book><chapter><sect1><sect2><para>
2922 #: ../en/ch02-tour-basic.xml:347 2923 #: ../en/ch02-tour-basic.xml:348
2923 msgid "" 2924 msgid ""
2924 "While the summary information printed by <command role=\"hg-cmd\">hg log</" 2925 "While the summary information printed by <command role=\"hg-cmd\">hg log</"
2925 "command> is useful if you already know what you're looking for, you may need " 2926 "command> is useful if you already know what you're looking for, you may need "
2926 "to see a complete description of the change, or a list of the files changed, " 2927 "to see a complete description of the change, or a list of the files changed, "
2927 "if you're trying to decide whether a changeset is the one you're looking for. " 2928 "if you're trying to decide whether a changeset is the one you're looking for. "
2929 "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) " 2930 "global\">-v</option> (or <option role=\"hg-opt-global\">--verbose</option>) "
2930 "option gives you this extra detail." 2931 "option gives you this extra detail."
2931 msgstr "" 2932 msgstr ""
2932 2933
2933 #. type: Content of: <book><chapter><sect1><sect2><para> 2934 #. type: Content of: <book><chapter><sect1><sect2><para>
2934 #: ../en/ch02-tour-basic.xml:359 2935 #: ../en/ch02-tour-basic.xml:360
2935 msgid "" 2936 msgid ""
2936 "If you want to see both the description and content of a change, add the " 2937 "If you want to see both the description and content of a change, add the "
2937 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--" 2938 "<option role=\"hg-opt-log\">-p</option> (or <option role=\"hg-opt-log\">--"
2938 "patch</option>) option. This displays the content of a change as a " 2939 "patch</option>) option. This displays the content of a change as a "
2939 "<emphasis>unified diff</emphasis> (if you've never seen a unified diff " 2940 "<emphasis>unified diff</emphasis> (if you've never seen a unified diff "
2940 "before, see section <xref linkend=\"sec.mq.patch\"/> for an overview)." 2941 "before, see section <xref linkend=\"sec.mq.patch\"/> for an overview)."
2941 msgstr "" 2942 msgstr ""
2942 2943
2943 #. type: Content of: <book><chapter><sect1><title> 2944 #. type: Content of: <book><chapter><sect1><title>
2944 #: ../en/ch02-tour-basic.xml:372 2945 #: ../en/ch02-tour-basic.xml:373
2945 msgid "All about command options" 2946 msgid "All about command options"
2946 msgstr "命令选项" 2947 msgstr "命令选项"
2947 2948
2948 #. type: Content of: <book><chapter><sect1><para> 2949 #. type: Content of: <book><chapter><sect1><para>
2949 #: ../en/ch02-tour-basic.xml:374 2950 #: ../en/ch02-tour-basic.xml:375
2950 msgid "" 2951 msgid ""
2951 "Let's take a brief break from exploring Mercurial commands to discuss a " 2952 "Let's take a brief break from exploring Mercurial commands to discuss a "
2952 "pattern in the way that they work; you may find this useful to keep in mind " 2953 "pattern in the way that they work; you may find this useful to keep in mind "
2953 "as we continue our tour." 2954 "as we continue our tour."
2954 msgstr "" 2955 msgstr ""
2955 2956
2956 #. type: Content of: <book><chapter><sect1><para> 2957 #. type: Content of: <book><chapter><sect1><para>
2957 #: ../en/ch02-tour-basic.xml:378 2958 #: ../en/ch02-tour-basic.xml:379
2958 msgid "" 2959 msgid ""
2959 "Mercurial has a consistent and straightforward approach to dealing with the " 2960 "Mercurial has a consistent and straightforward approach to dealing with the "
2960 "options that you can pass to commands. It follows the conventions for " 2961 "options that you can pass to commands. It follows the conventions for "
2961 "options that are common to modern Linux and Unix systems." 2962 "options that are common to modern Linux and Unix systems."
2962 msgstr "" 2963 msgstr ""
2963 2964
2964 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 2965 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
2965 #: ../en/ch02-tour-basic.xml:383 2966 #: ../en/ch02-tour-basic.xml:384
2966 msgid "" 2967 msgid ""
2967 "Every option has a long name. For example, as we've already seen, the " 2968 "Every option has a long name. For example, as we've already seen, the "
2968 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-" 2969 "<command role=\"hg-cmd\">hg log</command> command accepts a <option role=\"hg-"
2969 "opt-log\">--rev</option> option." 2970 "opt-log\">--rev</option> option."
2970 msgstr "" 2971 msgstr ""
2971 2972
2972 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 2973 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
2973 #: ../en/ch02-tour-basic.xml:387 2974 #: ../en/ch02-tour-basic.xml:388
2974 msgid "" 2975 msgid ""
2975 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--" 2976 "Most options have short names, too. Instead of <option role=\"hg-opt-log\">--"
2976 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The " 2977 "rev</option>, we can use <option role=\"hg-opt-log\">-r</option>. (The "
2977 "reason that some options don't have short names is that the options in " 2978 "reason that some options don't have short names is that the options in "
2978 "question are rarely used.)" 2979 "question are rarely used.)"
2979 msgstr "" 2980 msgstr ""
2980 2981
2981 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 2982 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
2982 #: ../en/ch02-tour-basic.xml:392 2983 #: ../en/ch02-tour-basic.xml:393
2983 msgid "" 2984 msgid ""
2984 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</" 2985 "Long options start with two dashes (e.g. <option role=\"hg-opt-log\">--rev</"
2985 "option>), while short options start with one (e.g. <option role=\"hg-opt-log" 2986 "option>), while short options start with one (e.g. <option role=\"hg-opt-log"
2986 "\">-r</option>)." 2987 "\">-r</option>)."
2987 msgstr "" 2988 msgstr ""
2988 2989
2989 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 2990 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
2990 #: ../en/ch02-tour-basic.xml:396 2991 #: ../en/ch02-tour-basic.xml:397
2991 msgid "" 2992 msgid ""
2992 "Option naming and usage is consistent across commands. For example, every " 2993 "Option naming and usage is consistent across commands. For example, every "
2993 "command that lets you specify a changeset ID or revision number accepts both " 2994 "command that lets you specify a changeset ID or revision number accepts both "
2994 "<option role=\"hg-opt-log\">-r</option> and <option role=\"hg-opt-log\">--" 2995 "<option role=\"hg-opt-log\">-r</option> and <option role=\"hg-opt-log\">--"
2995 "rev</option> arguments." 2996 "rev</option> arguments."
2996 msgstr "" 2997 msgstr ""
2997 2998
2998 #. type: Content of: <book><chapter><sect1><para> 2999 #. type: Content of: <book><chapter><sect1><para>
2999 #: ../en/ch02-tour-basic.xml:402 3000 #: ../en/ch02-tour-basic.xml:403
3000 msgid "" 3001 msgid ""
3001 "In the examples throughout this book, I use short options instead of long. " 3002 "In the examples throughout this book, I use short options instead of long. "
3002 "This just reflects my own preference, so don't read anything significant into " 3003 "This just reflects my own preference, so don't read anything significant into "
3003 "it." 3004 "it."
3004 msgstr "" 3005 msgstr ""
3005 3006
3006 #. type: Content of: <book><chapter><sect1><para> 3007 #. type: Content of: <book><chapter><sect1><para>
3007 #: ../en/ch02-tour-basic.xml:406 3008 #: ../en/ch02-tour-basic.xml:407
3008 msgid "" 3009 msgid ""
3009 "Most commands that print output of some kind will print more output when " 3010 "Most commands that print output of some kind will print more output when "
3010 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-" 3011 "passed a <option role=\"hg-opt-global\">-v</option> (or <option role=\"hg-opt-"
3011 "global\">--verbose</option>) option, and less when passed <option role=\"hg-" 3012 "global\">--verbose</option>) option, and less when passed <option role=\"hg-"
3012 "opt-global\">-q</option> (or <option role=\"hg-opt-global\">--quiet</option>)." 3013 "opt-global\">-q</option> (or <option role=\"hg-opt-global\">--quiet</option>)."
3013 msgstr "" 3014 msgstr ""
3014 3015
3015 #. type: Content of: <book><chapter><sect1><title> 3016 #. type: Content of: <book><chapter><sect1><title>
3016 #: ../en/ch02-tour-basic.xml:414 3017 #: ../en/ch02-tour-basic.xml:415
3017 msgid "Making and reviewing changes" 3018 msgid "Making and reviewing changes"
3018 msgstr "创建和复审修改" 3019 msgstr "创建和复审修改"
3019 3020
3020 #. type: Content of: <book><chapter><sect1><para> 3021 #. type: Content of: <book><chapter><sect1><para>
3021 #: ../en/ch02-tour-basic.xml:416 3022 #: ../en/ch02-tour-basic.xml:417
3022 msgid "" 3023 msgid ""
3023 "Now that we have a grasp of viewing history in Mercurial, let's take a look " 3024 "Now that we have a grasp of viewing history in Mercurial, let's take a look "
3024 "at making some changes and examining them." 3025 "at making some changes and examining them."
3025 msgstr "" 3026 msgstr ""
3026 3027
3027 #. type: Content of: <book><chapter><sect1><para> 3028 #. type: Content of: <book><chapter><sect1><para>
3028 #: ../en/ch02-tour-basic.xml:420 3029 #: ../en/ch02-tour-basic.xml:421
3029 msgid "" 3030 msgid ""
3030 "The first thing we'll do is isolate our experiment in a repository of its " 3031 "The first thing we'll do is isolate our experiment in a repository of its "
3031 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we " 3032 "own. We use the <command role=\"hg-cmd\">hg clone</command> command, but we "
3032 "don't need to clone a copy of the remote repository. Since we already have a " 3033 "don't need to clone a copy of the remote repository. Since we already have a "
3033 "copy of it locally, we can just clone that instead. This is much faster than " 3034 "copy of it locally, we can just clone that instead. This is much faster than "
3034 "cloning over the network, and cloning a local repository uses less disk space " 3035 "cloning over the network, and cloning a local repository uses less disk space "
3035 "in most cases, too." 3036 "in most cases, too."
3036 msgstr "" 3037 msgstr ""
3037 3038
3038 #. type: Content of: <book><chapter><sect1><para> 3039 #. type: Content of: <book><chapter><sect1><para>
3039 #: ../en/ch02-tour-basic.xml:430 3040 #: ../en/ch02-tour-basic.xml:431
3040 msgid "" 3041 msgid ""
3041 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy " 3042 "As an aside, it's often good practice to keep a <quote>pristine</quote> copy "
3042 "of a remote repository around, which you can then make temporary clones of to " 3043 "of a remote repository around, which you can then make temporary clones of to "
3043 "create sandboxes for each task you want to work on. This lets you work on " 3044 "create sandboxes for each task you want to work on. This lets you work on "
3044 "multiple tasks in parallel, each isolated from the others until it's complete " 3045 "multiple tasks in parallel, each isolated from the others until it's complete "
3046 "there's almost no overhead to cloning and destroying repositories whenever " 3047 "there's almost no overhead to cloning and destroying repositories whenever "
3047 "you want." 3048 "you want."
3048 msgstr "" 3049 msgstr ""
3049 3050
3050 #. type: Content of: <book><chapter><sect1><para> 3051 #. type: Content of: <book><chapter><sect1><para>
3051 #: ../en/ch02-tour-basic.xml:439 3052 #: ../en/ch02-tour-basic.xml:440
3052 msgid "" 3053 msgid ""
3053 "In our <filename class=\"directory\">my-hello</filename> repository, we have " 3054 "In our <filename class=\"directory\">my-hello</filename> repository, we have "
3054 "a file <filename>hello.c</filename> that contains the classic <quote>hello, " 3055 "a file <filename>hello.c</filename> that contains the classic <quote>hello, "
3055 "world</quote> program. Let's use the ancient and venerable <command>sed</" 3056 "world</quote> program. Let's use the ancient and venerable <command>sed</"
3056 "command> command to edit this file so that it prints a second line of " 3057 "command> command to edit this file so that it prints a second line of "
3059 "constraint, you probably won't want to use <command>sed</command>; simply use " 3060 "constraint, you probably won't want to use <command>sed</command>; simply use "
3060 "your preferred text editor to do the same thing.)" 3061 "your preferred text editor to do the same thing.)"
3061 msgstr "" 3062 msgstr ""
3062 3063
3063 #. type: Content of: <book><chapter><sect1><para> 3064 #. type: Content of: <book><chapter><sect1><para>
3064 #: ../en/ch02-tour-basic.xml:452 3065 #: ../en/ch02-tour-basic.xml:453
3065 msgid "" 3066 msgid ""
3066 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us " 3067 "Mercurial's <command role=\"hg-cmd\">hg status</command> command will tell us "
3067 "what Mercurial knows about the files in the repository." 3068 "what Mercurial knows about the files in the repository."
3068 msgstr "" 3069 msgstr ""
3069 3070
3070 #. type: Content of: <book><chapter><sect1><para> 3071 #. type: Content of: <book><chapter><sect1><para>
3071 #: ../en/ch02-tour-basic.xml:458 3072 #: ../en/ch02-tour-basic.xml:459
3072 msgid "" 3073 msgid ""
3073 "The <command role=\"hg-cmd\">hg status</command> command prints no output for " 3074 "The <command role=\"hg-cmd\">hg status</command> command prints no output for "
3074 "some files, but a line starting with <quote><literal>M</literal></quote> for " 3075 "some files, but a line starting with <quote><literal>M</literal></quote> for "
3075 "<filename>hello.c</filename>. Unless you tell it to, <command role=\"hg-cmd" 3076 "<filename>hello.c</filename>. Unless you tell it to, <command role=\"hg-cmd"
3076 "\">hg status</command> will not print any output for files that have not been " 3077 "\">hg status</command> will not print any output for files that have not been "
3077 "modified." 3078 "modified."
3078 msgstr "" 3079 msgstr ""
3079 3080
3080 #. type: Content of: <book><chapter><sect1><para> 3081 #. type: Content of: <book><chapter><sect1><para>
3081 #: ../en/ch02-tour-basic.xml:465 3082 #: ../en/ch02-tour-basic.xml:466
3082 msgid "" 3083 msgid ""
3083 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed " 3084 "The <quote><literal>M</literal></quote> indicates that Mercurial has noticed "
3084 "that we modified <filename>hello.c</filename>. We didn't need to " 3085 "that we modified <filename>hello.c</filename>. We didn't need to "
3085 "<emphasis>inform</emphasis> Mercurial that we were going to modify the file " 3086 "<emphasis>inform</emphasis> Mercurial that we were going to modify the file "
3086 "before we started, or that we had modified the file after we were done; it " 3087 "before we started, or that we had modified the file after we were done; it "
3087 "was able to figure this out itself." 3088 "was able to figure this out itself."
3088 msgstr "" 3089 msgstr ""
3089 3090
3090 #. type: Content of: <book><chapter><sect1><para> 3091 #. type: Content of: <book><chapter><sect1><para>
3091 #: ../en/ch02-tour-basic.xml:473 3092 #: ../en/ch02-tour-basic.xml:474
3092 msgid "" 3093 msgid ""
3093 "It's a little bit helpful to know that we've modified <filename>hello.c</" 3094 "It's a little bit helpful to know that we've modified <filename>hello.c</"
3094 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> " 3095 "filename>, but we might prefer to know exactly <emphasis>what</emphasis> "
3095 "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg " 3096 "changes we've made to it. To do this, we use the <command role=\"hg-cmd\">hg "
3096 "diff</command> command." 3097 "diff</command> command."
3097 msgstr "" 3098 msgstr ""
3098 3099
3099 #. type: Content of: <book><chapter><sect1><title> 3100 #. type: Content of: <book><chapter><sect1><title>
3100 #: ../en/ch02-tour-basic.xml:483 3101 #: ../en/ch02-tour-basic.xml:484
3101 msgid "Recording changes in a new changeset" 3102 msgid "Recording changes in a new changeset"
3102 msgstr "在新修改集中记录修改" 3103 msgstr "在新修改集中记录修改"
3103 3104
3104 #. type: Content of: <book><chapter><sect1><para> 3105 #. type: Content of: <book><chapter><sect1><para>
3105 #: ../en/ch02-tour-basic.xml:485 3106 #: ../en/ch02-tour-basic.xml:486
3106 msgid "" 3107 msgid ""
3107 "We can modify files, build and test our changes, and use <command role=\"hg-" 3108 "We can modify files, build and test our changes, and use <command role=\"hg-"
3108 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to " 3109 "cmd\">hg status</command> and <command role=\"hg-cmd\">hg diff</command> to "
3109 "review our changes, until we're satisfied with what we've done and arrive at " 3110 "review our changes, until we're satisfied with what we've done and arrive at "
3110 "a natural stopping point where we want to record our work in a new changeset." 3111 "a natural stopping point where we want to record our work in a new changeset."
3111 msgstr "" 3112 msgstr ""
3112 3113
3113 #. type: Content of: <book><chapter><sect1><para> 3114 #. type: Content of: <book><chapter><sect1><para>
3114 #: ../en/ch02-tour-basic.xml:492 3115 #: ../en/ch02-tour-basic.xml:493
3115 msgid "" 3116 msgid ""
3116 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new " 3117 "The <command role=\"hg-cmd\">hg commit</command> command lets us create a new "
3117 "changeset; we'll usually refer to this as <quote>making a commit</quote> or " 3118 "changeset; we'll usually refer to this as <quote>making a commit</quote> or "
3118 "<quote>committing</quote>." 3119 "<quote>committing</quote>."
3119 msgstr "" 3120 msgstr ""
3120 3121
3121 #. type: Content of: <book><chapter><sect1><sect2><title> 3122 #. type: Content of: <book><chapter><sect1><sect2><title>
3122 #: ../en/ch02-tour-basic.xml:498 3123 #: ../en/ch02-tour-basic.xml:499
3123 msgid "Setting up a username" 3124 msgid "Setting up a username"
3124 msgstr "配置用户名称" 3125 msgstr "配置用户名称"
3125 3126
3126 #. type: Content of: <book><chapter><sect1><sect2><para> 3127 #. type: Content of: <book><chapter><sect1><sect2><para>
3127 #: ../en/ch02-tour-basic.xml:500 3128 #: ../en/ch02-tour-basic.xml:501
3128 msgid "" 3129 msgid ""
3129 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the " 3130 "When you try to run <command role=\"hg-cmd\">hg commit</command> for the "
3130 "first time, it is not guaranteed to succeed. Mercurial records your name and " 3131 "first time, it is not guaranteed to succeed. Mercurial records your name and "
3131 "address with each change that you commit, so that you and others will later " 3132 "address with each change that you commit, so that you and others will later "
3132 "be able to tell who made each change. Mercurial tries to automatically " 3133 "be able to tell who made each change. Mercurial tries to automatically "
3133 "figure out a sensible username to commit the change with. It will attempt " 3134 "figure out a sensible username to commit the change with. It will attempt "
3134 "each of the following methods, in order:" 3135 "each of the following methods, in order:"
3135 msgstr "" 3136 msgstr ""
3136 3137
3137 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3138 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3138 #: ../en/ch02-tour-basic.xml:509 3139 #: ../en/ch02-tour-basic.xml:510
3139 msgid "" 3140 msgid ""
3140 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the " 3141 "If you specify a <option role=\"hg-opt-commit\">-u</option> option to the "
3141 "<command role=\"hg-cmd\">hg commit</command> command on the command line, " 3142 "<command role=\"hg-cmd\">hg commit</command> command on the command line, "
3142 "followed by a username, this is always given the highest precedence." 3143 "followed by a username, this is always given the highest precedence."
3143 msgstr "" 3144 msgstr ""
3144 3145
3145 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3146 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3146 #: ../en/ch02-tour-basic.xml:514 3147 #: ../en/ch02-tour-basic.xml:515
3147 msgid "" 3148 msgid ""
3148 "If you have set the <envar>HGUSER</envar> environment variable, this is " 3149 "If you have set the <envar>HGUSER</envar> environment variable, this is "
3149 "checked next." 3150 "checked next."
3150 msgstr "" 3151 msgstr ""
3151 3152
3152 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3153 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3153 #: ../en/ch02-tour-basic.xml:517 3154 #: ../en/ch02-tour-basic.xml:518
3154 msgid "" 3155 msgid ""
3155 "If you create a file in your home directory called <filename role=\"special" 3156 "If you create a file in your home directory called <filename role=\"special"
3156 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> " 3157 "\">.hgrc</filename>, with a <envar role=\"rc-item-ui\">username</envar> "
3157 "entry, that will be used next. To see what the contents of this file should " 3158 "entry, that will be used next. To see what the contents of this file should "
3158 "look like, refer to section <xref linkend=\"sec.tour-basic.username\"/> below." 3159 "look like, refer to section <xref linkend=\"sec.tour-basic.username\"/> below."
3159 msgstr "" 3160 msgstr ""
3160 3161
3161 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3162 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3162 #: ../en/ch02-tour-basic.xml:524 3163 #: ../en/ch02-tour-basic.xml:525
3163 msgid "" 3164 msgid ""
3164 "If you have set the <envar>EMAIL</envar> environment variable, this will be " 3165 "If you have set the <envar>EMAIL</envar> environment variable, this will be "
3165 "used next." 3166 "used next."
3166 msgstr "" 3167 msgstr ""
3167 3168
3168 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 3169 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
3169 #: ../en/ch02-tour-basic.xml:527 3170 #: ../en/ch02-tour-basic.xml:528
3170 msgid "" 3171 msgid ""
3171 "Mercurial will query your system to find out your local user name and host " 3172 "Mercurial will query your system to find out your local user name and host "
3172 "name, and construct a username from these components. Since this often " 3173 "name, and construct a username from these components. Since this often "
3173 "results in a username that is not very useful, it will print a warning if it " 3174 "results in a username that is not very useful, it will print a warning if it "
3174 "has to do this." 3175 "has to do this."
3175 msgstr "" 3176 msgstr ""
3176 3177
3177 #. type: Content of: <book><chapter><sect1><sect2><para> 3178 #. type: Content of: <book><chapter><sect1><sect2><para>
3178 #: ../en/ch02-tour-basic.xml:534 3179 #: ../en/ch02-tour-basic.xml:535
3179 msgid "" 3180 msgid ""
3180 "If all of these mechanisms fail, Mercurial will fail, printing an error " 3181 "If all of these mechanisms fail, Mercurial will fail, printing an error "
3181 "message. In this case, it will not let you commit until you set up a " 3182 "message. In this case, it will not let you commit until you set up a "
3182 "username." 3183 "username."
3183 msgstr "" 3184 msgstr ""
3184 3185
3185 #. type: Content of: <book><chapter><sect1><sect2><para> 3186 #. type: Content of: <book><chapter><sect1><sect2><para>
3186 #: ../en/ch02-tour-basic.xml:538 3187 #: ../en/ch02-tour-basic.xml:539
3187 msgid "" 3188 msgid ""
3188 "You should think of the <envar>HGUSER</envar> environment variable and the " 3189 "You should think of the <envar>HGUSER</envar> environment variable and the "
3189 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-" 3190 "<option role=\"hg-opt-commit\">-u</option> option to the <command role=\"hg-"
3190 "cmd\">hg commit</command> command as ways to <emphasis>override</emphasis> " 3191 "cmd\">hg commit</command> command as ways to <emphasis>override</emphasis> "
3191 "Mercurial's default selection of username. For normal use, the simplest and " 3192 "Mercurial's default selection of username. For normal use, the simplest and "
3192 "most robust way to set a username for yourself is by creating a <filename " 3193 "most robust way to set a username for yourself is by creating a <filename "
3193 "role=\"special\">.hgrc</filename> file; see below for details." 3194 "role=\"special\">.hgrc</filename> file; see below for details."
3194 msgstr "" 3195 msgstr ""
3195 3196
3196 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 3197 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
3197 #: ../en/ch02-tour-basic.xml:547 3198 #: ../en/ch02-tour-basic.xml:548
3198 msgid "Creating a Mercurial configuration file" 3199 msgid "Creating a Mercurial configuration file"
3199 msgstr "创建 Mercurial 的配置文件" 3200 msgstr "创建 Mercurial 的配置文件"
3200 3201
3201 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3202 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3202 #: ../en/ch02-tour-basic.xml:549 3203 #: ../en/ch02-tour-basic.xml:550
3203 msgid "" 3204 msgid ""
3204 "To set a user name, use your favourite editor to create a file called " 3205 "To set a user name, use your favourite editor to create a file called "
3205 "<filename role=\"special\">.hgrc</filename> in your home directory. " 3206 "<filename role=\"special\">.hgrc</filename> in your home directory. "
3206 "Mercurial will use this file to look up your personalised configuration " 3207 "Mercurial will use this file to look up your personalised configuration "
3207 "settings. The initial contents of your <filename role=\"special\">.hgrc</" 3208 "settings. The initial contents of your <filename role=\"special\">.hgrc</"
3208 "filename> should look like this." 3209 "filename> should look like this."
3209 msgstr "" 3210 msgstr ""
3210 3211
3211 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3212 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3212 #: ../en/ch02-tour-basic.xml:560 3213 #: ../en/ch02-tour-basic.xml:561
3213 msgid "" 3214 msgid ""
3214 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</" 3215 "The <quote><literal>[ui]</literal></quote> line begins a <emphasis>section</"
3215 "emphasis> of the config file, so you can read the <quote><literal>username " 3216 "emphasis> of the config file, so you can read the <quote><literal>username "
3216 "= ...</literal></quote> line as meaning <quote>set the value of the " 3217 "= ...</literal></quote> line as meaning <quote>set the value of the "
3217 "<literal>username</literal> item in the <literal>ui</literal> section</" 3218 "<literal>username</literal> item in the <literal>ui</literal> section</"
3219 "file. Mercurial ignores empty lines and treats any text from " 3220 "file. Mercurial ignores empty lines and treats any text from "
3220 "<quote><literal>#</literal></quote> to the end of a line as a comment." 3221 "<quote><literal>#</literal></quote> to the end of a line as a comment."
3221 msgstr "" 3222 msgstr ""
3222 3223
3223 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 3224 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
3224 #: ../en/ch02-tour-basic.xml:573 3225 #: ../en/ch02-tour-basic.xml:574
3225 msgid "Choosing a user name" 3226 msgid "Choosing a user name"
3226 msgstr "选择用户名称" 3227 msgstr "选择用户名称"
3227 3228
3228 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 3229 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
3229 #: ../en/ch02-tour-basic.xml:575 3230 #: ../en/ch02-tour-basic.xml:576
3230 msgid "" 3231 msgid ""
3231 "You can use any text you like as the value of the <literal>username</literal> " 3232 "You can use any text you like as the value of the <literal>username</literal> "
3232 "config item, since this information is for reading by other people, but for " 3233 "config item, since this information is for reading by other people, but for "
3233 "interpreting by Mercurial. The convention that most people follow is to use " 3234 "interpreting by Mercurial. The convention that most people follow is to use "
3234 "their name and email address, as in the example above." 3235 "their name and email address, as in the example above."
3235 msgstr "" 3236 msgstr ""
3236 3237
3237 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 3238 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
3238 #: ../en/ch02-tour-basic.xml:582 3239 #: ../en/ch02-tour-basic.xml:583
3239 msgid "" 3240 msgid ""
3240 "Mercurial's built-in web server obfuscates email addresses, to make it more " 3241 "Mercurial's built-in web server obfuscates email addresses, to make it more "
3241 "difficult for the email harvesting tools that spammers use. This reduces the " 3242 "difficult for the email harvesting tools that spammers use. This reduces the "
3242 "likelihood that you'll start receiving more junk email if you publish a " 3243 "likelihood that you'll start receiving more junk email if you publish a "
3243 "Mercurial repository on the web." 3244 "Mercurial repository on the web."
3244 msgstr "" 3245 msgstr ""
3245 3246
3246 #. type: Content of: <book><chapter><sect1><sect2><title> 3247 #. type: Content of: <book><chapter><sect1><sect2><title>
3247 #: ../en/ch02-tour-basic.xml:592 3248 #: ../en/ch02-tour-basic.xml:593
3248 msgid "Writing a commit message" 3249 msgid "Writing a commit message"
3249 msgstr "写提交日志" 3250 msgstr "写提交日志"
3250 3251
3251 #. type: Content of: <book><chapter><sect1><sect2><para> 3252 #. type: Content of: <book><chapter><sect1><sect2><para>
3252 #: ../en/ch02-tour-basic.xml:594 3253 #: ../en/ch02-tour-basic.xml:595
3253 msgid "" 3254 msgid ""
3254 "When we commit a change, Mercurial drops us into a text editor, to enter a " 3255 "When we commit a change, Mercurial drops us into a text editor, to enter a "
3255 "message that will describe the modifications we've made in this changeset. " 3256 "message that will describe the modifications we've made in this changeset. "
3256 "This is called the <emphasis>commit message</emphasis>. It will be a record " 3257 "This is called the <emphasis>commit message</emphasis>. It will be a record "
3257 "for readers of what we did and why, and it will be printed by <command role=" 3258 "for readers of what we did and why, and it will be printed by <command role="
3258 "\"hg-cmd\">hg log</command> after we've finished committing." 3259 "\"hg-cmd\">hg log</command> after we've finished committing."
3259 msgstr "" 3260 msgstr ""
3260 3261
3261 #. type: Content of: <book><chapter><sect1><sect2><para> 3262 #. type: Content of: <book><chapter><sect1><sect2><para>
3262 #: ../en/ch02-tour-basic.xml:604 3263 #: ../en/ch02-tour-basic.xml:605
3263 msgid "" 3264 msgid ""
3264 "The editor that the <command role=\"hg-cmd\">hg commit</command> command " 3265 "The editor that the <command role=\"hg-cmd\">hg commit</command> command "
3265 "drops us into will contain an empty line, followed by a number of lines " 3266 "drops us into will contain an empty line, followed by a number of lines "
3266 "starting with <quote><literal>HG:</literal></quote>." 3267 "starting with <quote><literal>HG:</literal></quote>."
3267 msgstr "" 3268 msgstr ""
3268 3269
3269 #. type: Content of: <book><chapter><sect1><sect2><para> 3270 #. type: Content of: <book><chapter><sect1><sect2><para>
3270 #: ../en/ch02-tour-basic.xml:611 3271 #: ../en/ch02-tour-basic.xml:612
3271 msgid "" 3272 msgid ""
3272 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></" 3273 "Mercurial ignores the lines that start with <quote><literal>HG:</literal></"
3273 "quote>; it uses them only to tell us which files it's recording changes to. " 3274 "quote>; it uses them only to tell us which files it's recording changes to. "
3274 "Modifying or deleting these lines has no effect." 3275 "Modifying or deleting these lines has no effect."
3275 msgstr "" 3276 msgstr ""
3276 3277
3277 #. type: Content of: <book><chapter><sect1><sect2><title> 3278 #. type: Content of: <book><chapter><sect1><sect2><title>
3278 #: ../en/ch02-tour-basic.xml:617 3279 #: ../en/ch02-tour-basic.xml:618
3279 msgid "Writing a good commit message" 3280 msgid "Writing a good commit message"
3280 msgstr "写好提交日志" 3281 msgstr "写好提交日志"
3281 3282
3282 #. type: Content of: <book><chapter><sect1><sect2><para> 3283 #. type: Content of: <book><chapter><sect1><sect2><para>
3283 #: ../en/ch02-tour-basic.xml:619 3284 #: ../en/ch02-tour-basic.xml:620
3284 msgid "" 3285 msgid ""
3285 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of " 3286 "Since <command role=\"hg-cmd\">hg log</command> only prints the first line of "
3286 "a commit message by default, it's best to write a commit message whose first " 3287 "a commit message by default, it's best to write a commit message whose first "
3287 "line stands alone. Here's a real example of a commit message that " 3288 "line stands alone. Here's a real example of a commit message that "
3288 "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary " 3289 "<emphasis>doesn't</emphasis> follow this guideline, and hence has a summary "
3289 "that is not readable." 3290 "that is not readable."
3290 msgstr "" 3291 msgstr ""
3291 3292
3292 #. type: Content of: <book><chapter><sect1><sect2><para> 3293 #. type: Content of: <book><chapter><sect1><sect2><para>
3293 #: ../en/ch02-tour-basic.xml:633 3294 #: ../en/ch02-tour-basic.xml:634
3294 msgid "" 3295 msgid ""
3295 "As far as the remainder of the contents of the commit message are concerned, " 3296 "As far as the remainder of the contents of the commit message are concerned, "
3296 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care " 3297 "there are no hard-and-fast rules. Mercurial itself doesn't interpret or care "
3297 "about the contents of the commit message, though your project may have " 3298 "about the contents of the commit message, though your project may have "
3298 "policies that dictate a certain kind of formatting." 3299 "policies that dictate a certain kind of formatting."
3299 msgstr "" 3300 msgstr ""
3300 3301
3301 #. type: Content of: <book><chapter><sect1><sect2><para> 3302 #. type: Content of: <book><chapter><sect1><sect2><para>
3302 #: ../en/ch02-tour-basic.xml:639 3303 #: ../en/ch02-tour-basic.xml:640
3303 msgid "" 3304 msgid ""
3304 "My personal preference is for short, but informative, commit messages that " 3305 "My personal preference is for short, but informative, commit messages that "
3305 "tell me something that I can't figure out with a quick glance at the output " 3306 "tell me something that I can't figure out with a quick glance at the output "
3306 "of <command role=\"hg-cmd\">hg log --patch</command>." 3307 "of <command role=\"hg-cmd\">hg log --patch</command>."
3307 msgstr "" 3308 msgstr ""
3308 3309
3309 #. type: Content of: <book><chapter><sect1><sect2><title> 3310 #. type: Content of: <book><chapter><sect1><sect2><title>
3310 #: ../en/ch02-tour-basic.xml:646 3311 #: ../en/ch02-tour-basic.xml:647
3311 msgid "Aborting a commit" 3312 msgid "Aborting a commit"
3312 msgstr "终止提交" 3313 msgstr "终止提交"
3313 3314
3314 #. type: Content of: <book><chapter><sect1><sect2><para> 3315 #. type: Content of: <book><chapter><sect1><sect2><para>
3315 #: ../en/ch02-tour-basic.xml:648 3316 #: ../en/ch02-tour-basic.xml:649
3316 msgid "" 3317 msgid ""
3317 "If you decide that you don't want to commit while in the middle of editing a " 3318 "If you decide that you don't want to commit while in the middle of editing a "
3318 "commit message, simply exit from your editor without saving the file that " 3319 "commit message, simply exit from your editor without saving the file that "
3319 "it's editing. This will cause nothing to happen to either the repository or " 3320 "it's editing. This will cause nothing to happen to either the repository or "
3320 "the working directory." 3321 "the working directory."
3321 msgstr "" 3322 msgstr ""
3322 3323
3323 #. type: Content of: <book><chapter><sect1><sect2><para> 3324 #. type: Content of: <book><chapter><sect1><sect2><para>
3324 #: ../en/ch02-tour-basic.xml:653 3325 #: ../en/ch02-tour-basic.xml:654
3325 msgid "" 3326 msgid ""
3326 "If we run the <command role=\"hg-cmd\">hg commit</command> command without " 3327 "If we run the <command role=\"hg-cmd\">hg commit</command> command without "
3327 "any arguments, it records all of the changes we've made, as reported by " 3328 "any arguments, it records all of the changes we've made, as reported by "
3328 "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg " 3329 "<command role=\"hg-cmd\">hg status</command> and <command role=\"hg-cmd\">hg "
3329 "diff</command>." 3330 "diff</command>."
3330 msgstr "" 3331 msgstr ""
3331 3332
3332 #. type: Content of: <book><chapter><sect1><sect2><title> 3333 #. type: Content of: <book><chapter><sect1><sect2><title>
3333 #: ../en/ch02-tour-basic.xml:660 3334 #: ../en/ch02-tour-basic.xml:661
3334 msgid "Admiring our new handiwork" 3335 msgid "Admiring our new handiwork"
3335 msgstr "欣赏我们的新手艺" 3336 msgstr "欣赏我们的新手艺"
3336 3337
3337 #. type: Content of: <book><chapter><sect1><sect2><para> 3338 #. type: Content of: <book><chapter><sect1><sect2><para>
3338 #: ../en/ch02-tour-basic.xml:662 3339 #: ../en/ch02-tour-basic.xml:663
3339 msgid "" 3340 msgid ""
3340 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg " 3341 "Once we've finished the commit, we can use the <command role=\"hg-cmd\">hg "
3341 "tip</command> command to display the changeset we just created. This command " 3342 "tip</command> command to display the changeset we just created. This command "
3342 "produces output that is identical to <command role=\"hg-cmd\">hg log</" 3343 "produces output that is identical to <command role=\"hg-cmd\">hg log</"
3343 "command>, but it only displays the newest revision in the repository." 3344 "command>, but it only displays the newest revision in the repository."
3344 msgstr "" 3345 msgstr ""
3345 3346
3346 #. type: Content of: <book><chapter><sect1><sect2><para> 3347 #. type: Content of: <book><chapter><sect1><sect2><para>
3347 #: ../en/ch02-tour-basic.xml:671 3348 #: ../en/ch02-tour-basic.xml:672
3348 msgid "" 3349 msgid ""
3349 "We refer to the newest revision in the repository as the tip revision, or " 3350 "We refer to the newest revision in the repository as the tip revision, or "
3350 "simply the tip." 3351 "simply the tip."
3351 msgstr "" 3352 msgstr ""
3352 3353
3353 #. type: Content of: <book><chapter><sect1><title> 3354 #. type: Content of: <book><chapter><sect1><title>
3354 #: ../en/ch02-tour-basic.xml:678 3355 #: ../en/ch02-tour-basic.xml:679
3355 msgid "Sharing changes" 3356 msgid "Sharing changes"
3356 msgstr "共享修改" 3357 msgstr "共享修改"
3357 3358
3358 #. type: Content of: <book><chapter><sect1><para> 3359 #. type: Content of: <book><chapter><sect1><para>
3359 #: ../en/ch02-tour-basic.xml:680 3360 #: ../en/ch02-tour-basic.xml:681
3360 msgid "" 3361 msgid ""
3361 "We mentioned earlier that repositories in Mercurial are self-contained. This " 3362 "We mentioned earlier that repositories in Mercurial are self-contained. This "
3362 "means that the changeset we just created exists only in our <filename class=" 3363 "means that the changeset we just created exists only in our <filename class="
3363 "\"directory\">my-hello</filename> repository. Let's look at a few ways that " 3364 "\"directory\">my-hello</filename> repository. Let's look at a few ways that "
3364 "we can propagate this change into other repositories." 3365 "we can propagate this change into other repositories."
3365 msgstr "" 3366 msgstr ""
3366 3367
3367 #. type: Content of: <book><chapter><sect1><sect2><title> 3368 #. type: Content of: <book><chapter><sect1><sect2><title>
3368 #: ../en/ch02-tour-basic.xml:688 3369 #: ../en/ch02-tour-basic.xml:689
3369 msgid "Pulling changes from another repository" 3370 msgid "Pulling changes from another repository"
3370 msgstr "从其它版本库取得修改" 3371 msgstr "从其它版本库取得修改"
3371 3372
3372 #. type: Content of: <book><chapter><sect1><sect2><para> 3373 #. type: Content of: <book><chapter><sect1><sect2><para>
3373 #: ../en/ch02-tour-basic.xml:689 3374 #: ../en/ch02-tour-basic.xml:690
3374 msgid "" 3375 msgid ""
3375 "To get started, let's clone our original <filename class=\"directory\">hello</" 3376 "To get started, let's clone our original <filename class=\"directory\">hello</"
3376 "filename> repository, which does not contain the change we just committed. " 3377 "filename> repository, which does not contain the change we just committed. "
3377 "We'll call our temporary repository <filename class=\"directory\">hello-pull</" 3378 "We'll call our temporary repository <filename class=\"directory\">hello-pull</"
3378 "filename>." 3379 "filename>."
3379 msgstr "" 3380 msgstr ""
3380 3381
3381 #. type: Content of: <book><chapter><sect1><sect2><para> 3382 #. type: Content of: <book><chapter><sect1><sect2><para>
3382 #: ../en/ch02-tour-basic.xml:697 3383 #: ../en/ch02-tour-basic.xml:698
3383 msgid "" 3384 msgid ""
3384 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring " 3385 "We'll use the <command role=\"hg-cmd\">hg pull</command> command to bring "
3385 "changes from <filename class=\"directory\">my-hello</filename> into <filename " 3386 "changes from <filename class=\"directory\">my-hello</filename> into <filename "
3386 "class=\"directory\">hello-pull</filename>. However, blindly pulling unknown " 3387 "class=\"directory\">hello-pull</filename>. However, blindly pulling unknown "
3387 "changes into a repository is a somewhat scary prospect. Mercurial provides " 3388 "changes into a repository is a somewhat scary prospect. Mercurial provides "
3390 "<emphasis>would</emphasis> pull into the repository, without actually pulling " 3391 "<emphasis>would</emphasis> pull into the repository, without actually pulling "
3391 "the changes in." 3392 "the changes in."
3392 msgstr "" 3393 msgstr ""
3393 3394
3394 #. type: Content of: <book><chapter><sect1><sect2><para> 3395 #. type: Content of: <book><chapter><sect1><sect2><para>
3395 #: ../en/ch02-tour-basic.xml:710 3396 #: ../en/ch02-tour-basic.xml:711
3396 msgid "" 3397 msgid ""
3397 "(Of course, someone could cause more changesets to appear in the repository " 3398 "(Of course, someone could cause more changesets to appear in the repository "
3398 "that we ran <command role=\"hg-cmd\">hg incoming</command> in, before we get " 3399 "that we ran <command role=\"hg-cmd\">hg incoming</command> in, before we get "
3399 "a chance to <command role=\"hg-cmd\">hg pull</command> the changes, so that " 3400 "a chance to <command role=\"hg-cmd\">hg pull</command> the changes, so that "
3400 "we could end up pulling changes that we didn't expect.)" 3401 "we could end up pulling changes that we didn't expect.)"
3401 msgstr "" 3402 msgstr ""
3402 3403
3403 #. type: Content of: <book><chapter><sect1><sect2><para> 3404 #. type: Content of: <book><chapter><sect1><sect2><para>
3404 #: ../en/ch02-tour-basic.xml:717 3405 #: ../en/ch02-tour-basic.xml:718
3405 msgid "" 3406 msgid ""
3406 "Bringing changes into a repository is a simple matter of running the <command " 3407 "Bringing changes into a repository is a simple matter of running the <command "
3407 "role=\"hg-cmd\">hg pull</command> command, and telling it which repository to " 3408 "role=\"hg-cmd\">hg pull</command> command, and telling it which repository to "
3408 "pull from." 3409 "pull from."
3409 msgstr "" 3410 msgstr ""
3410 3411
3411 #. type: Content of: <book><chapter><sect1><sect2><para> 3412 #. type: Content of: <book><chapter><sect1><sect2><para>
3412 #: ../en/ch02-tour-basic.xml:724 3413 #: ../en/ch02-tour-basic.xml:725
3413 msgid "" 3414 msgid ""
3414 "As you can see from the before-and-after output of <command role=\"hg-cmd" 3415 "As you can see from the before-and-after output of <command role=\"hg-cmd"
3415 "\">hg tip</command>, we have successfully pulled changes into our " 3416 "\">hg tip</command>, we have successfully pulled changes into our "
3416 "repository. There remains one step before we can see these changes in the " 3417 "repository. There remains one step before we can see these changes in the "
3417 "working directory." 3418 "working directory."
3418 msgstr "" 3419 msgstr ""
3419 3420
3420 #. type: Content of: <book><chapter><sect1><sect2><title> 3421 #. type: Content of: <book><chapter><sect1><sect2><title>
3421 #: ../en/ch02-tour-basic.xml:732 3422 #: ../en/ch02-tour-basic.xml:733
3422 msgid "Updating the working directory" 3423 msgid "Updating the working directory"
3423 msgstr "更新工作目录" 3424 msgstr "更新工作目录"
3424 3425
3425 #. type: Content of: <book><chapter><sect1><sect2><para> 3426 #. type: Content of: <book><chapter><sect1><sect2><para>
3426 #: ../en/ch02-tour-basic.xml:734 3427 #: ../en/ch02-tour-basic.xml:735
3427 msgid "" 3428 msgid ""
3428 "We have so far glossed over the relationship between a repository and its " 3429 "We have so far glossed over the relationship between a repository and its "
3429 "working directory. The <command role=\"hg-cmd\">hg pull</command> command " 3430 "working directory. The <command role=\"hg-cmd\">hg pull</command> command "
3430 "that we ran in section <xref linkend=\"sec.tour.pull\"/> brought changes into " 3431 "that we ran in section <xref linkend=\"sec.tour.pull\"/> brought changes into "
3431 "the repository, but if we check, there's no sign of those changes in the " 3432 "the repository, but if we check, there's no sign of those changes in the "
3433 "command> does not (by default) touch the working directory. Instead, we use " 3434 "command> does not (by default) touch the working directory. Instead, we use "
3434 "the <command role=\"hg-cmd\">hg update</command> command to do this." 3435 "the <command role=\"hg-cmd\">hg update</command> command to do this."
3435 msgstr "" 3436 msgstr ""
3436 3437
3437 #. type: Content of: <book><chapter><sect1><sect2><para> 3438 #. type: Content of: <book><chapter><sect1><sect2><para>
3438 #: ../en/ch02-tour-basic.xml:746 3439 #: ../en/ch02-tour-basic.xml:747
3439 msgid "" 3440 msgid ""
3440 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> " 3441 "It might seem a bit strange that <command role=\"hg-cmd\">hg pull</command> "
3441 "doesn't update the working directory automatically. There's actually a good " 3442 "doesn't update the working directory automatically. There's actually a good "
3442 "reason for this: you can use <command role=\"hg-cmd\">hg update</command> to " 3443 "reason for this: you can use <command role=\"hg-cmd\">hg update</command> to "
3443 "update the working directory to the state it was in at <emphasis>any " 3444 "update the working directory to the state it was in at <emphasis>any "
3447 "automatically updated the working directory to a new revision, you might not " 3448 "automatically updated the working directory to a new revision, you might not "
3448 "be terribly happy." 3449 "be terribly happy."
3449 msgstr "" 3450 msgstr ""
3450 3451
3451 #. type: Content of: <book><chapter><sect1><sect2><para> 3452 #. type: Content of: <book><chapter><sect1><sect2><para>
3452 #: ../en/ch02-tour-basic.xml:757 3453 #: ../en/ch02-tour-basic.xml:758
3453 msgid "" 3454 msgid ""
3454 "However, since pull-then-update is such a common thing to do, Mercurial lets " 3455 "However, since pull-then-update is such a common thing to do, Mercurial lets "
3455 "you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> " 3456 "you combine the two by passing the <option role=\"hg-opt-pull\">-u</option> "
3456 "option to <command role=\"hg-cmd\">hg pull</command>." 3457 "option to <command role=\"hg-cmd\">hg pull</command>."
3457 msgstr "" 3458 msgstr ""
3458 3459
3459 #. type: Content of: <book><chapter><sect1><sect2><para> 3460 #. type: Content of: <book><chapter><sect1><sect2><para>
3460 #: ../en/ch02-tour-basic.xml:762 3461 #: ../en/ch02-tour-basic.xml:763
3461 msgid "" 3462 msgid ""
3462 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> " 3463 "If you look back at the output of <command role=\"hg-cmd\">hg pull</command> "
3463 "in section <xref linkend=\"sec.tour.pull\"/> when we ran it without <option " 3464 "in section <xref linkend=\"sec.tour.pull\"/> when we ran it without <option "
3464 "role=\"hg-opt-pull\">-u</option>, you can see that it printed a helpful " 3465 "role=\"hg-opt-pull\">-u</option>, you can see that it printed a helpful "
3465 "reminder that we'd have to take an explicit step to update the working " 3466 "reminder that we'd have to take an explicit step to update the working "
3466 "directory:" 3467 "directory:"
3467 msgstr "" 3468 msgstr ""
3468 3469
3469 #. type: Content of: <book><chapter><sect1><sect2><para> 3470 #. type: Content of: <book><chapter><sect1><sect2><para>
3470 #: ../en/ch02-tour-basic.xml:771 3471 #: ../en/ch02-tour-basic.xml:772
3471 msgid "" 3472 msgid ""
3472 "To find out what revision the working directory is at, use the <command role=" 3473 "To find out what revision the working directory is at, use the <command role="
3473 "\"hg-cmd\">hg parents</command> command." 3474 "\"hg-cmd\">hg parents</command> command."
3474 msgstr "" 3475 msgstr ""
3475 3476
3476 #. type: Content of: <book><chapter><sect1><sect2><para> 3477 #. type: Content of: <book><chapter><sect1><sect2><para>
3477 #: ../en/ch02-tour-basic.xml:777 3478 #: ../en/ch02-tour-basic.xml:778
3478 msgid "" 3479 msgid ""
3479 "If you look back at figure <xref linkend=\"fig.tour-basic.history\"/>, you'll " 3480 "If you look back at figure <xref endterm=\"fig.tour-basic.history.caption\" "
3480 "see arrows connecting each changeset. The node that the arrow leads " 3481 "linkend=\"fig.tour-basic.history\"/>, you'll see arrows connecting each "
3481 "<emphasis>from</emphasis> in each case is a parent, and the node that the " 3482 "changeset. The node that the arrow leads <emphasis>from</emphasis> in each "
3482 "arrow leads <emphasis>to</emphasis> is its child. The working directory has " 3483 "case is a parent, and the node that the arrow leads <emphasis>to</emphasis> "
3483 "a parent in just the same way; this is the changeset that the working " 3484 "is its child. The working directory has a parent in just the same way; this "
3484 "directory currently contains." 3485 "is the changeset that the working directory currently contains."
3485 msgstr "" 3486 msgstr ""
3486 3487
3487 #. type: Content of: <book><chapter><sect1><sect2><para> 3488 #. type: Content of: <book><chapter><sect1><sect2><para>
3488 #: ../en/ch02-tour-basic.xml:786 3489 #: ../en/ch02-tour-basic.xml:788
3489 msgid "" 3490 msgid ""
3490 "To update the working directory to a particular revision, give a revision " 3491 "To update the working directory to a particular revision, give a revision "
3491 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> " 3492 "number or changeset ID to the <command role=\"hg-cmd\">hg update</command> "
3492 "command." 3493 "command."
3493 msgstr "" 3494 msgstr ""
3494 3495
3495 #. type: Content of: <book><chapter><sect1><sect2><para> 3496 #. type: Content of: <book><chapter><sect1><sect2><para>
3496 #: ../en/ch02-tour-basic.xml:793 3497 #: ../en/ch02-tour-basic.xml:795
3497 msgid "" 3498 msgid ""
3498 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</" 3499 "If you omit an explicit revision, <command role=\"hg-cmd\">hg update</"
3499 "command> will update to the tip revision, as shown by the second call to " 3500 "command> will update to the tip revision, as shown by the second call to "
3500 "<command role=\"hg-cmd\">hg update</command> in the example above." 3501 "<command role=\"hg-cmd\">hg update</command> in the example above."
3501 msgstr "" 3502 msgstr ""
3502 3503
3503 #. type: Content of: <book><chapter><sect1><sect2><title> 3504 #. type: Content of: <book><chapter><sect1><sect2><title>
3504 #: ../en/ch02-tour-basic.xml:801 3505 #: ../en/ch02-tour-basic.xml:803
3505 msgid "Pushing changes to another repository" 3506 msgid "Pushing changes to another repository"
3506 msgstr "发布修改到其它版本库" 3507 msgstr "发布修改到其它版本库"
3507 3508
3508 #. type: Content of: <book><chapter><sect1><sect2><para> 3509 #. type: Content of: <book><chapter><sect1><sect2><para>
3509 #: ../en/ch02-tour-basic.xml:803 3510 #: ../en/ch02-tour-basic.xml:805
3510 msgid "" 3511 msgid ""
3511 "Mercurial lets us push changes to another repository, from the repository " 3512 "Mercurial lets us push changes to another repository, from the repository "
3512 "we're currently visiting. As with the example of <command role=\"hg-cmd\">hg " 3513 "we're currently visiting. As with the example of <command role=\"hg-cmd\">hg "
3513 "pull</command> above, we'll create a temporary repository to push our changes " 3514 "pull</command> above, we'll create a temporary repository to push our changes "
3514 "into." 3515 "into."
3515 msgstr "" 3516 msgstr ""
3516 3517
3517 #. type: Content of: <book><chapter><sect1><sect2><para> 3518 #. type: Content of: <book><chapter><sect1><sect2><para>
3518 #: ../en/ch02-tour-basic.xml:811 3519 #: ../en/ch02-tour-basic.xml:813
3519 msgid "" 3520 msgid ""
3520 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what " 3521 "The <command role=\"hg-cmd\">hg outgoing</command> command tells us what "
3521 "changes would be pushed into another repository." 3522 "changes would be pushed into another repository."
3522 msgstr "" 3523 msgstr ""
3523 3524
3524 #. type: Content of: <book><chapter><sect1><sect2><para> 3525 #. type: Content of: <book><chapter><sect1><sect2><para>
3525 #: ../en/ch02-tour-basic.xml:817 3526 #: ../en/ch02-tour-basic.xml:819
3526 msgid "" 3527 msgid ""
3527 "And the <command role=\"hg-cmd\">hg push</command> command does the actual " 3528 "And the <command role=\"hg-cmd\">hg push</command> command does the actual "
3528 "push." 3529 "push."
3529 msgstr "" 3530 msgstr ""
3530 3531
3531 #. type: Content of: <book><chapter><sect1><sect2><para> 3532 #. type: Content of: <book><chapter><sect1><sect2><para>
3532 #: ../en/ch02-tour-basic.xml:823 3533 #: ../en/ch02-tour-basic.xml:825
3533 msgid "" 3534 msgid ""
3534 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd" 3535 "As with <command role=\"hg-cmd\">hg pull</command>, the <command role=\"hg-cmd"
3535 "\">hg push</command> command does not update the working directory in the " 3536 "\">hg push</command> command does not update the working directory in the "
3536 "repository that it's pushing changes into. (Unlike <command role=\"hg-cmd" 3537 "repository that it's pushing changes into. (Unlike <command role=\"hg-cmd"
3537 "\">hg pull</command>, <command role=\"hg-cmd\">hg push</command> does not " 3538 "\">hg pull</command>, <command role=\"hg-cmd\">hg push</command> does not "
3538 "provide a <literal>-u</literal> option that updates the other repository's " 3539 "provide a <literal>-u</literal> option that updates the other repository's "
3539 "working directory.)" 3540 "working directory.)"
3540 msgstr "" 3541 msgstr ""
3541 3542
3542 #. type: Content of: <book><chapter><sect1><sect2><para> 3543 #. type: Content of: <book><chapter><sect1><sect2><para>
3543 #: ../en/ch02-tour-basic.xml:832 3544 #: ../en/ch02-tour-basic.xml:834
3544 msgid "" 3545 msgid ""
3545 "What happens if we try to pull or push changes and the receiving repository " 3546 "What happens if we try to pull or push changes and the receiving repository "
3546 "already has those changes? Nothing too exciting." 3547 "already has those changes? Nothing too exciting."
3547 msgstr "" 3548 msgstr ""
3548 3549
3549 #. type: Content of: <book><chapter><sect1><sect2><title> 3550 #. type: Content of: <book><chapter><sect1><sect2><title>
3550 #: ../en/ch02-tour-basic.xml:839 3551 #: ../en/ch02-tour-basic.xml:841
3551 msgid "Sharing changes over a network" 3552 msgid "Sharing changes over a network"
3552 msgstr "通过网络共享修改" 3553 msgstr "通过网络共享修改"
3553 3554
3554 #. type: Content of: <book><chapter><sect1><sect2><para> 3555 #. type: Content of: <book><chapter><sect1><sect2><para>
3555 #: ../en/ch02-tour-basic.xml:841 3556 #: ../en/ch02-tour-basic.xml:843
3556 msgid "" 3557 msgid ""
3557 "The commands we have covered in the previous few sections are not limited to " 3558 "The commands we have covered in the previous few sections are not limited to "
3558 "working with local repositories. Each works in exactly the same fashion over " 3559 "working with local repositories. Each works in exactly the same fashion over "
3559 "a network connection; simply pass in a URL instead of a local path." 3560 "a network connection; simply pass in a URL instead of a local path."
3560 msgstr "" 3561 msgstr ""
3561 3562
3562 #. type: Content of: <book><chapter><sect1><sect2><para> 3563 #. type: Content of: <book><chapter><sect1><sect2><para>
3563 #: ../en/ch02-tour-basic.xml:849 3564 #: ../en/ch02-tour-basic.xml:851
3564 msgid "" 3565 msgid ""
3565 "In this example, we can see what changes we could push to the remote " 3566 "In this example, we can see what changes we could push to the remote "
3566 "repository, but the repository is understandably not set up to let anonymous " 3567 "repository, but the repository is understandably not set up to let anonymous "
3567 "users push to it." 3568 "users push to it."
3568 msgstr "" 3569 msgstr ""
3620 #. type: Content of: <book><chapter><sect1><para> 3621 #. type: Content of: <book><chapter><sect1><para>
3621 #: ../en/ch03-tour-merge.xml:37 3622 #: ../en/ch03-tour-merge.xml:37
3622 msgid "" 3623 msgid ""
3623 "We should now have two copies of <filename>hello.c</filename> with different " 3624 "We should now have two copies of <filename>hello.c</filename> with different "
3624 "contents. The histories of the two repositories have also diverged, as " 3625 "contents. The histories of the two repositories have also diverged, as "
3625 "illustrated in figure <xref linkend=\"fig.tour-merge.sep-repos\"/>." 3626 "illustrated in figure <xref endterm=\"fig.tour-merge.sep-repos.caption\" "
3627 "linkend=\"fig.tour-merge.sep-repos\"/>."
3626 msgstr "" 3628 msgstr ""
3627 3629
3628 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 3630 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject>
3629 #: ../en/ch03-tour-merge.xml:47 3631 #: ../en/ch03-tour-merge.xml:47
3630 msgid "" 3632 msgid ""
3639 "filename> and <filename class=\"directory\">my-new-hello</filename> " 3641 "filename> and <filename class=\"directory\">my-new-hello</filename> "
3640 "repositories" 3642 "repositories"
3641 msgstr "" 3643 msgstr ""
3642 3644
3643 #. type: Content of: <book><chapter><sect1><para> 3645 #. type: Content of: <book><chapter><sect1><para>
3644 #: ../en/ch03-tour-merge.xml:56 3646 #: ../en/ch03-tour-merge.xml:57
3645 msgid "" 3647 msgid ""
3646 "We already know that pulling changes from our <filename class=\"directory" 3648 "We already know that pulling changes from our <filename class=\"directory"
3647 "\">my-hello</filename> repository will have no effect on the working " 3649 "\">my-hello</filename> repository will have no effect on the working "
3648 "directory." 3650 "directory."
3649 msgstr "" 3651 msgstr ""
3650 3652
3651 #. type: Content of: <book><chapter><sect1><para> 3653 #. type: Content of: <book><chapter><sect1><para>
3652 #: ../en/ch03-tour-merge.xml:62 3654 #: ../en/ch03-tour-merge.xml:63
3653 msgid "" 3655 msgid ""
3654 "However, the <command role=\"hg-cmd\">hg pull</command> command says " 3656 "However, the <command role=\"hg-cmd\">hg pull</command> command says "
3655 "something about <quote>heads</quote>." 3657 "something about <quote>heads</quote>."
3656 msgstr "" 3658 msgstr ""
3657 3659
3658 #. type: Content of: <book><chapter><sect1><sect2><title> 3660 #. type: Content of: <book><chapter><sect1><sect2><title>
3659 #: ../en/ch03-tour-merge.xml:66 3661 #: ../en/ch03-tour-merge.xml:67
3660 msgid "Head changesets" 3662 msgid "Head changesets"
3661 msgstr "顶点改变集" 3663 msgstr "顶点改变集"
3662 3664
3663 #. type: Content of: <book><chapter><sect1><sect2><para> 3665 #. type: Content of: <book><chapter><sect1><sect2><para>
3664 #: ../en/ch03-tour-merge.xml:68 3666 #: ../en/ch03-tour-merge.xml:69
3665 msgid "" 3667 msgid ""
3666 "A head is a change that has no descendants, or children, as they're also " 3668 "A head is a change that has no descendants, or children, as they're also "
3667 "known. The tip revision is thus a head, because the newest revision in a " 3669 "known. The tip revision is thus a head, because the newest revision in a "
3668 "repository doesn't have any children, but a repository can contain more than " 3670 "repository doesn't have any children, but a repository can contain more than "
3669 "one head." 3671 "one head."
3670 msgstr "" 3672 msgstr ""
3671 3673
3672 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 3674 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
3673 #: ../en/ch03-tour-merge.xml:75 3675 #: ../en/ch03-tour-merge.xml:77
3674 msgid "" 3676 msgid ""
3675 "<imageobject><imagedata fileref=\"images/tour-merge-pull.png\"/></imageobject>" 3677 "<imageobject><imagedata fileref=\"images/tour-merge-pull.png\"/></imageobject>"
3676 msgstr "" 3678 msgstr ""
3677 3679
3678 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 3680 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
3679 #: ../en/ch03-tour-merge.xml:78 3681 #: ../en/ch03-tour-merge.xml:79
3680 msgid "" 3682 msgid ""
3681 "Repository contents after pulling from <filename class=\"directory\">my-" 3683 "Repository contents after pulling from <filename class=\"directory\">my-"
3682 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>" 3684 "hello</filename> into <filename class=\"directory\">my-new-hello</filename>"
3683 msgstr "" 3685 msgstr ""
3684 3686
3685 #. type: Content of: <book><chapter><sect1><sect2><para> 3687 #. type: Content of: <book><chapter><sect1><sect2><para>
3686 #: ../en/ch03-tour-merge.xml:85 3688 #: ../en/ch03-tour-merge.xml:85
3687 msgid "" 3689 msgid ""
3688 "In figure <xref linkend=\"fig.tour-merge.pull\"/>, you can see the effect of " 3690 "In figure <xref endterm=\"fig.tour-merge.pull.caption\" linkend=\"fig.tour-"
3689 "the pull from <filename class=\"directory\">my-hello</filename> into " 3691 "merge.pull\"/>, you can see the effect of the pull from <filename class="
3690 "<filename class=\"directory\">my-new-hello</filename>. The history that was " 3692 "\"directory\">my-hello</filename> into <filename class=\"directory\">my-new-"
3691 "already present in <filename class=\"directory\">my-new-hello</filename> is " 3693 "hello</filename>. The history that was already present in <filename class="
3692 "untouched, but a new revision has been added. By referring to figure <xref " 3694 "\"directory\">my-new-hello</filename> is untouched, but a new revision has "
3693 "linkend=\"fig.tour-merge.sep-repos\"/>, we can see that the " 3695 "been added. By referring to figure <xref endterm=\"fig.tour-merge.sep-repos."
3696 "caption\" linkend=\"fig.tour-merge.sep-repos\"/>, we can see that the "
3694 "<emphasis>changeset ID</emphasis> remains the same in the new repository, but " 3697 "<emphasis>changeset ID</emphasis> remains the same in the new repository, but "
3695 "the <emphasis>revision number</emphasis> has changed. (This, incidentally, " 3698 "the <emphasis>revision number</emphasis> has changed. (This, incidentally, "
3696 "is a fine example of why it's not safe to use revision numbers when " 3699 "is a fine example of why it's not safe to use revision numbers when "
3697 "discussing changesets.) We can view the heads in a repository using the " 3700 "discussing changesets.) We can view the heads in a repository using the "
3698 "<command role=\"hg-cmd\">hg heads</command> command." 3701 "<command role=\"hg-cmd\">hg heads</command> command."
3699 msgstr "" 3702 msgstr ""
3700 3703
3701 #. type: Content of: <book><chapter><sect1><sect2><title> 3704 #. type: Content of: <book><chapter><sect1><sect2><title>
3702 #: ../en/ch03-tour-merge.xml:104 3705 #: ../en/ch03-tour-merge.xml:106
3703 msgid "Performing the merge" 3706 msgid "Performing the merge"
3704 msgstr "执行合并" 3707 msgstr "执行合并"
3705 3708
3706 #. type: Content of: <book><chapter><sect1><sect2><para> 3709 #. type: Content of: <book><chapter><sect1><sect2><para>
3707 #: ../en/ch03-tour-merge.xml:106 3710 #: ../en/ch03-tour-merge.xml:108
3708 msgid "" 3711 msgid ""
3709 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</" 3712 "What happens if we try to use the normal <command role=\"hg-cmd\">hg update</"
3710 "command> command to update to the new tip?" 3713 "command> command to update to the new tip?"
3711 msgstr "" 3714 msgstr ""
3712 3715
3713 #. type: Content of: <book><chapter><sect1><sect2><para> 3716 #. type: Content of: <book><chapter><sect1><sect2><para>
3714 #: ../en/ch03-tour-merge.xml:112 3717 #: ../en/ch03-tour-merge.xml:114
3715 msgid "" 3718 msgid ""
3716 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> " 3719 "Mercurial is telling us that the <command role=\"hg-cmd\">hg update</command> "
3717 "command won't do a merge; it won't update the working directory when it " 3720 "command won't do a merge; it won't update the working directory when it "
3718 "thinks we might be wanting to do a merge, unless we force it to do so. " 3721 "thinks we might be wanting to do a merge, unless we force it to do so. "
3719 "Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to " 3722 "Instead, we use the <command role=\"hg-cmd\">hg merge</command> command to "
3720 "merge the two heads." 3723 "merge the two heads."
3721 msgstr "" 3724 msgstr ""
3722 3725
3723 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 3726 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
3724 #: ../en/ch03-tour-merge.xml:123 3727 #: ../en/ch03-tour-merge.xml:125
3725 msgid "" 3728 msgid ""
3726 "<imageobject><imagedata fileref=\"images/tour-merge-merge.png\"/></" 3729 "<imageobject><imagedata fileref=\"images/tour-merge-merge.png\"/></"
3727 "imageobject>" 3730 "imageobject>"
3728 msgstr "" 3731 msgstr ""
3729 3732
3730 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 3733 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
3731 #: ../en/ch03-tour-merge.xml:126 3734 #: ../en/ch03-tour-merge.xml:127
3732 msgid "Working directory and repository during merge, and following commit" 3735 msgid "Working directory and repository during merge, and following commit"
3733 msgstr "" 3736 msgstr ""
3734 3737
3735 #. type: Content of: <book><chapter><sect1><sect2><para> 3738 #. type: Content of: <book><chapter><sect1><sect2><para>
3736 #: ../en/ch03-tour-merge.xml:131 3739 #: ../en/ch03-tour-merge.xml:132
3737 msgid "" 3740 msgid ""
3738 "This updates the working directory so that it contains changes from " 3741 "This updates the working directory so that it contains changes from "
3739 "<emphasis>both</emphasis> heads, which is reflected in both the output of " 3742 "<emphasis>both</emphasis> heads, which is reflected in both the output of "
3740 "<command role=\"hg-cmd\">hg parents</command> and the contents of " 3743 "<command role=\"hg-cmd\">hg parents</command> and the contents of "
3741 "<filename>hello.c</filename>." 3744 "<filename>hello.c</filename>."
3742 msgstr "" 3745 msgstr ""
3743 3746
3744 #. type: Content of: <book><chapter><sect1><sect2><title> 3747 #. type: Content of: <book><chapter><sect1><sect2><title>
3745 #: ../en/ch03-tour-merge.xml:141 3748 #: ../en/ch03-tour-merge.xml:142
3746 msgid "Committing the results of the merge" 3749 msgid "Committing the results of the merge"
3747 msgstr "提交合并结果" 3750 msgstr "提交合并结果"
3748 3751
3749 #. type: Content of: <book><chapter><sect1><sect2><para> 3752 #. type: Content of: <book><chapter><sect1><sect2><para>
3750 #: ../en/ch03-tour-merge.xml:143 3753 #: ../en/ch03-tour-merge.xml:144
3751 msgid "" 3754 msgid ""
3752 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> " 3755 "Whenever we've done a merge, <command role=\"hg-cmd\">hg parents</command> "
3753 "will display two parents until we <command role=\"hg-cmd\">hg commit</" 3756 "will display two parents until we <command role=\"hg-cmd\">hg commit</"
3754 "command> the results of the merge." 3757 "command> the results of the merge."
3755 msgstr "" 3758 msgstr ""
3756 3759
3757 #. type: Content of: <book><chapter><sect1><sect2><para> 3760 #. type: Content of: <book><chapter><sect1><sect2><para>
3758 #: ../en/ch03-tour-merge.xml:150 3761 #: ../en/ch03-tour-merge.xml:151
3759 msgid "" 3762 msgid ""
3760 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> " 3763 "We now have a new tip revision; notice that it has <emphasis>both</emphasis> "
3761 "of our former heads as its parents. These are the same revisions that were " 3764 "of our former heads as its parents. These are the same revisions that were "
3762 "previously displayed by <command role=\"hg-cmd\">hg parents</command>." 3765 "previously displayed by <command role=\"hg-cmd\">hg parents</command>."
3763 msgstr "" 3766 msgstr ""
3764 3767
3765 #. type: Content of: <book><chapter><sect1><sect2><para> 3768 #. type: Content of: <book><chapter><sect1><sect2><para>
3766 #: ../en/ch03-tour-merge.xml:157 3769 #: ../en/ch03-tour-merge.xml:158
3767 msgid "" 3770 msgid ""
3768 "In figure <xref linkend=\"fig.tour-merge.merge\"/>, you can see a " 3771 "In figure <xref endterm=\"fig.tour-merge.merge.caption\" linkend=\"fig.tour-"
3769 "representation of what happens to the working directory during the merge, and " 3772 "merge.merge\"/>, you can see a representation of what happens to the working "
3770 "how this affects the repository when the commit happens. During the merge, " 3773 "directory during the merge, and how this affects the repository when the "
3771 "the working directory has two parent changesets, and these become the parents " 3774 "commit happens. During the merge, the working directory has two parent "
3772 "of the new changeset." 3775 "changesets, and these become the parents of the new changeset."
3773 msgstr "" 3776 msgstr ""
3774 3777
3775 #. type: Content of: <book><chapter><sect1><title> 3778 #. type: Content of: <book><chapter><sect1><title>
3776 #: ../en/ch03-tour-merge.xml:168 3779 #: ../en/ch03-tour-merge.xml:169
3777 msgid "Merging conflicting changes" 3780 msgid "Merging conflicting changes"
3778 msgstr "合并有冲突的改变" 3781 msgstr "合并有冲突的改变"
3779 3782
3780 #. type: Content of: <book><chapter><sect1><para> 3783 #. type: Content of: <book><chapter><sect1><para>
3781 #: ../en/ch03-tour-merge.xml:170 3784 #: ../en/ch03-tour-merge.xml:171
3782 msgid "" 3785 msgid ""
3783 "Most merges are simple affairs, but sometimes you'll find yourself merging " 3786 "Most merges are simple affairs, but sometimes you'll find yourself merging "
3784 "changes where each modifies the same portions of the same files. Unless both " 3787 "changes where each modifies the same portions of the same files. Unless both "
3785 "modifications are identical, this results in a <emphasis>conflict</emphasis>, " 3788 "modifications are identical, this results in a <emphasis>conflict</emphasis>, "
3786 "where you have to decide how to reconcile the different changes into " 3789 "where you have to decide how to reconcile the different changes into "
3788 msgstr "" 3791 msgstr ""
3789 3792
3790 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 3793 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject>
3791 #: ../en/ch03-tour-merge.xml:180 3794 #: ../en/ch03-tour-merge.xml:180
3792 msgid "" 3795 msgid ""
3793 "<imageobject><imagedata fileref=\"images/tour-merge-conflict.png\"/></" 3796 "<imageobject><imagedata fileref=\"images/tour-merge-conflict.png\"/> </"
3794 "imageobject>" 3797 "imageobject>"
3795 msgstr "" 3798 msgstr ""
3796 3799
3797 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para> 3800 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para>
3798 #: ../en/ch03-tour-merge.xml:182 3801 #: ../en/ch03-tour-merge.xml:183
3799 msgid "Conflicting changes to a document" 3802 msgid "Conflicting changes to a document"
3800 msgstr "" 3803 msgstr ""
3801 3804
3802 #. type: Content of: <book><chapter><sect1><para> 3805 #. type: Content of: <book><chapter><sect1><para>
3803 #: ../en/ch03-tour-merge.xml:186 3806 #: ../en/ch03-tour-merge.xml:188
3804 msgid "" 3807 msgid ""
3805 "Figure <xref linkend=\"fig.tour-merge.conflict\"/> illustrates an instance of " 3808 "Figure <xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-"
3806 "two conflicting changes to a document. We started with a single version of " 3809 "merge.conflict\"/> illustrates an instance of two conflicting changes to a "
3807 "the file; then we made some changes; while someone else made different " 3810 "document. We started with a single version of the file; then we made some "
3808 "changes to the same text. Our task in resolving the conflicting changes is " 3811 "changes; while someone else made different changes to the same text. Our "
3809 "to decide what the file should look like." 3812 "task in resolving the conflicting changes is to decide what the file should "
3810 msgstr "" 3813 "look like."
3811 3814 msgstr ""
3812 #. type: Content of: <book><chapter><sect1><para> 3815
3813 #: ../en/ch03-tour-merge.xml:193 3816 #. type: Content of: <book><chapter><sect1><para>
3817 #: ../en/ch03-tour-merge.xml:196
3814 msgid "" 3818 msgid ""
3815 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, " 3819 "Mercurial doesn't have a built-in facility for handling conflicts. Instead, "
3816 "it runs an external program called <command>hgmerge</command>. This is a " 3820 "it runs an external program called <command>hgmerge</command>. This is a "
3817 "shell script that is bundled with Mercurial; you can change it to behave " 3821 "shell script that is bundled with Mercurial; you can change it to behave "
3818 "however you please. What it does by default is try to find one of several " 3822 "however you please. What it does by default is try to find one of several "
3821 "(because the resolution process requires human guidance) or aren't present, " 3825 "(because the resolution process requires human guidance) or aren't present, "
3822 "the script tries a few different graphical merging tools." 3826 "the script tries a few different graphical merging tools."
3823 msgstr "" 3827 msgstr ""
3824 3828
3825 #. type: Content of: <book><chapter><sect1><para> 3829 #. type: Content of: <book><chapter><sect1><para>
3826 #: ../en/ch03-tour-merge.xml:204 3830 #: ../en/ch03-tour-merge.xml:207
3827 msgid "" 3831 msgid ""
3828 "It's also possible to get Mercurial to run another program or script instead " 3832 "It's also possible to get Mercurial to run another program or script instead "
3829 "of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> " 3833 "of <command>hgmerge</command>, by setting the <envar>HGMERGE</envar> "
3830 "environment variable to the name of your preferred program." 3834 "environment variable to the name of your preferred program."
3831 msgstr "" 3835 msgstr ""
3832 3836
3833 #. type: Content of: <book><chapter><sect1><sect2><title> 3837 #. type: Content of: <book><chapter><sect1><sect2><title>
3834 #: ../en/ch03-tour-merge.xml:210 3838 #: ../en/ch03-tour-merge.xml:213
3835 msgid "Using a graphical merge tool" 3839 msgid "Using a graphical merge tool"
3836 msgstr "使用图形合并工具" 3840 msgstr "使用图形合并工具"
3837 3841
3838 #. type: Content of: <book><chapter><sect1><sect2><para> 3842 #. type: Content of: <book><chapter><sect1><sect2><para>
3839 #: ../en/ch03-tour-merge.xml:212 3843 #: ../en/ch03-tour-merge.xml:215
3840 msgid "" 3844 msgid ""
3841 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll " 3845 "My preferred graphical merge tool is <command>kdiff3</command>, which I'll "
3842 "use to describe the features that are common to graphical file merging " 3846 "use to describe the features that are common to graphical file merging "
3843 "tools. You can see a screenshot of <command>kdiff3</command> in action in " 3847 "tools. You can see a screenshot of <command>kdiff3</command> in action in "
3844 "figure <xref linkend=\"fig.tour-merge.kdiff3\"/>. The kind of merge it is " 3848 "figure <xref endterm=\"fig.tour-merge.kdiff3.caption\" linkend=\"fig.tour-"
3845 "performing is called a <emphasis>three-way merge</emphasis>, because there " 3849 "merge.kdiff3\"/>. The kind of merge it is performing is called a "
3846 "are three different versions of the file of interest to us. The tool thus " 3850 "<emphasis>three-way merge</emphasis>, because there are three different "
3847 "splits the upper portion of the window into three panes:" 3851 "versions of the file of interest to us. The tool thus splits the upper "
3852 "portion of the window into three panes:"
3848 msgstr "" 3853 msgstr ""
3849 3854
3850 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 3855 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3851 #: ../en/ch03-tour-merge.xml:222 3856 #: ../en/ch03-tour-merge.xml:226
3852 msgid "" 3857 msgid ""
3853 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the " 3858 "At the left is the <emphasis>base</emphasis> version of the file, i.e. the "
3854 "most recent version from which the two versions we're trying to merge are " 3859 "most recent version from which the two versions we're trying to merge are "
3855 "descended." 3860 "descended."
3856 msgstr "" 3861 msgstr ""
3857 3862
3858 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 3863 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3859 #: ../en/ch03-tour-merge.xml:227 3864 #: ../en/ch03-tour-merge.xml:231
3860 msgid "" 3865 msgid ""
3861 "In the middle is <quote>our</quote> version of the file, with the contents " 3866 "In the middle is <quote>our</quote> version of the file, with the contents "
3862 "that we modified." 3867 "that we modified."
3863 msgstr "" 3868 msgstr ""
3864 3869
3865 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 3870 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
3866 #: ../en/ch03-tour-merge.xml:230 3871 #: ../en/ch03-tour-merge.xml:234
3867 msgid "" 3872 msgid ""
3868 "On the right is <quote>their</quote> version of the file, the one that from " 3873 "On the right is <quote>their</quote> version of the file, the one that from "
3869 "the changeset that we're trying to merge with." 3874 "the changeset that we're trying to merge with."
3870 msgstr "" 3875 msgstr ""
3871 3876
3872 #. type: Content of: <book><chapter><sect1><sect2><para> 3877 #. type: Content of: <book><chapter><sect1><sect2><para>
3873 #: ../en/ch03-tour-merge.xml:234 3878 #: ../en/ch03-tour-merge.xml:238
3874 msgid "" 3879 msgid ""
3875 "In the pane below these is the current <emphasis>result</emphasis> of the " 3880 "In the pane below these is the current <emphasis>result</emphasis> of the "
3876 "merge. Our task is to replace all of the red text, which indicates unresolved " 3881 "merge. Our task is to replace all of the red text, which indicates unresolved "
3877 "conflicts, with some sensible merger of the <quote>ours</quote> and " 3882 "conflicts, with some sensible merger of the <quote>ours</quote> and "
3878 "<quote>theirs</quote> versions of the file." 3883 "<quote>theirs</quote> versions of the file."
3879 msgstr "" 3884 msgstr ""
3880 3885
3881 #. type: Content of: <book><chapter><sect1><sect2><para> 3886 #. type: Content of: <book><chapter><sect1><sect2><para>
3882 #: ../en/ch03-tour-merge.xml:241 3887 #: ../en/ch03-tour-merge.xml:245
3883 msgid "" 3888 msgid ""
3884 "All four of these panes are <emphasis>locked together</emphasis>; if we " 3889 "All four of these panes are <emphasis>locked together</emphasis>; if we "
3885 "scroll vertically or horizontally in any of them, the others are updated to " 3890 "scroll vertically or horizontally in any of them, the others are updated to "
3886 "display the corresponding sections of their respective files." 3891 "display the corresponding sections of their respective files."
3887 msgstr "" 3892 msgstr ""
3888 3893
3889 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 3894 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
3890 #: ../en/ch03-tour-merge.xml:247 3895 #: ../en/ch03-tour-merge.xml:252
3891 msgid "" 3896 msgid ""
3892 "<imageobject><imagedata width=\"100%\" fileref=\"images/kdiff3.png\"/></" 3897 "<imageobject><imagedata width=\"100%\" fileref=\"images/kdiff3.png\"/> </"
3893 "imageobject>" 3898 "imageobject>"
3894 msgstr "" 3899 msgstr ""
3895 3900
3896 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 3901 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
3897 #: ../en/ch03-tour-merge.xml:250 3902 #: ../en/ch03-tour-merge.xml:255
3898 msgid "Using <command>kdiff3</command> to merge versions of a file" 3903 msgid "Using <command>kdiff3</command> to merge versions of a file"
3899 msgstr "" 3904 msgstr ""
3900 3905
3901 #. type: Content of: <book><chapter><sect1><sect2><para> 3906 #. type: Content of: <book><chapter><sect1><sect2><para>
3902 #: ../en/ch03-tour-merge.xml:255 3907 #: ../en/ch03-tour-merge.xml:261
3903 msgid "" 3908 msgid ""
3904 "For each conflicting portion of the file, we can choose to resolve the " 3909 "For each conflicting portion of the file, we can choose to resolve the "
3905 "conflict using some combination of text from the base version, ours, or " 3910 "conflict using some combination of text from the base version, ours, or "
3906 "theirs. We can also manually edit the merged file at any time, in case we " 3911 "theirs. We can also manually edit the merged file at any time, in case we "
3907 "need to make further modifications." 3912 "need to make further modifications."
3908 msgstr "" 3913 msgstr ""
3909 3914
3910 #. type: Content of: <book><chapter><sect1><sect2><para> 3915 #. type: Content of: <book><chapter><sect1><sect2><para>
3911 #: ../en/ch03-tour-merge.xml:261 3916 #: ../en/ch03-tour-merge.xml:267
3912 msgid "" 3917 msgid ""
3913 "There are <emphasis>many</emphasis> file merging tools available, too many to " 3918 "There are <emphasis>many</emphasis> file merging tools available, too many to "
3914 "cover here. They vary in which platforms they are available for, and in " 3919 "cover here. They vary in which platforms they are available for, and in "
3915 "their particular strengths and weaknesses. Most are tuned for merging files " 3920 "their particular strengths and weaknesses. Most are tuned for merging files "
3916 "containing plain text, while a few are aimed at specialised file formats " 3921 "containing plain text, while a few are aimed at specialised file formats "
3917 "(generally XML)." 3922 "(generally XML)."
3918 msgstr "" 3923 msgstr ""
3919 3924
3920 #. type: Content of: <book><chapter><sect1><sect2><title> 3925 #. type: Content of: <book><chapter><sect1><sect2><title>
3921 #: ../en/ch03-tour-merge.xml:270 3926 #: ../en/ch03-tour-merge.xml:276
3922 msgid "A worked example" 3927 msgid "A worked example"
3923 msgstr "合并实例" 3928 msgstr "合并实例"
3924 3929
3925 #. type: Content of: <book><chapter><sect1><sect2><para> 3930 #. type: Content of: <book><chapter><sect1><sect2><para>
3926 #: ../en/ch03-tour-merge.xml:272 3931 #: ../en/ch03-tour-merge.xml:278
3927 msgid "" 3932 msgid ""
3928 "In this example, we will reproduce the file modification history of figure " 3933 "In this example, we will reproduce the file modification history of figure "
3929 "<xref linkend=\"fig.tour-merge.conflict\"/> above. Let's begin by creating a " 3934 "<xref endterm=\"fig.tour-merge.conflict.caption\" linkend=\"fig.tour-merge."
3930 "repository with a base version of our document." 3935 "conflict\"/> above. Let's begin by creating a repository with a base version "
3931 msgstr "" 3936 "of our document."
3932 3937 msgstr ""
3933 #. type: Content of: <book><chapter><sect1><sect2><para> 3938
3934 #: ../en/ch03-tour-merge.xml:279 3939 #. type: Content of: <book><chapter><sect1><sect2><para>
3940 #: ../en/ch03-tour-merge.xml:286
3935 msgid "We'll clone the repository and make a change to the file." 3941 msgid "We'll clone the repository and make a change to the file."
3936 msgstr "" 3942 msgstr ""
3937 3943
3938 #. type: Content of: <book><chapter><sect1><sect2><para> 3944 #. type: Content of: <book><chapter><sect1><sect2><para>
3939 #: ../en/ch03-tour-merge.xml:284 3945 #: ../en/ch03-tour-merge.xml:291
3940 msgid "" 3946 msgid ""
3941 "And another clone, to simulate someone else making a change to the file. " 3947 "And another clone, to simulate someone else making a change to the file. "
3942 "(This hints at the idea that it's not all that unusual to merge with yourself " 3948 "(This hints at the idea that it's not all that unusual to merge with yourself "
3943 "when you isolate tasks in separate repositories, and indeed to find and " 3949 "when you isolate tasks in separate repositories, and indeed to find and "
3944 "resolve conflicts while doing so.)" 3950 "resolve conflicts while doing so.)"
3945 msgstr "" 3951 msgstr ""
3946 3952
3947 #. type: Content of: <book><chapter><sect1><sect2><para> 3953 #. type: Content of: <book><chapter><sect1><sect2><para>
3948 #: ../en/ch03-tour-merge.xml:292 3954 #: ../en/ch03-tour-merge.xml:299
3949 msgid "" 3955 msgid ""
3950 "Having created two different versions of the file, we'll set up an " 3956 "Having created two different versions of the file, we'll set up an "
3951 "environment suitable for running our merge." 3957 "environment suitable for running our merge."
3952 msgstr "" 3958 msgstr ""
3953 3959
3954 #. type: Content of: <book><chapter><sect1><sect2><para> 3960 #. type: Content of: <book><chapter><sect1><sect2><para>
3955 #: ../en/ch03-tour-merge.xml:298 3961 #: ../en/ch03-tour-merge.xml:305
3956 msgid "" 3962 msgid ""
3957 "In this example, I won't use Mercurial's normal <command>hgmerge</command> " 3963 "In this example, I won't use Mercurial's normal <command>hgmerge</command> "
3958 "program to do the merge, because it would drop my nice automated example-" 3964 "program to do the merge, because it would drop my nice automated example-"
3959 "running tool into a graphical user interface. Instead, I'll set " 3965 "running tool into a graphical user interface. Instead, I'll set "
3960 "<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive " 3966 "<envar>HGMERGE</envar> to tell Mercurial to use the non-interactive "
3962 "systems. If you're following this example on your computer, don't bother " 3968 "systems. If you're following this example on your computer, don't bother "
3963 "setting <envar>HGMERGE</envar>." 3969 "setting <envar>HGMERGE</envar>."
3964 msgstr "" 3970 msgstr ""
3965 3971
3966 #. type: Content of: <book><chapter><sect1><sect2><para> 3972 #. type: Content of: <book><chapter><sect1><sect2><para>
3967 #: ../en/ch03-tour-merge.xml:308 3973 #: ../en/ch03-tour-merge.xml:315
3968 msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>" 3974 msgid "<emphasis role=\"bold\">XXX FIX THIS EXAMPLE.</emphasis>"
3969 msgstr "" 3975 msgstr ""
3970 3976
3971 #. type: Content of: <book><chapter><sect1><sect2><para> 3977 #. type: Content of: <book><chapter><sect1><sect2><para>
3972 #: ../en/ch03-tour-merge.xml:313 3978 #: ../en/ch03-tour-merge.xml:320
3973 msgid "" 3979 msgid ""
3974 "Because <command>merge</command> can't resolve the conflicting changes, it " 3980 "Because <command>merge</command> can't resolve the conflicting changes, it "
3975 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, " 3981 "leaves <emphasis>merge markers</emphasis> inside the file that has conflicts, "
3976 "indicating which lines have conflicts, and whether they came from our version " 3982 "indicating which lines have conflicts, and whether they came from our version "
3977 "of the file or theirs." 3983 "of the file or theirs."
3978 msgstr "" 3984 msgstr ""
3979 3985
3980 #. type: Content of: <book><chapter><sect1><sect2><para> 3986 #. type: Content of: <book><chapter><sect1><sect2><para>
3981 #: ../en/ch03-tour-merge.xml:319 3987 #: ../en/ch03-tour-merge.xml:326
3982 msgid "" 3988 msgid ""
3983 "Mercurial can tell from the way <command>merge</command> exits that it wasn't " 3989 "Mercurial can tell from the way <command>merge</command> exits that it wasn't "
3984 "able to merge successfully, so it tells us what commands we'll need to run if " 3990 "able to merge successfully, so it tells us what commands we'll need to run if "
3985 "we want to redo the merging operation. This could be useful if, for example, " 3991 "we want to redo the merging operation. This could be useful if, for example, "
3986 "we were running a graphical merge tool and quit because we were confused or " 3992 "we were running a graphical merge tool and quit because we were confused or "
3987 "realised we had made a mistake." 3993 "realised we had made a mistake."
3988 msgstr "" 3994 msgstr ""
3989 3995
3990 #. type: Content of: <book><chapter><sect1><sect2><para> 3996 #. type: Content of: <book><chapter><sect1><sect2><para>
3991 #: ../en/ch03-tour-merge.xml:326 3997 #: ../en/ch03-tour-merge.xml:333
3992 msgid "" 3998 msgid ""
3993 "If automatic or manual merges fail, there's nothing to prevent us from " 3999 "If automatic or manual merges fail, there's nothing to prevent us from "
3994 "<quote>fixing up</quote> the affected files ourselves, and committing the " 4000 "<quote>fixing up</quote> the affected files ourselves, and committing the "
3995 "results of our merge:" 4001 "results of our merge:"
3996 msgstr "" 4002 msgstr ""
3997 4003
3998 #. type: Content of: <book><chapter><sect1><title> 4004 #. type: Content of: <book><chapter><sect1><title>
3999 #: ../en/ch03-tour-merge.xml:335 4005 #: ../en/ch03-tour-merge.xml:342
4000 msgid "Simplifying the pull-merge-commit sequence" 4006 msgid "Simplifying the pull-merge-commit sequence"
4001 msgstr "简化拉-合并-提交程序" 4007 msgstr "简化拉-合并-提交程序"
4002 4008
4003 #. type: Content of: <book><chapter><sect1><para> 4009 #. type: Content of: <book><chapter><sect1><para>
4004 #: ../en/ch03-tour-merge.xml:337 4010 #: ../en/ch03-tour-merge.xml:344
4005 msgid "" 4011 msgid ""
4006 "The process of merging changes as outlined above is straightforward, but " 4012 "The process of merging changes as outlined above is straightforward, but "
4007 "requires running three commands in sequence." 4013 "requires running three commands in sequence."
4008 msgstr "" 4014 msgstr ""
4009 4015
4010 #. type: Content of: <book><chapter><sect1><para> 4016 #. type: Content of: <book><chapter><sect1><para>
4011 #: ../en/ch03-tour-merge.xml:343 4017 #: ../en/ch03-tour-merge.xml:350
4012 msgid "" 4018 msgid ""
4013 "In the case of the final commit, you also need to enter a commit message, " 4019 "In the case of the final commit, you also need to enter a commit message, "
4014 "which is almost always going to be a piece of uninteresting " 4020 "which is almost always going to be a piece of uninteresting "
4015 "<quote>boilerplate</quote> text." 4021 "<quote>boilerplate</quote> text."
4016 msgstr "" 4022 msgstr ""
4017 4023
4018 #. type: Content of: <book><chapter><sect1><para> 4024 #. type: Content of: <book><chapter><sect1><para>
4019 #: ../en/ch03-tour-merge.xml:347 4025 #: ../en/ch03-tour-merge.xml:354
4020 msgid "" 4026 msgid ""
4021 "It would be nice to reduce the number of steps needed, if this were " 4027 "It would be nice to reduce the number of steps needed, if this were "
4022 "possible. Indeed, Mercurial is distributed with an extension called <literal " 4028 "possible. Indeed, Mercurial is distributed with an extension called <literal "
4023 "role=\"hg-ext\">fetch</literal> that does just this." 4029 "role=\"hg-ext\">fetch</literal> that does just this."
4024 msgstr "" 4030 msgstr ""
4025 4031
4026 #. type: Content of: <book><chapter><sect1><para> 4032 #. type: Content of: <book><chapter><sect1><para>
4027 #: ../en/ch03-tour-merge.xml:352 4033 #: ../en/ch03-tour-merge.xml:359
4028 msgid "" 4034 msgid ""
4029 "Mercurial provides a flexible extension mechanism that lets people extend its " 4035 "Mercurial provides a flexible extension mechanism that lets people extend its "
4030 "functionality, while keeping the core of Mercurial small and easy to deal " 4036 "functionality, while keeping the core of Mercurial small and easy to deal "
4031 "with. Some extensions add new commands that you can use from the command " 4037 "with. Some extensions add new commands that you can use from the command "
4032 "line, while others work <quote>behind the scenes,</quote> for example adding " 4038 "line, while others work <quote>behind the scenes,</quote> for example adding "
4033 "capabilities to the server." 4039 "capabilities to the server."
4034 msgstr "" 4040 msgstr ""
4035 4041
4036 #. type: Content of: <book><chapter><sect1><para> 4042 #. type: Content of: <book><chapter><sect1><para>
4037 #: ../en/ch03-tour-merge.xml:359 4043 #: ../en/ch03-tour-merge.xml:366
4038 msgid "" 4044 msgid ""
4039 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command " 4045 "The <literal role=\"hg-ext\">fetch</literal> extension adds a new command "
4040 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This " 4046 "called, not surprisingly, <command role=\"hg-cmd\">hg fetch</command>. This "
4041 "extension acts as a combination of <command role=\"hg-cmd\">hg pull</" 4047 "extension acts as a combination of <command role=\"hg-cmd\">hg pull</"
4042 "command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-" 4048 "command>, <command role=\"hg-cmd\">hg update</command> and <command role=\"hg-"
4046 "merge with an automatically-generated commit message. If no new heads were " 4052 "merge with an automatically-generated commit message. If no new heads were "
4047 "added, it updates the working directory to the new tip changeset." 4053 "added, it updates the working directory to the new tip changeset."
4048 msgstr "" 4054 msgstr ""
4049 4055
4050 #. type: Content of: <book><chapter><sect1><para> 4056 #. type: Content of: <book><chapter><sect1><para>
4051 #: ../en/ch03-tour-merge.xml:372 4057 #: ../en/ch03-tour-merge.xml:379
4052 msgid "" 4058 msgid ""
4053 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. " 4059 "Enabling the <literal role=\"hg-ext\">fetch</literal> extension is easy. "
4054 "Edit your <filename role=\"special\">.hgrc</filename>, and either go to the " 4060 "Edit your <filename role=\"special\">.hgrc</filename>, and either go to the "
4055 "<literal role=\"rc-extensions\">extensions</literal> section or create an " 4061 "<literal role=\"rc-extensions\">extensions</literal> section or create an "
4056 "<literal role=\"rc-extensions\">extensions</literal> section. Then add a line " 4062 "<literal role=\"rc-extensions\">extensions</literal> section. Then add a line "
4057 "that simply reads <quote><literal>fetch </literal></quote>." 4063 "that simply reads <quote><literal>fetch </literal></quote>."
4058 msgstr "" 4064 msgstr ""
4059 4065
4060 #. type: Content of: <book><chapter><sect1><para> 4066 #. type: Content of: <book><chapter><sect1><para>
4061 #: ../en/ch03-tour-merge.xml:382 4067 #: ../en/ch03-tour-merge.xml:389
4062 msgid "" 4068 msgid ""
4063 "(Normally, on the right-hand side of the <quote><literal>=</literal></quote> " 4069 "(Normally, on the right-hand side of the <quote><literal>=</literal></quote> "
4064 "would appear the location of the extension, but since the <literal role=\"hg-" 4070 "would appear the location of the extension, but since the <literal role=\"hg-"
4065 "ext\">fetch</literal> extension is in the standard distribution, Mercurial " 4071 "ext\">fetch</literal> extension is in the standard distribution, Mercurial "
4066 "knows where to search for it.)" 4072 "knows where to search for it.)"
4127 "separate data (<quote><literal>.d</literal></quote> suffix) and index " 4133 "separate data (<quote><literal>.d</literal></quote> suffix) and index "
4128 "(<quote><literal>.i</literal></quote> suffix) files. For small files without " 4134 "(<quote><literal>.i</literal></quote> suffix) files. For small files without "
4129 "much history, the revision data and index are combined in a single " 4135 "much history, the revision data and index are combined in a single "
4130 "<quote><literal>.i</literal></quote> file. The correspondence between a file " 4136 "<quote><literal>.i</literal></quote> file. The correspondence between a file "
4131 "in the working directory and the filelog that tracks its history in the " 4137 "in the working directory and the filelog that tracks its history in the "
4132 "repository is illustrated in figure <xref linkend=\"fig.concepts.filelog\"/>." 4138 "repository is illustrated in figure <xref endterm=\"fig.concepts.filelog."
4139 "caption\" linkend=\"fig.concepts.filelog\"/>."
4133 msgstr "" 4140 msgstr ""
4134 4141
4135 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4142 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4136 #: ../en/ch04-concepts.xml:53 4143 #: ../en/ch04-concepts.xml:55
4137 msgid "<imageobject><imagedata fileref=\"images/filelog.png\"/></imageobject>" 4144 msgid "<imageobject><imagedata fileref=\"images/filelog.png\"/></imageobject>"
4138 msgstr "" 4145 msgstr ""
4139 4146
4140 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4147 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4141 #: ../en/ch04-concepts.xml:56 4148 #: ../en/ch04-concepts.xml:57
4142 msgid "" 4149 msgid ""
4143 "Relationships between files in working directory and filelogs in repository" 4150 "Relationships between files in working directory and filelogs in repository"
4144 msgstr "" 4151 msgstr ""
4145 4152
4146 #. type: Content of: <book><chapter><sect1><sect2><title> 4153 #. type: Content of: <book><chapter><sect1><sect2><title>
4147 #: ../en/ch04-concepts.xml:63 4154 #: ../en/ch04-concepts.xml:65
4148 msgid "Managing tracked files" 4155 msgid "Managing tracked files"
4149 msgstr "管理跟踪的文件" 4156 msgstr "管理跟踪的文件"
4150 4157
4151 #. type: Content of: <book><chapter><sect1><sect2><para> 4158 #. type: Content of: <book><chapter><sect1><sect2><para>
4152 #: ../en/ch04-concepts.xml:65 4159 #: ../en/ch04-concepts.xml:67
4153 msgid "" 4160 msgid ""
4154 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect " 4161 "Mercurial uses a structure called a <emphasis>manifest</emphasis> to collect "
4155 "together information about the files that it tracks. Each entry in the " 4162 "together information about the files that it tracks. Each entry in the "
4156 "manifest contains information about the files present in a single changeset. " 4163 "manifest contains information about the files present in a single changeset. "
4157 "An entry records which files are present in the changeset, the revision of " 4164 "An entry records which files are present in the changeset, the revision of "
4158 "each file, and a few other pieces of file metadata." 4165 "each file, and a few other pieces of file metadata."
4159 msgstr "" 4166 msgstr ""
4160 4167
4161 #. type: Content of: <book><chapter><sect1><sect2><title> 4168 #. type: Content of: <book><chapter><sect1><sect2><title>
4162 #: ../en/ch04-concepts.xml:75 4169 #: ../en/ch04-concepts.xml:77
4163 msgid "Recording changeset information" 4170 msgid "Recording changeset information"
4164 msgstr "记录修改集信息" 4171 msgstr "记录修改集信息"
4165 4172
4166 #. type: Content of: <book><chapter><sect1><sect2><para> 4173 #. type: Content of: <book><chapter><sect1><sect2><para>
4167 #: ../en/ch04-concepts.xml:77 4174 #: ../en/ch04-concepts.xml:79
4168 msgid "" 4175 msgid ""
4169 "The <emphasis>changelog</emphasis> contains information about each " 4176 "The <emphasis>changelog</emphasis> contains information about each "
4170 "changeset. Each revision records who committed a change, the changeset " 4177 "changeset. Each revision records who committed a change, the changeset "
4171 "comment, other pieces of changeset-related information, and the revision of " 4178 "comment, other pieces of changeset-related information, and the revision of "
4172 "the manifest to use." 4179 "the manifest to use."
4173 msgstr "" 4180 msgstr ""
4174 4181
4175 #. type: Content of: <book><chapter><sect1><sect2><title> 4182 #. type: Content of: <book><chapter><sect1><sect2><title>
4176 #: ../en/ch04-concepts.xml:85 4183 #: ../en/ch04-concepts.xml:87
4177 msgid "Relationships between revisions" 4184 msgid "Relationships between revisions"
4178 msgstr "版本之间的关系" 4185 msgstr "版本之间的关系"
4179 4186
4180 #. type: Content of: <book><chapter><sect1><sect2><para> 4187 #. type: Content of: <book><chapter><sect1><sect2><para>
4181 #: ../en/ch04-concepts.xml:87 4188 #: ../en/ch04-concepts.xml:89
4182 msgid "" 4189 msgid ""
4183 "Within a changelog, a manifest, or a filelog, each revision stores a pointer " 4190 "Within a changelog, a manifest, or a filelog, each revision stores a pointer "
4184 "to its immediate parent (or to its two parents, if it's a merge revision). " 4191 "to its immediate parent (or to its two parents, if it's a merge revision). "
4185 "As I mentioned above, there are also relationships between revisions " 4192 "As I mentioned above, there are also relationships between revisions "
4186 "<emphasis>across</emphasis> these structures, and they are hierarchical in " 4193 "<emphasis>across</emphasis> these structures, and they are hierarchical in "
4187 "nature." 4194 "nature."
4188 msgstr "" 4195 msgstr ""
4189 4196
4190 #. type: Content of: <book><chapter><sect1><sect2><para> 4197 #. type: Content of: <book><chapter><sect1><sect2><para>
4191 #: ../en/ch04-concepts.xml:94 4198 #: ../en/ch04-concepts.xml:96
4192 msgid "" 4199 msgid ""
4193 "For every changeset in a repository, there is exactly one revision stored in " 4200 "For every changeset in a repository, there is exactly one revision stored in "
4194 "the changelog. Each revision of the changelog contains a pointer to a single " 4201 "the changelog. Each revision of the changelog contains a pointer to a single "
4195 "revision of the manifest. A revision of the manifest stores a pointer to a " 4202 "revision of the manifest. A revision of the manifest stores a pointer to a "
4196 "single revision of each filelog tracked when that changeset was created. " 4203 "single revision of each filelog tracked when that changeset was created. "
4197 "These relationships are illustrated in figure <xref linkend=\"fig.concepts." 4204 "These relationships are illustrated in figure <xref endterm=\"fig.concepts."
4198 "metadata\"/>." 4205 "metadata.caption\" linkend=\"fig.concepts.metadata\"/>."
4199 msgstr "" 4206 msgstr ""
4200 4207
4201 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4208 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4202 #: ../en/ch04-concepts.xml:103 4209 #: ../en/ch04-concepts.xml:107
4203 msgid "<imageobject><imagedata fileref=\"images/metadata.png\"/></imageobject>" 4210 msgid "<imageobject><imagedata fileref=\"images/metadata.png\"/></imageobject>"
4204 msgstr "" 4211 msgstr ""
4205 4212
4206 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4213 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4207 #: ../en/ch04-concepts.xml:105 4214 #: ../en/ch04-concepts.xml:109
4208 msgid "Metadata relationships" 4215 msgid "Metadata relationships"
4209 msgstr "" 4216 msgstr ""
4210 4217
4211 #. type: Content of: <book><chapter><sect1><sect2><para> 4218 #. type: Content of: <book><chapter><sect1><sect2><para>
4212 #: ../en/ch04-concepts.xml:110 4219 #: ../en/ch04-concepts.xml:114
4213 msgid "" 4220 msgid ""
4214 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to " 4221 "As the illustration shows, there is <emphasis>not</emphasis> a <quote>one to "
4215 "one</quote> relationship between revisions in the changelog, manifest, or " 4222 "one</quote> relationship between revisions in the changelog, manifest, or "
4216 "filelog. If the manifest hasn't changed between two changesets, the changelog " 4223 "filelog. If the manifest hasn't changed between two changesets, the changelog "
4217 "entries for those changesets will point to the same revision of the " 4224 "entries for those changesets will point to the same revision of the "
4219 "changesets, the entry for that file in the two revisions of the manifest will " 4226 "changesets, the entry for that file in the two revisions of the manifest will "
4220 "point to the same revision of its filelog." 4227 "point to the same revision of its filelog."
4221 msgstr "" 4228 msgstr ""
4222 4229
4223 #. type: Content of: <book><chapter><sect1><title> 4230 #. type: Content of: <book><chapter><sect1><title>
4224 #: ../en/ch04-concepts.xml:123 4231 #: ../en/ch04-concepts.xml:127
4225 msgid "Safe, efficient storage" 4232 msgid "Safe, efficient storage"
4226 msgstr "安全,高效的存储" 4233 msgstr "安全,高效的存储"
4227 4234
4228 #. type: Content of: <book><chapter><sect1><para> 4235 #. type: Content of: <book><chapter><sect1><para>
4229 #: ../en/ch04-concepts.xml:125 4236 #: ../en/ch04-concepts.xml:129
4230 msgid "" 4237 msgid ""
4231 "The underpinnings of changelogs, manifests, and filelogs are provided by a " 4238 "The underpinnings of changelogs, manifests, and filelogs are provided by a "
4232 "single structure called the <emphasis>revlog</emphasis>." 4239 "single structure called the <emphasis>revlog</emphasis>."
4233 msgstr "" 4240 msgstr ""
4234 4241
4235 #. type: Content of: <book><chapter><sect1><sect2><title> 4242 #. type: Content of: <book><chapter><sect1><sect2><title>
4236 #: ../en/ch04-concepts.xml:130 4243 #: ../en/ch04-concepts.xml:134
4237 msgid "Efficient storage" 4244 msgid "Efficient storage"
4238 msgstr "高效存储" 4245 msgstr "高效存储"
4239 4246
4240 #. type: Content of: <book><chapter><sect1><sect2><para> 4247 #. type: Content of: <book><chapter><sect1><sect2><para>
4241 #: ../en/ch04-concepts.xml:132 4248 #: ../en/ch04-concepts.xml:136
4242 msgid "" 4249 msgid ""
4243 "The revlog provides efficient storage of revisions using a <emphasis>delta</" 4250 "The revlog provides efficient storage of revisions using a <emphasis>delta</"
4244 "emphasis> mechanism. Instead of storing a complete copy of a file for each " 4251 "emphasis> mechanism. Instead of storing a complete copy of a file for each "
4245 "revision, it stores the changes needed to transform an older revision into " 4252 "revision, it stores the changes needed to transform an older revision into "
4246 "the new revision. For many kinds of file data, these deltas are typically a " 4253 "the new revision. For many kinds of file data, these deltas are typically a "
4247 "fraction of a percent of the size of a full copy of a file." 4254 "fraction of a percent of the size of a full copy of a file."
4248 msgstr "" 4255 msgstr ""
4249 4256
4250 #. type: Content of: <book><chapter><sect1><sect2><para> 4257 #. type: Content of: <book><chapter><sect1><sect2><para>
4251 #: ../en/ch04-concepts.xml:140 4258 #: ../en/ch04-concepts.xml:144
4252 msgid "" 4259 msgid ""
4253 "Some obsolete revision control systems can only work with deltas of text " 4260 "Some obsolete revision control systems can only work with deltas of text "
4254 "files. They must either store binary files as complete snapshots or encoded " 4261 "files. They must either store binary files as complete snapshots or encoded "
4255 "into a text representation, both of which are wasteful approaches. Mercurial " 4262 "into a text representation, both of which are wasteful approaches. Mercurial "
4256 "can efficiently handle deltas of files with arbitrary binary contents; it " 4263 "can efficiently handle deltas of files with arbitrary binary contents; it "
4257 "doesn't need to treat text as special." 4264 "doesn't need to treat text as special."
4258 msgstr "" 4265 msgstr ""
4259 4266
4260 #. type: Content of: <book><chapter><sect1><sect2><title> 4267 #. type: Content of: <book><chapter><sect1><sect2><title>
4261 #: ../en/ch04-concepts.xml:149 4268 #: ../en/ch04-concepts.xml:153
4262 msgid "Safe operation" 4269 msgid "Safe operation"
4263 msgstr "安全操作" 4270 msgstr "安全操作"
4264 4271
4265 #. type: Content of: <book><chapter><sect1><sect2><para> 4272 #. type: Content of: <book><chapter><sect1><sect2><para>
4266 #: ../en/ch04-concepts.xml:151 4273 #: ../en/ch04-concepts.xml:155
4267 msgid "" 4274 msgid ""
4268 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog " 4275 "Mercurial only ever <emphasis>appends</emphasis> data to the end of a revlog "
4269 "file. It never modifies a section of a file after it has written it. This is " 4276 "file. It never modifies a section of a file after it has written it. This is "
4270 "both more robust and efficient than schemes that need to modify or rewrite " 4277 "both more robust and efficient than schemes that need to modify or rewrite "
4271 "data." 4278 "data."
4272 msgstr "" 4279 msgstr ""
4273 4280
4274 #. type: Content of: <book><chapter><sect1><sect2><para> 4281 #. type: Content of: <book><chapter><sect1><sect2><para>
4275 #: ../en/ch04-concepts.xml:157 4282 #: ../en/ch04-concepts.xml:161
4276 msgid "" 4283 msgid ""
4277 "In addition, Mercurial treats every write as part of a <emphasis>transaction</" 4284 "In addition, Mercurial treats every write as part of a <emphasis>transaction</"
4278 "emphasis> that can span a number of files. A transaction is " 4285 "emphasis> that can span a number of files. A transaction is "
4279 "<emphasis>atomic</emphasis>: either the entire transaction succeeds and its " 4286 "<emphasis>atomic</emphasis>: either the entire transaction succeeds and its "
4280 "effects are all visible to readers in one go, or the whole thing is undone. " 4287 "effects are all visible to readers in one go, or the whole thing is undone. "
4282 "Mercurial, where one is reading data and one is writing it, the reader will " 4289 "Mercurial, where one is reading data and one is writing it, the reader will "
4283 "never see a partially written result that might confuse it." 4290 "never see a partially written result that might confuse it."
4284 msgstr "" 4291 msgstr ""
4285 4292
4286 #. type: Content of: <book><chapter><sect1><sect2><para> 4293 #. type: Content of: <book><chapter><sect1><sect2><para>
4287 #: ../en/ch04-concepts.xml:167 4294 #: ../en/ch04-concepts.xml:171
4288 msgid "" 4295 msgid ""
4289 "The fact that Mercurial only appends to files makes it easier to provide this " 4296 "The fact that Mercurial only appends to files makes it easier to provide this "
4290 "transactional guarantee. The easier it is to do stuff like this, the more " 4297 "transactional guarantee. The easier it is to do stuff like this, the more "
4291 "confident you should be that it's done correctly." 4298 "confident you should be that it's done correctly."
4292 msgstr "" 4299 msgstr ""
4293 4300
4294 #. type: Content of: <book><chapter><sect1><sect2><title> 4301 #. type: Content of: <book><chapter><sect1><sect2><title>
4295 #: ../en/ch04-concepts.xml:174 4302 #: ../en/ch04-concepts.xml:178
4296 msgid "Fast retrieval" 4303 msgid "Fast retrieval"
4297 msgstr "快速检索" 4304 msgstr "快速检索"
4298 4305
4299 #. type: Content of: <book><chapter><sect1><sect2><para> 4306 #. type: Content of: <book><chapter><sect1><sect2><para>
4300 #: ../en/ch04-concepts.xml:176 4307 #: ../en/ch04-concepts.xml:180
4301 msgid "" 4308 msgid ""
4302 "Mercurial cleverly avoids a pitfall common to all earlier revision control " 4309 "Mercurial cleverly avoids a pitfall common to all earlier revision control "
4303 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most " 4310 "systems: the problem of <emphasis>inefficient retrieval</emphasis>. Most "
4304 "revision control systems store the contents of a revision as an incremental " 4311 "revision control systems store the contents of a revision as an incremental "
4305 "series of modifications against a <quote>snapshot</quote>. To reconstruct a " 4312 "series of modifications against a <quote>snapshot</quote>. To reconstruct a "
4308 "history that a file accumulates, the more revisions you must read, hence the " 4315 "history that a file accumulates, the more revisions you must read, hence the "
4309 "longer it takes to reconstruct a particular revision." 4316 "longer it takes to reconstruct a particular revision."
4310 msgstr "" 4317 msgstr ""
4311 4318
4312 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4319 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4313 #: ../en/ch04-concepts.xml:188 4320 #: ../en/ch04-concepts.xml:193
4314 msgid "<imageobject><imagedata fileref=\"images/snapshot.png\"/></imageobject>" 4321 msgid "<imageobject><imagedata fileref=\"images/snapshot.png\"/></imageobject>"
4315 msgstr "" 4322 msgstr ""
4316 4323
4317 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4324 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4318 #: ../en/ch04-concepts.xml:190 4325 #: ../en/ch04-concepts.xml:195
4319 msgid "Snapshot of a revlog, with incremental deltas" 4326 msgid "Snapshot of a revlog, with incremental deltas"
4320 msgstr "" 4327 msgstr ""
4321 4328
4322 #. type: Content of: <book><chapter><sect1><sect2><para> 4329 #. type: Content of: <book><chapter><sect1><sect2><para>
4323 #: ../en/ch04-concepts.xml:195 4330 #: ../en/ch04-concepts.xml:200
4324 msgid "" 4331 msgid ""
4325 "The innovation that Mercurial applies to this problem is simple but " 4332 "The innovation that Mercurial applies to this problem is simple but "
4326 "effective. Once the cumulative amount of delta information stored since the " 4333 "effective. Once the cumulative amount of delta information stored since the "
4327 "last snapshot exceeds a fixed threshold, it stores a new snapshot " 4334 "last snapshot exceeds a fixed threshold, it stores a new snapshot "
4328 "(compressed, of course), instead of another delta. This makes it possible to " 4335 "(compressed, of course), instead of another delta. This makes it possible to "
4330 "approach works so well that it has since been copied by several other " 4337 "approach works so well that it has since been copied by several other "
4331 "revision control systems." 4338 "revision control systems."
4332 msgstr "" 4339 msgstr ""
4333 4340
4334 #. type: Content of: <book><chapter><sect1><sect2><para> 4341 #. type: Content of: <book><chapter><sect1><sect2><para>
4335 #: ../en/ch04-concepts.xml:204 4342 #: ../en/ch04-concepts.xml:209
4336 msgid "" 4343 msgid ""
4337 "Figure <xref linkend=\"fig.concepts.snapshot\"/> illustrates the idea. In an " 4344 "Figure <xref endterm=\"fig.concepts.snapshot.caption\" linkend=\"fig.concepts."
4338 "entry in a revlog's index file, Mercurial stores the range of entries from " 4345 "snapshot\"/> illustrates the idea. In an entry in a revlog's index file, "
4339 "the data file that it must read to reconstruct a particular revision." 4346 "Mercurial stores the range of entries from the data file that it must read to "
4347 "reconstruct a particular revision."
4340 msgstr "" 4348 msgstr ""
4341 4349
4342 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 4350 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
4343 #: ../en/ch04-concepts.xml:210 4351 #: ../en/ch04-concepts.xml:216
4344 msgid "Aside: the influence of video compression" 4352 msgid "Aside: the influence of video compression"
4345 msgstr "" 4353 msgstr ""
4346 4354
4347 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4355 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4348 #: ../en/ch04-concepts.xml:212 4356 #: ../en/ch04-concepts.xml:218
4349 msgid "" 4357 msgid ""
4350 "If you're familiar with video compression or have ever watched a TV feed " 4358 "If you're familiar with video compression or have ever watched a TV feed "
4351 "through a digital cable or satellite service, you may know that most video " 4359 "through a digital cable or satellite service, you may know that most video "
4352 "compression schemes store each frame of video as a delta against its " 4360 "compression schemes store each frame of video as a delta against its "
4353 "predecessor frame. In addition, these schemes use <quote>lossy</quote> " 4361 "predecessor frame. In addition, these schemes use <quote>lossy</quote> "
4354 "compression techniques to increase the compression ratio, so visual errors " 4362 "compression techniques to increase the compression ratio, so visual errors "
4355 "accumulate over the course of a number of inter-frame deltas." 4363 "accumulate over the course of a number of inter-frame deltas."
4356 msgstr "" 4364 msgstr ""
4357 4365
4358 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4366 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4359 #: ../en/ch04-concepts.xml:221 4367 #: ../en/ch04-concepts.xml:227
4360 msgid "" 4368 msgid ""
4361 "Because it's possible for a video stream to <quote>drop out</quote> " 4369 "Because it's possible for a video stream to <quote>drop out</quote> "
4362 "occasionally due to signal glitches, and to limit the accumulation of " 4370 "occasionally due to signal glitches, and to limit the accumulation of "
4363 "artefacts introduced by the lossy compression process, video encoders " 4371 "artefacts introduced by the lossy compression process, video encoders "
4364 "periodically insert a complete frame (called a <quote>key frame</quote>) into " 4372 "periodically insert a complete frame (called a <quote>key frame</quote>) into "
4367 "frame is received. Also, the accumulation of encoding errors restarts anew " 4375 "frame is received. Also, the accumulation of encoding errors restarts anew "
4368 "with each key frame." 4376 "with each key frame."
4369 msgstr "" 4377 msgstr ""
4370 4378
4371 #. type: Content of: <book><chapter><sect1><sect2><title> 4379 #. type: Content of: <book><chapter><sect1><sect2><title>
4372 #: ../en/ch04-concepts.xml:235 4380 #: ../en/ch04-concepts.xml:241
4373 msgid "Identification and strong integrity" 4381 msgid "Identification and strong integrity"
4374 msgstr "鉴别和强完整性" 4382 msgstr "鉴别和强完整性"
4375 4383
4376 #. type: Content of: <book><chapter><sect1><sect2><para> 4384 #. type: Content of: <book><chapter><sect1><sect2><para>
4377 #: ../en/ch04-concepts.xml:237 4385 #: ../en/ch04-concepts.xml:243
4378 msgid "" 4386 msgid ""
4379 "Along with delta or snapshot information, a revlog entry contains a " 4387 "Along with delta or snapshot information, a revlog entry contains a "
4380 "cryptographic hash of the data that it represents. This makes it difficult " 4388 "cryptographic hash of the data that it represents. This makes it difficult "
4381 "to forge the contents of a revision, and easy to detect accidental corruption." 4389 "to forge the contents of a revision, and easy to detect accidental corruption."
4382 msgstr "" 4390 msgstr ""
4383 4391
4384 #. type: Content of: <book><chapter><sect1><sect2><para> 4392 #. type: Content of: <book><chapter><sect1><sect2><para>
4385 #: ../en/ch04-concepts.xml:242 4393 #: ../en/ch04-concepts.xml:248
4386 msgid "" 4394 msgid ""
4387 "Hashes provide more than a mere check against corruption; they are used as " 4395 "Hashes provide more than a mere check against corruption; they are used as "
4388 "the identifiers for revisions. The changeset identification hashes that you " 4396 "the identifiers for revisions. The changeset identification hashes that you "
4389 "see as an end user are from revisions of the changelog. Although filelogs " 4397 "see as an end user are from revisions of the changelog. Although filelogs "
4390 "and the manifest also use hashes, Mercurial only uses these behind the scenes." 4398 "and the manifest also use hashes, Mercurial only uses these behind the scenes."
4391 msgstr "" 4399 msgstr ""
4392 4400
4393 #. type: Content of: <book><chapter><sect1><sect2><para> 4401 #. type: Content of: <book><chapter><sect1><sect2><para>
4394 #: ../en/ch04-concepts.xml:249 4402 #: ../en/ch04-concepts.xml:255
4395 msgid "" 4403 msgid ""
4396 "Mercurial verifies that hashes are correct when it retrieves file revisions " 4404 "Mercurial verifies that hashes are correct when it retrieves file revisions "
4397 "and when it pulls changes from another repository. If it encounters an " 4405 "and when it pulls changes from another repository. If it encounters an "
4398 "integrity problem, it will complain and stop whatever it's doing." 4406 "integrity problem, it will complain and stop whatever it's doing."
4399 msgstr "" 4407 msgstr ""
4400 4408
4401 #. type: Content of: <book><chapter><sect1><sect2><para> 4409 #. type: Content of: <book><chapter><sect1><sect2><para>
4402 #: ../en/ch04-concepts.xml:254 4410 #: ../en/ch04-concepts.xml:260
4403 msgid "" 4411 msgid ""
4404 "In addition to the effect it has on retrieval efficiency, Mercurial's use of " 4412 "In addition to the effect it has on retrieval efficiency, Mercurial's use of "
4405 "periodic snapshots makes it more robust against partial data corruption. If " 4413 "periodic snapshots makes it more robust against partial data corruption. If "
4406 "a revlog becomes partly corrupted due to a hardware error or system bug, it's " 4414 "a revlog becomes partly corrupted due to a hardware error or system bug, it's "
4407 "often possible to reconstruct some or most revisions from the uncorrupted " 4415 "often possible to reconstruct some or most revisions from the uncorrupted "
4408 "sections of the revlog, both before and after the corrupted section. This " 4416 "sections of the revlog, both before and after the corrupted section. This "
4409 "would not be possible with a delta-only storage model." 4417 "would not be possible with a delta-only storage model."
4410 msgstr "" 4418 msgstr ""
4411 4419
4412 #. type: Content of: <book><chapter><sect1><title> 4420 #. type: Content of: <book><chapter><sect1><title>
4413 #: ../en/ch04-concepts.xml:266 4421 #: ../en/ch04-concepts.xml:272
4414 msgid "Revision history, branching, and merging" 4422 msgid "Revision history, branching, and merging"
4415 msgstr "修订历史,分支与合并" 4423 msgstr "修订历史,分支与合并"
4416 4424
4417 #. type: Content of: <book><chapter><sect1><para> 4425 #. type: Content of: <book><chapter><sect1><para>
4418 #: ../en/ch04-concepts.xml:268 4426 #: ../en/ch04-concepts.xml:274
4419 msgid "" 4427 msgid ""
4420 "Every entry in a Mercurial revlog knows the identity of its immediate " 4428 "Every entry in a Mercurial revlog knows the identity of its immediate "
4421 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. " 4429 "ancestor revision, usually referred to as its <emphasis>parent</emphasis>. "
4422 "In fact, a revision contains room for not one parent, but two. Mercurial " 4430 "In fact, a revision contains room for not one parent, but two. Mercurial "
4423 "uses a special hash, called the <quote>null ID</quote>, to represent the idea " 4431 "uses a special hash, called the <quote>null ID</quote>, to represent the idea "
4424 "<quote>there is no parent here</quote>. This hash is simply a string of " 4432 "<quote>there is no parent here</quote>. This hash is simply a string of "
4425 "zeroes." 4433 "zeroes."
4426 msgstr "" 4434 msgstr ""
4427 4435
4428 #. type: Content of: <book><chapter><sect1><para> 4436 #. type: Content of: <book><chapter><sect1><para>
4429 #: ../en/ch04-concepts.xml:276
4430 msgid ""
4431 "In figure <xref linkend=\"fig.concepts.revlog\"/>, you can see an example of "
4432 "the conceptual structure of a revlog. Filelogs, manifests, and changelogs "
4433 "all have this same structure; they differ only in the kind of data stored in "
4434 "each delta or snapshot."
4435 msgstr ""
4436
4437 #. type: Content of: <book><chapter><sect1><para>
4438 #: ../en/ch04-concepts.xml:282 4437 #: ../en/ch04-concepts.xml:282
4438 msgid ""
4439 "In figure <xref endterm=\"fig.concepts.revlog.caption\" linkend=\"fig."
4440 "concepts.revlog\"/>, you can see an example of the conceptual structure of a "
4441 "revlog. Filelogs, manifests, and changelogs all have this same structure; "
4442 "they differ only in the kind of data stored in each delta or snapshot."
4443 msgstr ""
4444
4445 #. type: Content of: <book><chapter><sect1><para>
4446 #: ../en/ch04-concepts.xml:289
4439 msgid "" 4447 msgid ""
4440 "The first revision in a revlog (at the bottom of the image) has the null ID " 4448 "The first revision in a revlog (at the bottom of the image) has the null ID "
4441 "in both of its parent slots. For a <quote>normal</quote> revision, its first " 4449 "in both of its parent slots. For a <quote>normal</quote> revision, its first "
4442 "parent slot contains the ID of its parent revision, and its second contains " 4450 "parent slot contains the ID of its parent revision, and its second contains "
4443 "the null ID, indicating that the revision has only one real parent. Any two " 4451 "the null ID, indicating that the revision has only one real parent. Any two "
4445 "represents a merge between branches has two normal revision IDs in its parent " 4453 "represents a merge between branches has two normal revision IDs in its parent "
4446 "slots." 4454 "slots."
4447 msgstr "" 4455 msgstr ""
4448 4456
4449 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject> 4457 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject>
4450 #: ../en/ch04-concepts.xml:292 4458 #: ../en/ch04-concepts.xml:300
4451 msgid "<imageobject><imagedata fileref=\"images/revlog.png\"/></imageobject>" 4459 msgid "<imageobject><imagedata fileref=\"images/revlog.png\"/></imageobject>"
4452 msgstr "" 4460 msgstr ""
4453 4461
4462 #. type: Content of: <book><chapter><sect1><informalfigure><mediaobject><caption><para>
4463 #: ../en/ch04-concepts.xml:302
4464 msgid "Revision in revlog"
4465 msgstr ""
4466
4454 #. type: Content of: <book><chapter><sect1><title> 4467 #. type: Content of: <book><chapter><sect1><title>
4455 #: ../en/ch04-concepts.xml:299 4468 #: ../en/ch04-concepts.xml:309
4456 msgid "The working directory" 4469 msgid "The working directory"
4457 msgstr "工作目录" 4470 msgstr "工作目录"
4458 4471
4459 #. type: Content of: <book><chapter><sect1><para> 4472 #. type: Content of: <book><chapter><sect1><para>
4460 #: ../en/ch04-concepts.xml:301 4473 #: ../en/ch04-concepts.xml:311
4461 msgid "" 4474 msgid ""
4462 "In the working directory, Mercurial stores a snapshot of the files from the " 4475 "In the working directory, Mercurial stores a snapshot of the files from the "
4463 "repository as of a particular changeset." 4476 "repository as of a particular changeset."
4464 msgstr "" 4477 msgstr ""
4465 4478
4466 #. type: Content of: <book><chapter><sect1><para> 4479 #. type: Content of: <book><chapter><sect1><para>
4467 #: ../en/ch04-concepts.xml:304 4480 #: ../en/ch04-concepts.xml:314
4468 msgid "" 4481 msgid ""
4469 "The working directory <quote>knows</quote> which changeset it contains. When " 4482 "The working directory <quote>knows</quote> which changeset it contains. When "
4470 "you update the working directory to contain a particular changeset, Mercurial " 4483 "you update the working directory to contain a particular changeset, Mercurial "
4471 "looks up the appropriate revision of the manifest to find out which files it " 4484 "looks up the appropriate revision of the manifest to find out which files it "
4472 "was tracking at the time that changeset was committed, and which revision of " 4485 "was tracking at the time that changeset was committed, and which revision of "
4473 "each file was then current. It then recreates a copy of each of those files, " 4486 "each file was then current. It then recreates a copy of each of those files, "
4474 "with the same contents it had when the changeset was committed." 4487 "with the same contents it had when the changeset was committed."
4475 msgstr "" 4488 msgstr ""
4476 4489
4477 #. type: Content of: <book><chapter><sect1><para> 4490 #. type: Content of: <book><chapter><sect1><para>
4478 #: ../en/ch04-concepts.xml:313 4491 #: ../en/ch04-concepts.xml:323
4479 msgid "" 4492 msgid ""
4480 "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the " 4493 "The <emphasis>dirstate</emphasis> contains Mercurial's knowledge of the "
4481 "working directory. This details which changeset the working directory is " 4494 "working directory. This details which changeset the working directory is "
4482 "updated to, and all of the files that Mercurial is tracking in the working " 4495 "updated to, and all of the files that Mercurial is tracking in the working "
4483 "directory." 4496 "directory."
4484 msgstr "" 4497 msgstr ""
4485 4498
4486 #. type: Content of: <book><chapter><sect1><para> 4499 #. type: Content of: <book><chapter><sect1><para>
4487 #: ../en/ch04-concepts.xml:319 4500 #: ../en/ch04-concepts.xml:329
4488 msgid "" 4501 msgid ""
4489 "Just as a revision of a revlog has room for two parents, so that it can " 4502 "Just as a revision of a revlog has room for two parents, so that it can "
4490 "represent either a normal revision (with one parent) or a merge of two " 4503 "represent either a normal revision (with one parent) or a merge of two "
4491 "earlier revisions, the dirstate has slots for two parents. When you use the " 4504 "earlier revisions, the dirstate has slots for two parents. When you use the "
4492 "<command role=\"hg-cmd\">hg update</command> command, the changeset that you " 4505 "<command role=\"hg-cmd\">hg update</command> command, the changeset that you "
4497 "cmd\">hg parents</command> command tells you what the parents of the dirstate " 4510 "cmd\">hg parents</command> command tells you what the parents of the dirstate "
4498 "are." 4511 "are."
4499 msgstr "" 4512 msgstr ""
4500 4513
4501 #. type: Content of: <book><chapter><sect1><sect2><title> 4514 #. type: Content of: <book><chapter><sect1><sect2><title>
4502 #: ../en/ch04-concepts.xml:333 4515 #: ../en/ch04-concepts.xml:343
4503 msgid "What happens when you commit" 4516 msgid "What happens when you commit"
4504 msgstr "当你提交时发生的事情" 4517 msgstr "当你提交时发生的事情"
4505 4518
4506 #. type: Content of: <book><chapter><sect1><sect2><para> 4519 #. type: Content of: <book><chapter><sect1><sect2><para>
4507 #: ../en/ch04-concepts.xml:335 4520 #: ../en/ch04-concepts.xml:345
4508 msgid "" 4521 msgid ""
4509 "The dirstate stores parent information for more than just book-keeping " 4522 "The dirstate stores parent information for more than just book-keeping "
4510 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the " 4523 "purposes. Mercurial uses the parents of the dirstate as <emphasis>the "
4511 "parents of a new changeset</emphasis> when you perform a commit." 4524 "parents of a new changeset</emphasis> when you perform a commit."
4512 msgstr "" 4525 msgstr ""
4513 4526
4514 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4527 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4515 #: ../en/ch04-concepts.xml:341 4528 #: ../en/ch04-concepts.xml:352
4516 msgid "<imageobject><imagedata fileref=\"images/wdir.png\"/></imageobject>" 4529 msgid "<imageobject><imagedata fileref=\"images/wdir.png\"/></imageobject>"
4517 msgstr "" 4530 msgstr ""
4518 4531
4519 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4532 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4520 #: ../en/ch04-concepts.xml:343 4533 #: ../en/ch04-concepts.xml:354
4521 msgid "The working directory can have two parents" 4534 msgid "The working directory can have two parents"
4522 msgstr "" 4535 msgstr ""
4523 4536
4524 #. type: Content of: <book><chapter><sect1><sect2><para> 4537 #. type: Content of: <book><chapter><sect1><sect2><para>
4525 #: ../en/ch04-concepts.xml:348 4538 #: ../en/ch04-concepts.xml:359
4526 msgid "" 4539 msgid ""
4527 "Figure <xref linkend=\"fig.concepts.wdir\"/> shows the normal state of the " 4540 "Figure <xref endterm=\"fig.concepts.wdir.caption\" linkend=\"fig.concepts.wdir"
4528 "working directory, where it has a single changeset as parent. That changeset " 4541 "\"/> shows the normal state of the working directory, where it has a single "
4529 "is the <emphasis>tip</emphasis>, the newest changeset in the repository that " 4542 "changeset as parent. That changeset is the <emphasis>tip</emphasis>, the "
4530 "has no children." 4543 "newest changeset in the repository that has no children."
4531 msgstr "" 4544 msgstr ""
4532 4545
4533 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4546 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4534 #: ../en/ch04-concepts.xml:355 4547 #: ../en/ch04-concepts.xml:368
4535 msgid "" 4548 msgid ""
4536 "<imageobject><imagedata fileref=\"images/wdir-after-commit.png\"/></" 4549 "<imageobject><imagedata fileref=\"images/wdir-after-commit.png\"/> </"
4537 "imageobject>" 4550 "imageobject>"
4538 msgstr "" 4551 msgstr ""
4539 4552
4540 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4553 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4541 #: ../en/ch04-concepts.xml:357 4554 #: ../en/ch04-concepts.xml:371
4542 msgid "The working directory gains new parents after a commit" 4555 msgid "The working directory gains new parents after a commit"
4543 msgstr "" 4556 msgstr ""
4544 4557
4545 #. type: Content of: <book><chapter><sect1><sect2><para> 4558 #. type: Content of: <book><chapter><sect1><sect2><para>
4546 #: ../en/ch04-concepts.xml:362 4559 #: ../en/ch04-concepts.xml:376
4547 msgid "" 4560 msgid ""
4548 "It's useful to think of the working directory as <quote>the changeset I'm " 4561 "It's useful to think of the working directory as <quote>the changeset I'm "
4549 "about to commit</quote>. Any files that you tell Mercurial that you've " 4562 "about to commit</quote>. Any files that you tell Mercurial that you've "
4550 "added, removed, renamed, or copied will be reflected in that changeset, as " 4563 "added, removed, renamed, or copied will be reflected in that changeset, as "
4551 "will modifications to any files that Mercurial is already tracking; the new " 4564 "will modifications to any files that Mercurial is already tracking; the new "
4552 "changeset will have the parents of the working directory as its parents." 4565 "changeset will have the parents of the working directory as its parents."
4553 msgstr "" 4566 msgstr ""
4554 4567
4555 #. type: Content of: <book><chapter><sect1><sect2><para> 4568 #. type: Content of: <book><chapter><sect1><sect2><para>
4556 #: ../en/ch04-concepts.xml:370 4569 #: ../en/ch04-concepts.xml:384
4557 msgid "" 4570 msgid ""
4558 "After a commit, Mercurial will update the parents of the working directory, " 4571 "After a commit, Mercurial will update the parents of the working directory, "
4559 "so that the first parent is the ID of the new changeset, and the second is " 4572 "so that the first parent is the ID of the new changeset, and the second is "
4560 "the null ID. This is shown in figure <xref linkend=\"fig.concepts.wdir-after-" 4573 "the null ID. This is shown in figure <xref endterm=\"fig.concepts.wdir-after-"
4561 "commit\"/>. Mercurial doesn't touch any of the files in the working " 4574 "commit.caption\" linkend=\"fig.concepts.wdir-after-commit\"/>. Mercurial "
4562 "directory when you commit; it just modifies the dirstate to note its new " 4575 "doesn't touch any of the files in the working directory when you commit; it "
4563 "parents." 4576 "just modifies the dirstate to note its new parents."
4564 msgstr "" 4577 msgstr ""
4565 4578
4566 #. type: Content of: <book><chapter><sect1><sect2><title> 4579 #. type: Content of: <book><chapter><sect1><sect2><title>
4567 #: ../en/ch04-concepts.xml:381 4580 #: ../en/ch04-concepts.xml:396
4568 msgid "Creating a new head" 4581 msgid "Creating a new head"
4569 msgstr "创建新顶点" 4582 msgstr "创建新顶点"
4570 4583
4571 #. type: Content of: <book><chapter><sect1><sect2><para> 4584 #. type: Content of: <book><chapter><sect1><sect2><para>
4572 #: ../en/ch04-concepts.xml:383 4585 #: ../en/ch04-concepts.xml:398
4573 msgid "" 4586 msgid ""
4574 "It's perfectly normal to update the working directory to a changeset other " 4587 "It's perfectly normal to update the working directory to a changeset other "
4575 "than the current tip. For example, you might want to know what your project " 4588 "than the current tip. For example, you might want to know what your project "
4576 "looked like last Tuesday, or you could be looking through changesets to see " 4589 "looked like last Tuesday, or you could be looking through changesets to see "
4577 "which one introduced a bug. In cases like this, the natural thing to do is " 4590 "which one introduced a bug. In cases like this, the natural thing to do is "
4578 "update the working directory to the changeset you're interested in, and then " 4591 "update the working directory to the changeset you're interested in, and then "
4579 "examine the files in the working directory directly to see their contents as " 4592 "examine the files in the working directory directly to see their contents as "
4580 "they were when you committed that changeset. The effect of this is shown in " 4593 "they were when you committed that changeset. The effect of this is shown in "
4581 "figure <xref linkend=\"fig.concepts.wdir-pre-branch\"/>." 4594 "figure <xref endterm=\"fig.concepts.wdir-pre-branch.caption\" linkend=\"fig."
4595 "concepts.wdir-pre-branch\"/>."
4582 msgstr "" 4596 msgstr ""
4583 4597
4584 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4598 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4585 #: ../en/ch04-concepts.xml:395 4599 #: ../en/ch04-concepts.xml:412
4586 msgid "" 4600 msgid ""
4587 "<imageobject><imagedata fileref=\"images/wdir-pre-branch.png\"/></imageobject>" 4601 "<imageobject><imagedata fileref=\"images/wdir-pre-branch.png\"/> </"
4602 "imageobject>"
4588 msgstr "" 4603 msgstr ""
4589 4604
4590 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4605 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4591 #: ../en/ch04-concepts.xml:397 4606 #: ../en/ch04-concepts.xml:415
4592 msgid "The working directory, updated to an older changeset" 4607 msgid "The working directory, updated to an older changeset"
4593 msgstr "" 4608 msgstr ""
4594 4609
4595 #. type: Content of: <book><chapter><sect1><sect2><para> 4610 #. type: Content of: <book><chapter><sect1><sect2><para>
4596 #: ../en/ch04-concepts.xml:402 4611 #: ../en/ch04-concepts.xml:420
4597 msgid "" 4612 msgid ""
4598 "Having updated the working directory to an older changeset, what happens if " 4613 "Having updated the working directory to an older changeset, what happens if "
4599 "you make some changes, and then commit? Mercurial behaves in the same way as " 4614 "you make some changes, and then commit? Mercurial behaves in the same way as "
4600 "I outlined above. The parents of the working directory become the parents of " 4615 "I outlined above. The parents of the working directory become the parents of "
4601 "the new changeset. This new changeset has no children, so it becomes the new " 4616 "the new changeset. This new changeset has no children, so it becomes the new "
4602 "tip. And the repository now contains two changesets that have no children; " 4617 "tip. And the repository now contains two changesets that have no children; "
4603 "we call these <emphasis>heads</emphasis>. You can see the structure that " 4618 "we call these <emphasis>heads</emphasis>. You can see the structure that "
4604 "this creates in figure <xref linkend=\"fig.concepts.wdir-branch\"/>." 4619 "this creates in figure <xref endterm=\"fig.concepts.wdir-branch.caption\" "
4620 "linkend=\"fig.concepts.wdir-branch\"/>."
4605 msgstr "" 4621 msgstr ""
4606 4622
4607 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4623 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4608 #: ../en/ch04-concepts.xml:414 4624 #: ../en/ch04-concepts.xml:434
4609 msgid "" 4625 msgid ""
4610 "<imageobject><imagedata fileref=\"images/wdir-branch.png\"/></imageobject>" 4626 "<imageobject><imagedata fileref=\"images/wdir-branch.png\"/> </imageobject>"
4611 msgstr "" 4627 msgstr ""
4612 4628
4613 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4629 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4614 #: ../en/ch04-concepts.xml:416 4630 #: ../en/ch04-concepts.xml:437
4615 msgid "After a commit made while synced to an older changeset" 4631 msgid "After a commit made while synced to an older changeset"
4616 msgstr "" 4632 msgstr ""
4617 4633
4618 #. type: Content of: <book><chapter><sect1><sect2><note><para> 4634 #. type: Content of: <book><chapter><sect1><sect2><note><para>
4619 #: ../en/ch04-concepts.xml:422 4635 #: ../en/ch04-concepts.xml:443
4620 msgid "" 4636 msgid ""
4621 "If you're new to Mercurial, you should keep in mind a common <quote>error</" 4637 "If you're new to Mercurial, you should keep in mind a common <quote>error</"
4622 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> " 4638 "quote>, which is to use the <command role=\"hg-cmd\">hg pull</command> "
4623 "command without any options. By default, the <command role=\"hg-cmd\">hg " 4639 "command without any options. By default, the <command role=\"hg-cmd\">hg "
4624 "pull</command> command <emphasis>does not</emphasis> update the working " 4640 "pull</command> command <emphasis>does not</emphasis> update the working "
4628 "head, because your working directory isn't synced to whatever the current tip " 4644 "head, because your working directory isn't synced to whatever the current tip "
4629 "is." 4645 "is."
4630 msgstr "" 4646 msgstr ""
4631 4647
4632 #. type: Content of: <book><chapter><sect1><sect2><note><para> 4648 #. type: Content of: <book><chapter><sect1><sect2><note><para>
4633 #: ../en/ch04-concepts.xml:434 4649 #: ../en/ch04-concepts.xml:455
4634 msgid "" 4650 msgid ""
4635 "I put the word <quote>error</quote> in quotes because all that you need to do " 4651 "I put the word <quote>error</quote> in quotes because all that you need to do "
4636 "to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, " 4652 "to rectify this situation is <command role=\"hg-cmd\">hg merge</command>, "
4637 "then <command role=\"hg-cmd\">hg commit</command>. In other words, this " 4653 "then <command role=\"hg-cmd\">hg commit</command>. In other words, this "
4638 "almost never has negative consequences; it just surprises people. I'll " 4654 "almost never has negative consequences; it just surprises people. I'll "
4639 "discuss other ways to avoid this behaviour, and why Mercurial behaves in this " 4655 "discuss other ways to avoid this behaviour, and why Mercurial behaves in this "
4640 "initially surprising way, later on." 4656 "initially surprising way, later on."
4641 msgstr "" 4657 msgstr ""
4642 4658
4643 #. type: Content of: <book><chapter><sect1><sect2><title> 4659 #. type: Content of: <book><chapter><sect1><sect2><title>
4644 #: ../en/ch04-concepts.xml:446 4660 #: ../en/ch04-concepts.xml:467
4645 msgid "Merging heads" 4661 msgid "Merging heads"
4646 msgstr "合并顶点" 4662 msgstr "合并顶点"
4647 4663
4648 #. type: Content of: <book><chapter><sect1><sect2><para> 4664 #. type: Content of: <book><chapter><sect1><sect2><para>
4649 #: ../en/ch04-concepts.xml:448 4665 #: ../en/ch04-concepts.xml:469
4650 msgid "" 4666 msgid ""
4651 "When you run the <command role=\"hg-cmd\">hg merge</command> command, " 4667 "When you run the <command role=\"hg-cmd\">hg merge</command> command, "
4652 "Mercurial leaves the first parent of the working directory unchanged, and " 4668 "Mercurial leaves the first parent of the working directory unchanged, and "
4653 "sets the second parent to the changeset you're merging with, as shown in " 4669 "sets the second parent to the changeset you're merging with, as shown in "
4654 "figure <xref linkend=\"fig.concepts.wdir-merge\"/>." 4670 "figure <xref endterm=\"fig.concepts.wdir-merge.caption\" linkend=\"fig."
4671 "concepts.wdir-merge\"/>."
4655 msgstr "" 4672 msgstr ""
4656 4673
4657 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 4674 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
4658 #: ../en/ch04-concepts.xml:455 4675 #: ../en/ch04-concepts.xml:478
4659 msgid "" 4676 msgid ""
4660 "<imageobject><imagedata fileref=\"images/wdir-merge.png\"/></imageobject>" 4677 "<imageobject><imagedata fileref=\"images/wdir-merge.png\"/> </imageobject>"
4661 msgstr "" 4678 msgstr ""
4662 4679
4663 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 4680 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
4664 #: ../en/ch04-concepts.xml:457 4681 #: ../en/ch04-concepts.xml:481
4665 msgid "Merging two heads" 4682 msgid "Merging two heads"
4666 msgstr "" 4683 msgstr ""
4667 4684
4668 #. type: Content of: <book><chapter><sect1><sect2><para> 4685 #. type: Content of: <book><chapter><sect1><sect2><para>
4669 #: ../en/ch04-concepts.xml:461 4686 #: ../en/ch04-concepts.xml:486
4670 msgid "" 4687 msgid ""
4671 "Mercurial also has to modify the working directory, to merge the files " 4688 "Mercurial also has to modify the working directory, to merge the files "
4672 "managed in the two changesets. Simplified a little, the merging process goes " 4689 "managed in the two changesets. Simplified a little, the merging process goes "
4673 "like this, for every file in the manifests of both changesets." 4690 "like this, for every file in the manifests of both changesets."
4674 msgstr "" 4691 msgstr ""
4675 4692
4676 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4693 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4677 #: ../en/ch04-concepts.xml:466 4694 #: ../en/ch04-concepts.xml:491
4678 msgid "If neither changeset has modified a file, do nothing with that file." 4695 msgid "If neither changeset has modified a file, do nothing with that file."
4679 msgstr "" 4696 msgstr ""
4680 4697
4681 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4698 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4682 #: ../en/ch04-concepts.xml:469 4699 #: ../en/ch04-concepts.xml:494
4683 msgid "" 4700 msgid ""
4684 "If one changeset has modified a file, and the other hasn't, create the " 4701 "If one changeset has modified a file, and the other hasn't, create the "
4685 "modified copy of the file in the working directory." 4702 "modified copy of the file in the working directory."
4686 msgstr "" 4703 msgstr ""
4687 4704
4688 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4705 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4689 #: ../en/ch04-concepts.xml:473 4706 #: ../en/ch04-concepts.xml:498
4690 msgid "" 4707 msgid ""
4691 "If one changeset has removed a file, and the other hasn't (or has also " 4708 "If one changeset has removed a file, and the other hasn't (or has also "
4692 "deleted it), delete the file from the working directory." 4709 "deleted it), delete the file from the working directory."
4693 msgstr "" 4710 msgstr ""
4694 4711
4695 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4712 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4696 #: ../en/ch04-concepts.xml:477 4713 #: ../en/ch04-concepts.xml:502
4697 msgid "" 4714 msgid ""
4698 "If one changeset has removed a file, but the other has modified the file, ask " 4715 "If one changeset has removed a file, but the other has modified the file, ask "
4699 "the user what to do: keep the modified file, or remove it?" 4716 "the user what to do: keep the modified file, or remove it?"
4700 msgstr "" 4717 msgstr ""
4701 4718
4702 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4719 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4703 #: ../en/ch04-concepts.xml:481 4720 #: ../en/ch04-concepts.xml:506
4704 msgid "" 4721 msgid ""
4705 "If both changesets have modified a file, invoke an external merge program to " 4722 "If both changesets have modified a file, invoke an external merge program to "
4706 "choose the new contents for the merged file. This may require input from the " 4723 "choose the new contents for the merged file. This may require input from the "
4707 "user." 4724 "user."
4708 msgstr "" 4725 msgstr ""
4709 4726
4710 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 4727 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
4711 #: ../en/ch04-concepts.xml:486 4728 #: ../en/ch04-concepts.xml:511
4712 msgid "" 4729 msgid ""
4713 "If one changeset has modified a file, and the other has renamed or copied the " 4730 "If one changeset has modified a file, and the other has renamed or copied the "
4714 "file, make sure that the changes follow the new name of the file." 4731 "file, make sure that the changes follow the new name of the file."
4715 msgstr "" 4732 msgstr ""
4716 4733
4717 #. type: Content of: <book><chapter><sect1><sect2><para> 4734 #. type: Content of: <book><chapter><sect1><sect2><para>
4718 #: ../en/ch04-concepts.xml:490 4735 #: ../en/ch04-concepts.xml:515
4719 msgid "" 4736 msgid ""
4720 "There are more details&emdash;merging has plenty of corner cases&emdash;but " 4737 "There are more details&emdash;merging has plenty of corner cases&emdash;but "
4721 "these are the most common choices that are involved in a merge. As you can " 4738 "these are the most common choices that are involved in a merge. As you can "
4722 "see, most cases are completely automatic, and indeed most merges finish " 4739 "see, most cases are completely automatic, and indeed most merges finish "
4723 "automatically, without requiring your input to resolve any conflicts." 4740 "automatically, without requiring your input to resolve any conflicts."
4724 msgstr "" 4741 msgstr ""
4725 4742
4726 #. type: Content of: <book><chapter><sect1><sect2><para> 4743 #. type: Content of: <book><chapter><sect1><sect2><para>
4727 #: ../en/ch04-concepts.xml:497 4744 #: ../en/ch04-concepts.xml:522
4728 msgid "" 4745 msgid ""
4729 "When you're thinking about what happens when you commit after a merge, once " 4746 "When you're thinking about what happens when you commit after a merge, once "
4730 "again the working directory is <quote>the changeset I'm about to commit</" 4747 "again the working directory is <quote>the changeset I'm about to commit</"
4731 "quote>. After the <command role=\"hg-cmd\">hg merge</command> command " 4748 "quote>. After the <command role=\"hg-cmd\">hg merge</command> command "
4732 "completes, the working directory has two parents; these will become the " 4749 "completes, the working directory has two parents; these will become the "
4733 "parents of the new changeset." 4750 "parents of the new changeset."
4734 msgstr "" 4751 msgstr ""
4735 4752
4736 #. type: Content of: <book><chapter><sect1><sect2><para> 4753 #. type: Content of: <book><chapter><sect1><sect2><para>
4737 #: ../en/ch04-concepts.xml:504 4754 #: ../en/ch04-concepts.xml:529
4738 msgid "" 4755 msgid ""
4739 "Mercurial lets you perform multiple merges, but you must commit the results " 4756 "Mercurial lets you perform multiple merges, but you must commit the results "
4740 "of each individual merge as you go. This is necessary because Mercurial only " 4757 "of each individual merge as you go. This is necessary because Mercurial only "
4741 "tracks two parents for both revisions and the working directory. While it " 4758 "tracks two parents for both revisions and the working directory. While it "
4742 "would be technically possible to merge multiple changesets at once, the " 4759 "would be technically possible to merge multiple changesets at once, the "
4743 "prospect of user confusion and making a terrible mess of a merge immediately " 4760 "prospect of user confusion and making a terrible mess of a merge immediately "
4744 "becomes overwhelming." 4761 "becomes overwhelming."
4745 msgstr "" 4762 msgstr ""
4746 4763
4747 #. type: Content of: <book><chapter><sect1><title> 4764 #. type: Content of: <book><chapter><sect1><title>
4748 #: ../en/ch04-concepts.xml:515 4765 #: ../en/ch04-concepts.xml:540
4749 msgid "Other interesting design features" 4766 msgid "Other interesting design features"
4750 msgstr "其它有趣的设计特性" 4767 msgstr "其它有趣的设计特性"
4751 4768
4752 #. type: Content of: <book><chapter><sect1><para> 4769 #. type: Content of: <book><chapter><sect1><para>
4753 #: ../en/ch04-concepts.xml:517 4770 #: ../en/ch04-concepts.xml:542
4754 msgid "" 4771 msgid ""
4755 "In the sections above, I've tried to highlight some of the most important " 4772 "In the sections above, I've tried to highlight some of the most important "
4756 "aspects of Mercurial's design, to illustrate that it pays careful attention " 4773 "aspects of Mercurial's design, to illustrate that it pays careful attention "
4757 "to reliability and performance. However, the attention to detail doesn't " 4774 "to reliability and performance. However, the attention to detail doesn't "
4758 "stop there. There are a number of other aspects of Mercurial's construction " 4775 "stop there. There are a number of other aspects of Mercurial's construction "
4761 "you can gain a better idea of the amount of thinking that goes into a well-" 4778 "you can gain a better idea of the amount of thinking that goes into a well-"
4762 "designed system." 4779 "designed system."
4763 msgstr "" 4780 msgstr ""
4764 4781
4765 #. type: Content of: <book><chapter><sect1><sect2><title> 4782 #. type: Content of: <book><chapter><sect1><sect2><title>
4766 #: ../en/ch04-concepts.xml:528 4783 #: ../en/ch04-concepts.xml:553
4767 msgid "Clever compression" 4784 msgid "Clever compression"
4768 msgstr "智能压缩" 4785 msgstr "智能压缩"
4769 4786
4770 #. type: Content of: <book><chapter><sect1><sect2><para> 4787 #. type: Content of: <book><chapter><sect1><sect2><para>
4771 #: ../en/ch04-concepts.xml:530 4788 #: ../en/ch04-concepts.xml:555
4772 msgid "" 4789 msgid ""
4773 "When appropriate, Mercurial will store both snapshots and deltas in " 4790 "When appropriate, Mercurial will store both snapshots and deltas in "
4774 "compressed form. It does this by always <emphasis>trying to</emphasis> " 4791 "compressed form. It does this by always <emphasis>trying to</emphasis> "
4775 "compress a snapshot or delta, but only storing the compressed version if it's " 4792 "compress a snapshot or delta, but only storing the compressed version if it's "
4776 "smaller than the uncompressed version." 4793 "smaller than the uncompressed version."
4777 msgstr "" 4794 msgstr ""
4778 4795
4779 #. type: Content of: <book><chapter><sect1><sect2><para> 4796 #. type: Content of: <book><chapter><sect1><sect2><para>
4780 #: ../en/ch04-concepts.xml:536 4797 #: ../en/ch04-concepts.xml:561
4781 msgid "" 4798 msgid ""
4782 "This means that Mercurial does <quote>the right thing</quote> when storing a " 4799 "This means that Mercurial does <quote>the right thing</quote> when storing a "
4783 "file whose native form is compressed, such as a <literal>zip</literal> " 4800 "file whose native form is compressed, such as a <literal>zip</literal> "
4784 "archive or a JPEG image. When these types of files are compressed a second " 4801 "archive or a JPEG image. When these types of files are compressed a second "
4785 "time, the resulting file is usually bigger than the once-compressed form, and " 4802 "time, the resulting file is usually bigger than the once-compressed form, and "
4786 "so Mercurial will store the plain <literal>zip</literal> or JPEG." 4803 "so Mercurial will store the plain <literal>zip</literal> or JPEG."
4787 msgstr "" 4804 msgstr ""
4788 4805
4789 #. type: Content of: <book><chapter><sect1><sect2><para> 4806 #. type: Content of: <book><chapter><sect1><sect2><para>
4790 #: ../en/ch04-concepts.xml:544 4807 #: ../en/ch04-concepts.xml:569
4791 msgid "" 4808 msgid ""
4792 "Deltas between revisions of a compressed file are usually larger than " 4809 "Deltas between revisions of a compressed file are usually larger than "
4793 "snapshots of the file, and Mercurial again does <quote>the right thing</" 4810 "snapshots of the file, and Mercurial again does <quote>the right thing</"
4794 "quote> in these cases. It finds that such a delta exceeds the threshold at " 4811 "quote> in these cases. It finds that such a delta exceeds the threshold at "
4795 "which it should store a complete snapshot of the file, so it stores the " 4812 "which it should store a complete snapshot of the file, so it stores the "
4796 "snapshot, again saving space compared to a naive delta-only approach." 4813 "snapshot, again saving space compared to a naive delta-only approach."
4797 msgstr "" 4814 msgstr ""
4798 4815
4799 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 4816 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
4800 #: ../en/ch04-concepts.xml:553 4817 #: ../en/ch04-concepts.xml:578
4801 msgid "Network recompression" 4818 msgid "Network recompression"
4802 msgstr "网络重新压缩" 4819 msgstr "网络重新压缩"
4803 4820
4804 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4821 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4805 #: ../en/ch04-concepts.xml:555 4822 #: ../en/ch04-concepts.xml:580
4806 msgid "" 4823 msgid ""
4807 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> " 4824 "When storing revisions on disk, Mercurial uses the <quote>deflate</quote> "
4808 "compression algorithm (the same one used by the popular <literal>zip</" 4825 "compression algorithm (the same one used by the popular <literal>zip</"
4809 "literal> archive format), which balances good speed with a respectable " 4826 "literal> archive format), which balances good speed with a respectable "
4810 "compression ratio. However, when transmitting revision data over a network " 4827 "compression ratio. However, when transmitting revision data over a network "
4811 "connection, Mercurial uncompresses the compressed revision data." 4828 "connection, Mercurial uncompresses the compressed revision data."
4812 msgstr "" 4829 msgstr ""
4813 4830
4814 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4831 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4815 #: ../en/ch04-concepts.xml:563 4832 #: ../en/ch04-concepts.xml:588
4816 msgid "" 4833 msgid ""
4817 "If the connection is over HTTP, Mercurial recompresses the entire stream of " 4834 "If the connection is over HTTP, Mercurial recompresses the entire stream of "
4818 "data using a compression algorithm that gives a better compression ratio (the " 4835 "data using a compression algorithm that gives a better compression ratio (the "
4819 "Burrows-Wheeler algorithm from the widely used <literal>bzip2</literal> " 4836 "Burrows-Wheeler algorithm from the widely used <literal>bzip2</literal> "
4820 "compression package). This combination of algorithm and compression of the " 4837 "compression package). This combination of algorithm and compression of the "
4822 "number of bytes to be transferred, yielding better network performance over " 4839 "number of bytes to be transferred, yielding better network performance over "
4823 "almost all kinds of network." 4840 "almost all kinds of network."
4824 msgstr "" 4841 msgstr ""
4825 4842
4826 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4843 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4827 #: ../en/ch04-concepts.xml:573 4844 #: ../en/ch04-concepts.xml:598
4828 msgid "" 4845 msgid ""
4829 "(If the connection is over <command>ssh</command>, Mercurial " 4846 "(If the connection is over <command>ssh</command>, Mercurial "
4830 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</" 4847 "<emphasis>doesn't</emphasis> recompress the stream, because <command>ssh</"
4831 "command> can already do this itself.)" 4848 "command> can already do this itself.)"
4832 msgstr "" 4849 msgstr ""
4833 4850
4834 #. type: Content of: <book><chapter><sect1><sect2><title> 4851 #. type: Content of: <book><chapter><sect1><sect2><title>
4835 #: ../en/ch04-concepts.xml:581 4852 #: ../en/ch04-concepts.xml:606
4836 msgid "Read/write ordering and atomicity" 4853 msgid "Read/write ordering and atomicity"
4837 msgstr "读写顺序与原子性" 4854 msgstr "读写顺序与原子性"
4838 4855
4839 #. type: Content of: <book><chapter><sect1><sect2><para> 4856 #. type: Content of: <book><chapter><sect1><sect2><para>
4840 #: ../en/ch04-concepts.xml:583 4857 #: ../en/ch04-concepts.xml:608
4841 msgid "" 4858 msgid ""
4842 "Appending to files isn't the whole story when it comes to guaranteeing that a " 4859 "Appending to files isn't the whole story when it comes to guaranteeing that a "
4843 "reader won't see a partial write. If you recall figure <xref linkend=\"fig." 4860 "reader won't see a partial write. If you recall figure <xref endterm=\"fig."
4844 "concepts.metadata\"/>, revisions in the changelog point to revisions in the " 4861 "concepts.metadata.caption\" linkend=\"fig.concepts.metadata\"/>, revisions in "
4845 "manifest, and revisions in the manifest point to revisions in filelogs. This " 4862 "the changelog point to revisions in the manifest, and revisions in the "
4846 "hierarchy is deliberate." 4863 "manifest point to revisions in filelogs. This hierarchy is deliberate."
4847 msgstr "" 4864 msgstr ""
4848 4865
4849 #. type: Content of: <book><chapter><sect1><sect2><para> 4866 #. type: Content of: <book><chapter><sect1><sect2><para>
4850 #: ../en/ch04-concepts.xml:591 4867 #: ../en/ch04-concepts.xml:616
4851 msgid "" 4868 msgid ""
4852 "A writer starts a transaction by writing filelog and manifest data, and " 4869 "A writer starts a transaction by writing filelog and manifest data, and "
4853 "doesn't write any changelog data until those are finished. A reader starts " 4870 "doesn't write any changelog data until those are finished. A reader starts "
4854 "by reading changelog data, then manifest data, followed by filelog data." 4871 "by reading changelog data, then manifest data, followed by filelog data."
4855 msgstr "" 4872 msgstr ""
4856 4873
4857 #. type: Content of: <book><chapter><sect1><sect2><para> 4874 #. type: Content of: <book><chapter><sect1><sect2><para>
4858 #: ../en/ch04-concepts.xml:596 4875 #: ../en/ch04-concepts.xml:621
4859 msgid "" 4876 msgid ""
4860 "Since the writer has always finished writing filelog and manifest data before " 4877 "Since the writer has always finished writing filelog and manifest data before "
4861 "it writes to the changelog, a reader will never read a pointer to a partially " 4878 "it writes to the changelog, a reader will never read a pointer to a partially "
4862 "written manifest revision from the changelog, and it will never read a " 4879 "written manifest revision from the changelog, and it will never read a "
4863 "pointer to a partially written filelog revision from the manifest." 4880 "pointer to a partially written filelog revision from the manifest."
4864 msgstr "" 4881 msgstr ""
4865 4882
4866 #. type: Content of: <book><chapter><sect1><sect2><title> 4883 #. type: Content of: <book><chapter><sect1><sect2><title>
4867 #: ../en/ch04-concepts.xml:604 4884 #: ../en/ch04-concepts.xml:629
4868 msgid "Concurrent access" 4885 msgid "Concurrent access"
4869 msgstr "并发访问" 4886 msgstr "并发访问"
4870 4887
4871 #. type: Content of: <book><chapter><sect1><sect2><para> 4888 #. type: Content of: <book><chapter><sect1><sect2><para>
4872 #: ../en/ch04-concepts.xml:606 4889 #: ../en/ch04-concepts.xml:631
4873 msgid "" 4890 msgid ""
4874 "The read/write ordering and atomicity guarantees mean that Mercurial never " 4891 "The read/write ordering and atomicity guarantees mean that Mercurial never "
4875 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even " 4892 "needs to <emphasis>lock</emphasis> a repository when it's reading data, even "
4876 "if the repository is being written to while the read is occurring. This has a " 4893 "if the repository is being written to while the read is occurring. This has a "
4877 "big effect on scalability; you can have an arbitrary number of Mercurial " 4894 "big effect on scalability; you can have an arbitrary number of Mercurial "
4878 "processes safely reading data from a repository safely all at once, no matter " 4895 "processes safely reading data from a repository safely all at once, no matter "
4879 "whether it's being written to or not." 4896 "whether it's being written to or not."
4880 msgstr "" 4897 msgstr ""
4881 4898
4882 #. type: Content of: <book><chapter><sect1><sect2><para> 4899 #. type: Content of: <book><chapter><sect1><sect2><para>
4883 #: ../en/ch04-concepts.xml:615 4900 #: ../en/ch04-concepts.xml:640
4884 msgid "" 4901 msgid ""
4885 "The lockless nature of reading means that if you're sharing a repository on a " 4902 "The lockless nature of reading means that if you're sharing a repository on a "
4886 "multi-user system, you don't need to grant other local users permission to " 4903 "multi-user system, you don't need to grant other local users permission to "
4887 "<emphasis>write</emphasis> to your repository in order for them to be able to " 4904 "<emphasis>write</emphasis> to your repository in order for them to be able to "
4888 "clone it or pull changes from it; they only need <emphasis>read</emphasis> " 4905 "clone it or pull changes from it; they only need <emphasis>read</emphasis> "
4892 "permission on at least one directory, which of course makes for all kinds of " 4909 "permission on at least one directory, which of course makes for all kinds of "
4893 "nasty and annoying security and administrative problems.)" 4910 "nasty and annoying security and administrative problems.)"
4894 msgstr "" 4911 msgstr ""
4895 4912
4896 #. type: Content of: <book><chapter><sect1><sect2><para> 4913 #. type: Content of: <book><chapter><sect1><sect2><para>
4897 #: ../en/ch04-concepts.xml:628 4914 #: ../en/ch04-concepts.xml:653
4898 msgid "" 4915 msgid ""
4899 "Mercurial uses locks to ensure that only one process can write to a " 4916 "Mercurial uses locks to ensure that only one process can write to a "
4900 "repository at a time (the locking mechanism is safe even over filesystems " 4917 "repository at a time (the locking mechanism is safe even over filesystems "
4901 "that are notoriously hostile to locking, such as NFS). If a repository is " 4918 "that are notoriously hostile to locking, such as NFS). If a repository is "
4902 "locked, a writer will wait for a while to retry if the repository becomes " 4919 "locked, a writer will wait for a while to retry if the repository becomes "
4906 "unnoticed, for example. (Yes, the timeout is configurable, from zero to " 4923 "unnoticed, for example. (Yes, the timeout is configurable, from zero to "
4907 "infinity.)" 4924 "infinity.)"
4908 msgstr "" 4925 msgstr ""
4909 4926
4910 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 4927 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
4911 #: ../en/ch04-concepts.xml:640 4928 #: ../en/ch04-concepts.xml:665
4912 msgid "Safe dirstate access" 4929 msgid "Safe dirstate access"
4913 msgstr "安全的目录状态访问" 4930 msgstr "安全的目录状态访问"
4914 4931
4915 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 4932 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
4916 #: ../en/ch04-concepts.xml:642 4933 #: ../en/ch04-concepts.xml:667
4917 msgid "" 4934 msgid ""
4918 "As with revision data, Mercurial doesn't take a lock to read the dirstate " 4935 "As with revision data, Mercurial doesn't take a lock to read the dirstate "
4919 "file; it does acquire a lock to write it. To avoid the possibility of " 4936 "file; it does acquire a lock to write it. To avoid the possibility of "
4920 "reading a partially written copy of the dirstate file, Mercurial writes to a " 4937 "reading a partially written copy of the dirstate file, Mercurial writes to a "
4921 "file with a unique name in the same directory as the dirstate file, then " 4938 "file with a unique name in the same directory as the dirstate file, then "
4923 "file named <filename>dirstate</filename> is thus guaranteed to be complete, " 4940 "file named <filename>dirstate</filename> is thus guaranteed to be complete, "
4924 "not partially written." 4941 "not partially written."
4925 msgstr "" 4942 msgstr ""
4926 4943
4927 #. type: Content of: <book><chapter><sect1><sect2><title> 4944 #. type: Content of: <book><chapter><sect1><sect2><title>
4928 #: ../en/ch04-concepts.xml:655 4945 #: ../en/ch04-concepts.xml:680
4929 msgid "Avoiding seeks" 4946 msgid "Avoiding seeks"
4930 msgstr "避免查找" 4947 msgstr "避免查找"
4931 4948
4932 #. type: Content of: <book><chapter><sect1><sect2><para> 4949 #. type: Content of: <book><chapter><sect1><sect2><para>
4933 #: ../en/ch04-concepts.xml:657 4950 #: ../en/ch04-concepts.xml:682
4934 msgid "" 4951 msgid ""
4935 "Critical to Mercurial's performance is the avoidance of seeks of the disk " 4952 "Critical to Mercurial's performance is the avoidance of seeks of the disk "
4936 "head, since any seek is far more expensive than even a comparatively large " 4953 "head, since any seek is far more expensive than even a comparatively large "
4937 "read operation." 4954 "read operation."
4938 msgstr "" 4955 msgstr ""
4939 4956
4940 #. type: Content of: <book><chapter><sect1><sect2><para> 4957 #. type: Content of: <book><chapter><sect1><sect2><para>
4941 #: ../en/ch04-concepts.xml:661 4958 #: ../en/ch04-concepts.xml:686
4942 msgid "" 4959 msgid ""
4943 "This is why, for example, the dirstate is stored in a single file. If there " 4960 "This is why, for example, the dirstate is stored in a single file. If there "
4944 "were a dirstate file per directory that Mercurial tracked, the disk would " 4961 "were a dirstate file per directory that Mercurial tracked, the disk would "
4945 "seek once per directory. Instead, Mercurial reads the entire single dirstate " 4962 "seek once per directory. Instead, Mercurial reads the entire single dirstate "
4946 "file in one step." 4963 "file in one step."
4947 msgstr "" 4964 msgstr ""
4948 4965
4949 #. type: Content of: <book><chapter><sect1><sect2><para> 4966 #. type: Content of: <book><chapter><sect1><sect2><para>
4950 #: ../en/ch04-concepts.xml:667 4967 #: ../en/ch04-concepts.xml:692
4951 msgid "" 4968 msgid ""
4952 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a " 4969 "Mercurial also uses a <quote>copy on write</quote> scheme when cloning a "
4953 "repository on local storage. Instead of copying every revlog file from the " 4970 "repository on local storage. Instead of copying every revlog file from the "
4954 "old repository into the new repository, it makes a <quote>hard link</quote>, " 4971 "old repository into the new repository, it makes a <quote>hard link</quote>, "
4955 "which is a shorthand way to say <quote>these two names point to the same " 4972 "which is a shorthand way to say <quote>these two names point to the same "
4958 "one. If it is, more than one repository is using the file, so Mercurial " 4975 "one. If it is, more than one repository is using the file, so Mercurial "
4959 "makes a new copy of the file that is private to this repository." 4976 "makes a new copy of the file that is private to this repository."
4960 msgstr "" 4977 msgstr ""
4961 4978
4962 #. type: Content of: <book><chapter><sect1><sect2><para> 4979 #. type: Content of: <book><chapter><sect1><sect2><para>
4963 #: ../en/ch04-concepts.xml:678 4980 #: ../en/ch04-concepts.xml:703
4964 msgid "" 4981 msgid ""
4965 "A few revision control developers have pointed out that this idea of making a " 4982 "A few revision control developers have pointed out that this idea of making a "
4966 "complete private copy of a file is not very efficient in its use of storage. " 4983 "complete private copy of a file is not very efficient in its use of storage. "
4967 "While this is true, storage is cheap, and this method gives the highest " 4984 "While this is true, storage is cheap, and this method gives the highest "
4968 "performance while deferring most book-keeping to the operating system. An " 4985 "performance while deferring most book-keeping to the operating system. An "
4970 "complexity of the software, each of which is much more important to the " 4987 "complexity of the software, each of which is much more important to the "
4971 "<quote>feel</quote> of day-to-day use." 4988 "<quote>feel</quote> of day-to-day use."
4972 msgstr "" 4989 msgstr ""
4973 4990
4974 #. type: Content of: <book><chapter><sect1><sect2><title> 4991 #. type: Content of: <book><chapter><sect1><sect2><title>
4975 #: ../en/ch04-concepts.xml:690 4992 #: ../en/ch04-concepts.xml:715
4976 msgid "Other contents of the dirstate" 4993 msgid "Other contents of the dirstate"
4977 msgstr "目录状态的其它内容" 4994 msgstr "目录状态的其它内容"
4978 4995
4979 #. type: Content of: <book><chapter><sect1><sect2><para> 4996 #. type: Content of: <book><chapter><sect1><sect2><para>
4980 #: ../en/ch04-concepts.xml:692 4997 #: ../en/ch04-concepts.xml:717
4981 msgid "" 4998 msgid ""
4982 "Because Mercurial doesn't force you to tell it when you're modifying a file, " 4999 "Because Mercurial doesn't force you to tell it when you're modifying a file, "
4983 "it uses the dirstate to store some extra information so it can determine " 5000 "it uses the dirstate to store some extra information so it can determine "
4984 "efficiently whether you have modified a file. For each file in the working " 5001 "efficiently whether you have modified a file. For each file in the working "
4985 "directory, it stores the time that it last modified the file itself, and the " 5002 "directory, it stores the time that it last modified the file itself, and the "
4986 "size of the file at that time." 5003 "size of the file at that time."
4987 msgstr "" 5004 msgstr ""
4988 5005
4989 #. type: Content of: <book><chapter><sect1><sect2><para> 5006 #. type: Content of: <book><chapter><sect1><sect2><para>
4990 #: ../en/ch04-concepts.xml:699 5007 #: ../en/ch04-concepts.xml:724
4991 msgid "" 5008 msgid ""
4992 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role=" 5009 "When you explicitly <command role=\"hg-cmd\">hg add</command>, <command role="
4993 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> " 5010 "\"hg-cmd\">hg remove</command>, <command role=\"hg-cmd\">hg rename</command> "
4994 "or <command role=\"hg-cmd\">hg copy</command> files, Mercurial updates the " 5011 "or <command role=\"hg-cmd\">hg copy</command> files, Mercurial updates the "
4995 "dirstate so that it knows what to do with those files when you commit." 5012 "dirstate so that it knows what to do with those files when you commit."
4996 msgstr "" 5013 msgstr ""
4997 5014
4998 #. type: Content of: <book><chapter><sect1><sect2><para> 5015 #. type: Content of: <book><chapter><sect1><sect2><para>
4999 #: ../en/ch04-concepts.xml:706 5016 #: ../en/ch04-concepts.xml:731
5000 msgid "" 5017 msgid ""
5001 "When Mercurial is checking the states of files in the working directory, it " 5018 "When Mercurial is checking the states of files in the working directory, it "
5002 "first checks a file's modification time. If that has not changed, the file " 5019 "first checks a file's modification time. If that has not changed, the file "
5003 "must not have been modified. If the file's size has changed, the file must " 5020 "must not have been modified. If the file's size has changed, the file must "
5004 "have been modified. If the modification time has changed, but the size has " 5021 "have been modified. If the modification time has changed, but the size has "
6033 "but it will also contain all of the bugfixes from the stable branch. The " 6050 "but it will also contain all of the bugfixes from the stable branch. The "
6034 "stable branch remains unaffected by these changes." 6051 "stable branch remains unaffected by these changes."
6035 msgstr "" 6052 msgstr ""
6036 6053
6037 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 6054 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
6038 #: ../en/ch06-collab.xml:264 ../en/ch06-collab.xml:276 6055 #: ../en/ch06-collab.xml:264 ../en/ch06-collab.xml:278
6039 msgid "Feature branches" 6056 msgid "Feature branches"
6040 msgstr "特性分支" 6057 msgstr "特性分支"
6041 6058
6042 #. type: Content of: <book><chapter><sect1><sect2><para> 6059 #. type: Content of: <book><chapter><sect1><sect2><para>
6043 #: ../en/ch06-collab.xml:266 6060 #: ../en/ch06-collab.xml:266
6048 "working on an individual branch are typically quite isolated from " 6065 "working on an individual branch are typically quite isolated from "
6049 "developments on other branches." 6066 "developments on other branches."
6050 msgstr "" 6067 msgstr ""
6051 6068
6052 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 6069 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
6053 #: ../en/ch06-collab.xml:274 6070 #: ../en/ch06-collab.xml:275
6054 msgid "" 6071 msgid ""
6055 "<imageobject><imagedata fileref=\"images/feature-branches.png\"/></" 6072 "<imageobject><imagedata fileref=\"images/feature-branches.png\"/> </"
6056 "imageobject>" 6073 "imageobject>"
6057 msgstr "" 6074 msgstr ""
6058 6075
6059 #. type: Content of: <book><chapter><sect1><sect2><para> 6076 #. type: Content of: <book><chapter><sect1><sect2><para>
6060 #: ../en/ch06-collab.xml:280 6077 #: ../en/ch06-collab.xml:283
6061 msgid "" 6078 msgid ""
6062 "When a particular feature is deemed to be in suitable shape, someone on that " 6079 "When a particular feature is deemed to be in suitable shape, someone on that "
6063 "feature team pulls and merges from the master branch into the feature branch, " 6080 "feature team pulls and merges from the master branch into the feature branch, "
6064 "then pushes back up to the master branch." 6081 "then pushes back up to the master branch."
6065 msgstr "" 6082 msgstr ""
6066 6083
6067 #. type: Content of: <book><chapter><sect1><sect2><title> 6084 #. type: Content of: <book><chapter><sect1><sect2><title>
6068 #: ../en/ch06-collab.xml:287 6085 #: ../en/ch06-collab.xml:290
6069 msgid "The release train" 6086 msgid "The release train"
6070 msgstr "发布列车" 6087 msgstr "发布列车"
6071 6088
6072 #. type: Content of: <book><chapter><sect1><sect2><para> 6089 #. type: Content of: <book><chapter><sect1><sect2><para>
6073 #: ../en/ch06-collab.xml:289 6090 #: ../en/ch06-collab.xml:292
6074 msgid "" 6091 msgid ""
6075 "Some projects are organised on a <quote>train</quote> basis: a release is " 6092 "Some projects are organised on a <quote>train</quote> basis: a release is "
6076 "scheduled to happen every few months, and whatever features are ready when " 6093 "scheduled to happen every few months, and whatever features are ready when "
6077 "the <quote>train</quote> is ready to leave are allowed in." 6094 "the <quote>train</quote> is ready to leave are allowed in."
6078 msgstr "" 6095 msgstr ""
6079 6096
6080 #. type: Content of: <book><chapter><sect1><sect2><para> 6097 #. type: Content of: <book><chapter><sect1><sect2><para>
6081 #: ../en/ch06-collab.xml:294 6098 #: ../en/ch06-collab.xml:297
6082 msgid "" 6099 msgid ""
6083 "This model resembles working with feature branches. The difference is that " 6100 "This model resembles working with feature branches. The difference is that "
6084 "when a feature branch misses a train, someone on the feature team pulls and " 6101 "when a feature branch misses a train, someone on the feature team pulls and "
6085 "merges the changes that went out on that train release into the feature " 6102 "merges the changes that went out on that train release into the feature "
6086 "branch, and the team continues its work on top of that release so that their " 6103 "branch, and the team continues its work on top of that release so that their "
6087 "feature can make the next release." 6104 "feature can make the next release."
6088 msgstr "" 6105 msgstr ""
6089 6106
6090 #. type: Content of: <book><chapter><sect1><sect2><title> 6107 #. type: Content of: <book><chapter><sect1><sect2><title>
6091 #: ../en/ch06-collab.xml:303 6108 #: ../en/ch06-collab.xml:306
6092 msgid "The Linux kernel model" 6109 msgid "The Linux kernel model"
6093 msgstr "Linux 内核模型" 6110 msgstr "Linux 内核模型"
6094 6111
6095 #. type: Content of: <book><chapter><sect1><sect2><para> 6112 #. type: Content of: <book><chapter><sect1><sect2><para>
6096 #: ../en/ch06-collab.xml:305 6113 #: ../en/ch06-collab.xml:308
6097 msgid "" 6114 msgid ""
6098 "The development of the Linux kernel has a shallow hierarchical structure, " 6115 "The development of the Linux kernel has a shallow hierarchical structure, "
6099 "surrounded by a cloud of apparent chaos. Because most Linux developers use " 6116 "surrounded by a cloud of apparent chaos. Because most Linux developers use "
6100 "<command>git</command>, a distributed revision control tool with capabilities " 6117 "<command>git</command>, a distributed revision control tool with capabilities "
6101 "similar to Mercurial, it's useful to describe the way work flows in that " 6118 "similar to Mercurial, it's useful to describe the way work flows in that "
6102 "environment; if you like the ideas, the approach translates well across tools." 6119 "environment; if you like the ideas, the approach translates well across tools."
6103 msgstr "" 6120 msgstr ""
6104 6121
6105 #. type: Content of: <book><chapter><sect1><sect2><para> 6122 #. type: Content of: <book><chapter><sect1><sect2><para>
6106 #: ../en/ch06-collab.xml:313 6123 #: ../en/ch06-collab.xml:316
6107 msgid "" 6124 msgid ""
6108 "At the center of the community sits Linus Torvalds, the creator of Linux. He " 6125 "At the center of the community sits Linus Torvalds, the creator of Linux. He "
6109 "publishes a single source repository that is considered the " 6126 "publishes a single source repository that is considered the "
6110 "<quote>authoritative</quote> current tree by the entire developer community. " 6127 "<quote>authoritative</quote> current tree by the entire developer community. "
6111 "Anyone can clone Linus's tree, but he is very choosy about whose trees he " 6128 "Anyone can clone Linus's tree, but he is very choosy about whose trees he "
6112 "pulls from." 6129 "pulls from."
6113 msgstr "" 6130 msgstr ""
6114 6131
6115 #. type: Content of: <book><chapter><sect1><sect2><para> 6132 #. type: Content of: <book><chapter><sect1><sect2><para>
6116 #: ../en/ch06-collab.xml:320 6133 #: ../en/ch06-collab.xml:323
6117 msgid "" 6134 msgid ""
6118 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, " 6135 "Linus has a number of <quote>trusted lieutenants</quote>. As a general rule, "
6119 "he pulls whatever changes they publish, in most cases without even reviewing " 6136 "he pulls whatever changes they publish, in most cases without even reviewing "
6120 "those changes. Some of those lieutenants are generally agreed to be " 6137 "those changes. Some of those lieutenants are generally agreed to be "
6121 "<quote>maintainers</quote>, responsible for specific subsystems within the " 6138 "<quote>maintainers</quote>, responsible for specific subsystems within the "
6125 "maintainer reviews their changes and agrees to take them, they'll pass them " 6142 "maintainer reviews their changes and agrees to take them, they'll pass them "
6126 "along to Linus in due course." 6143 "along to Linus in due course."
6127 msgstr "" 6144 msgstr ""
6128 6145
6129 #. type: Content of: <book><chapter><sect1><sect2><para> 6146 #. type: Content of: <book><chapter><sect1><sect2><para>
6130 #: ../en/ch06-collab.xml:332 6147 #: ../en/ch06-collab.xml:335
6131 msgid "" 6148 msgid ""
6132 "Individual lieutenants have their own approaches to reviewing, accepting, and " 6149 "Individual lieutenants have their own approaches to reviewing, accepting, and "
6133 "publishing changes; and for deciding when to feed them to Linus. In " 6150 "publishing changes; and for deciding when to feed them to Linus. In "
6134 "addition, there are several well known branches that people use for different " 6151 "addition, there are several well known branches that people use for different "
6135 "purposes. For example, a few people maintain <quote>stable</quote> " 6152 "purposes. For example, a few people maintain <quote>stable</quote> "
6138 "experimental changes; one for changes that they are about to feed upstream; " 6155 "experimental changes; one for changes that they are about to feed upstream; "
6139 "and so on. Others just publish a single tree." 6156 "and so on. Others just publish a single tree."
6140 msgstr "" 6157 msgstr ""
6141 6158
6142 #. type: Content of: <book><chapter><sect1><sect2><para> 6159 #. type: Content of: <book><chapter><sect1><sect2><para>
6143 #: ../en/ch06-collab.xml:343 6160 #: ../en/ch06-collab.xml:346
6144 msgid "" 6161 msgid ""
6145 "This model has two notable features. The first is that it's <quote>pull " 6162 "This model has two notable features. The first is that it's <quote>pull "
6146 "only</quote>. You have to ask, convince, or beg another developer to take a " 6163 "only</quote>. You have to ask, convince, or beg another developer to take a "
6147 "change from you, because there are almost no trees to which more than one " 6164 "change from you, because there are almost no trees to which more than one "
6148 "person can push, and there's no way to push changes into a tree that someone " 6165 "person can push, and there's no way to push changes into a tree that someone "
6149 "else controls." 6166 "else controls."
6150 msgstr "" 6167 msgstr ""
6151 6168
6152 #. type: Content of: <book><chapter><sect1><sect2><para> 6169 #. type: Content of: <book><chapter><sect1><sect2><para>
6153 #: ../en/ch06-collab.xml:350 6170 #: ../en/ch06-collab.xml:353
6154 msgid "" 6171 msgid ""
6155 "The second is that it's based on reputation and acclaim. If you're an " 6172 "The second is that it's based on reputation and acclaim. If you're an "
6156 "unknown, Linus will probably ignore changes from you without even " 6173 "unknown, Linus will probably ignore changes from you without even "
6157 "responding. But a subsystem maintainer will probably review them, and will " 6174 "responding. But a subsystem maintainer will probably review them, and will "
6158 "likely take them if they pass their criteria for suitability. The more " 6175 "likely take them if they pass their criteria for suitability. The more "
6162 "accepted, people with similar interests may pull your changes regularly to " 6179 "accepted, people with similar interests may pull your changes regularly to "
6163 "keep up with your work." 6180 "keep up with your work."
6164 msgstr "" 6181 msgstr ""
6165 6182
6166 #. type: Content of: <book><chapter><sect1><sect2><para> 6183 #. type: Content of: <book><chapter><sect1><sect2><para>
6167 #: ../en/ch06-collab.xml:361 6184 #: ../en/ch06-collab.xml:364
6168 msgid "" 6185 msgid ""
6169 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</" 6186 "Reputation and acclaim don't necessarily cross subsystem or <quote>people</"
6170 "quote> boundaries. If you're a respected but specialised storage hacker, and " 6187 "quote> boundaries. If you're a respected but specialised storage hacker, and "
6171 "you try to fix a networking bug, that change will receive a level of scrutiny " 6188 "you try to fix a networking bug, that change will receive a level of scrutiny "
6172 "from a network maintainer comparable to a change from a complete stranger." 6189 "from a network maintainer comparable to a change from a complete stranger."
6173 msgstr "" 6190 msgstr ""
6174 6191
6175 #. type: Content of: <book><chapter><sect1><sect2><para> 6192 #. type: Content of: <book><chapter><sect1><sect2><para>
6176 #: ../en/ch06-collab.xml:368 6193 #: ../en/ch06-collab.xml:371
6177 msgid "" 6194 msgid ""
6178 "To people who come from more orderly project backgrounds, the comparatively " 6195 "To people who come from more orderly project backgrounds, the comparatively "
6179 "chaotic Linux kernel development process often seems completely insane. It's " 6196 "chaotic Linux kernel development process often seems completely insane. It's "
6180 "subject to the whims of individuals; people make sweeping changes whenever " 6197 "subject to the whims of individuals; people make sweeping changes whenever "
6181 "they deem it appropriate; and the pace of development is astounding. And yet " 6198 "they deem it appropriate; and the pace of development is astounding. And yet "
6182 "Linux is a highly successful, well-regarded piece of software." 6199 "Linux is a highly successful, well-regarded piece of software."
6183 msgstr "" 6200 msgstr ""
6184 6201
6185 #. type: Content of: <book><chapter><sect1><sect2><title> 6202 #. type: Content of: <book><chapter><sect1><sect2><title>
6186 #: ../en/ch06-collab.xml:378 6203 #: ../en/ch06-collab.xml:381
6187 msgid "Pull-only versus shared-push collaboration" 6204 msgid "Pull-only versus shared-push collaboration"
6188 msgstr "只读与共享写协作" 6205 msgstr "只读与共享写协作"
6189 6206
6190 #. type: Content of: <book><chapter><sect1><sect2><para> 6207 #. type: Content of: <book><chapter><sect1><sect2><para>
6191 #: ../en/ch06-collab.xml:380 6208 #: ../en/ch06-collab.xml:383
6192 msgid "" 6209 msgid ""
6193 "A perpetual source of heat in the open source community is whether a " 6210 "A perpetual source of heat in the open source community is whether a "
6194 "development model in which people only ever pull changes from others is " 6211 "development model in which people only ever pull changes from others is "
6195 "<quote>better than</quote> one in which multiple people can push changes to a " 6212 "<quote>better than</quote> one in which multiple people can push changes to a "
6196 "shared repository." 6213 "shared repository."
6197 msgstr "" 6214 msgstr ""
6198 6215
6199 #. type: Content of: <book><chapter><sect1><sect2><para> 6216 #. type: Content of: <book><chapter><sect1><sect2><para>
6200 #: ../en/ch06-collab.xml:386 6217 #: ../en/ch06-collab.xml:389
6201 msgid "" 6218 msgid ""
6202 "Typically, the backers of the shared-push model use tools that actively " 6219 "Typically, the backers of the shared-push model use tools that actively "
6203 "enforce this approach. If you're using a centralised revision control tool " 6220 "enforce this approach. If you're using a centralised revision control tool "
6204 "such as Subversion, there's no way to make a choice over which model you'll " 6221 "such as Subversion, there's no way to make a choice over which model you'll "
6205 "use: the tool gives you shared-push, and if you want to do anything else, " 6222 "use: the tool gives you shared-push, and if you want to do anything else, "
6206 "you'll have to roll your own approach on top (such as applying a patch by " 6223 "you'll have to roll your own approach on top (such as applying a patch by "
6207 "hand)." 6224 "hand)."
6208 msgstr "" 6225 msgstr ""
6209 6226
6210 #. type: Content of: <book><chapter><sect1><sect2><para> 6227 #. type: Content of: <book><chapter><sect1><sect2><para>
6211 #: ../en/ch06-collab.xml:394 6228 #: ../en/ch06-collab.xml:397
6212 msgid "" 6229 msgid ""
6213 "A good distributed revision control tool, such as Mercurial, will support " 6230 "A good distributed revision control tool, such as Mercurial, will support "
6214 "both models. You and your collaborators can then structure how you work " 6231 "both models. You and your collaborators can then structure how you work "
6215 "together based on your own needs and preferences, not on what contortions " 6232 "together based on your own needs and preferences, not on what contortions "
6216 "your tools force you into." 6233 "your tools force you into."
6217 msgstr "" 6234 msgstr ""
6218 6235
6219 #. type: Content of: <book><chapter><sect1><sect2><title> 6236 #. type: Content of: <book><chapter><sect1><sect2><title>
6220 #: ../en/ch06-collab.xml:402 6237 #: ../en/ch06-collab.xml:405
6221 msgid "Where collaboration meets branch management" 6238 msgid "Where collaboration meets branch management"
6222 msgstr "协作与分支管理" 6239 msgstr "协作与分支管理"
6223 6240
6224 #. type: Content of: <book><chapter><sect1><sect2><para> 6241 #. type: Content of: <book><chapter><sect1><sect2><para>
6225 #: ../en/ch06-collab.xml:404 6242 #: ../en/ch06-collab.xml:407
6226 msgid "" 6243 msgid ""
6227 "Once you and your team set up some shared repositories and start propagating " 6244 "Once you and your team set up some shared repositories and start propagating "
6228 "changes back and forth between local and shared repos, you begin to face a " 6245 "changes back and forth between local and shared repos, you begin to face a "
6229 "related, but slightly different challenge: that of managing the multiple " 6246 "related, but slightly different challenge: that of managing the multiple "
6230 "directions in which your team may be moving at once. Even though this " 6247 "directions in which your team may be moving at once. Even though this "
6232 "enough to merit treatment of its own, in chapter <xref linkend=\"chap.branch" 6249 "enough to merit treatment of its own, in chapter <xref linkend=\"chap.branch"
6233 "\"/>." 6250 "\"/>."
6234 msgstr "" 6251 msgstr ""
6235 6252
6236 #. type: Content of: <book><chapter><sect1><title> 6253 #. type: Content of: <book><chapter><sect1><title>
6237 #: ../en/ch06-collab.xml:416 6254 #: ../en/ch06-collab.xml:419
6238 msgid "The technical side of sharing" 6255 msgid "The technical side of sharing"
6239 msgstr "共享的技术因素" 6256 msgstr "共享的技术因素"
6240 6257
6241 #. type: Content of: <book><chapter><sect1><para> 6258 #. type: Content of: <book><chapter><sect1><para>
6242 #: ../en/ch06-collab.xml:418 6259 #: ../en/ch06-collab.xml:421
6243 msgid "" 6260 msgid ""
6244 "The remainder of this chapter is devoted to the question of serving data to " 6261 "The remainder of this chapter is devoted to the question of serving data to "
6245 "your collaborators." 6262 "your collaborators."
6246 msgstr "" 6263 msgstr ""
6247 6264
6248 #. type: Content of: <book><chapter><sect1><title> 6265 #. type: Content of: <book><chapter><sect1><title>
6249 #: ../en/ch06-collab.xml:423 6266 #: ../en/ch06-collab.xml:426
6250 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>" 6267 msgid "Informal sharing with <command role=\"hg-cmd\">hg serve</command>"
6251 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享" 6268 msgstr "使用 <command role=\"hg-cmd\">hg serve</command> 进行非正式共享"
6252 6269
6253 #. type: Content of: <book><chapter><sect1><para> 6270 #. type: Content of: <book><chapter><sect1><para>
6254 #: ../en/ch06-collab.xml:426 6271 #: ../en/ch06-collab.xml:429
6255 msgid "" 6272 msgid ""
6256 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is " 6273 "Mercurial's <command role=\"hg-cmd\">hg serve</command> command is "
6257 "wonderfully suited to small, tight-knit, and fast-paced group environments. " 6274 "wonderfully suited to small, tight-knit, and fast-paced group environments. "
6258 "It also provides a great way to get a feel for using Mercurial commands over " 6275 "It also provides a great way to get a feel for using Mercurial commands over "
6259 "a network." 6276 "a network."
6260 msgstr "" 6277 msgstr ""
6261 6278
6262 #. type: Content of: <book><chapter><sect1><para> 6279 #. type: Content of: <book><chapter><sect1><para>
6263 #: ../en/ch06-collab.xml:431 6280 #: ../en/ch06-collab.xml:434
6264 msgid "" 6281 msgid ""
6265 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in " 6282 "Run <command role=\"hg-cmd\">hg serve</command> inside a repository, and in "
6266 "under a second it will bring up a specialised HTTP server; this will accept " 6283 "under a second it will bring up a specialised HTTP server; this will accept "
6267 "connections from any client, and serve up data for that repository until you " 6284 "connections from any client, and serve up data for that repository until you "
6268 "terminate it. Anyone who knows the URL of the server you just started, and " 6285 "terminate it. Anyone who knows the URL of the server you just started, and "
6271 "cmd\">hg serve</command> instance running on a laptop is likely to look " 6288 "cmd\">hg serve</command> instance running on a laptop is likely to look "
6272 "something like <literal>http://my-laptop.local:8000/</literal>." 6289 "something like <literal>http://my-laptop.local:8000/</literal>."
6273 msgstr "" 6290 msgstr ""
6274 6291
6275 #. type: Content of: <book><chapter><sect1><para> 6292 #. type: Content of: <book><chapter><sect1><para>
6276 #: ../en/ch06-collab.xml:442 6293 #: ../en/ch06-collab.xml:445
6277 msgid "" 6294 msgid ""
6278 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</" 6295 "The <command role=\"hg-cmd\">hg serve</command> command is <emphasis>not</"
6279 "emphasis> a general-purpose web server. It can do only two things:" 6296 "emphasis> a general-purpose web server. It can do only two things:"
6280 msgstr "" 6297 msgstr ""
6281 6298
6282 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 6299 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
6283 #: ../en/ch06-collab.xml:446 6300 #: ../en/ch06-collab.xml:449
6284 msgid "" 6301 msgid ""
6285 "Allow people to browse the history of the repository it's serving, from their " 6302 "Allow people to browse the history of the repository it's serving, from their "
6286 "normal web browsers." 6303 "normal web browsers."
6287 msgstr "" 6304 msgstr ""
6288 6305
6289 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 6306 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
6290 #: ../en/ch06-collab.xml:450 6307 #: ../en/ch06-collab.xml:453
6291 msgid "" 6308 msgid ""
6292 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd" 6309 "Speak Mercurial's wire protocol, so that people can <command role=\"hg-cmd"
6293 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes " 6310 "\">hg clone</command> or <command role=\"hg-cmd\">hg pull</command> changes "
6294 "from that repository." 6311 "from that repository."
6295 msgstr "" 6312 msgstr ""
6296 6313
6297 #. type: Content of: <book><chapter><sect1><para> 6314 #. type: Content of: <book><chapter><sect1><para>
6298 #: ../en/ch06-collab.xml:455 6315 #: ../en/ch06-collab.xml:458
6299 msgid "" 6316 msgid ""
6300 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote " 6317 "In particular, <command role=\"hg-cmd\">hg serve</command> won't allow remote "
6301 "users to <emphasis>modify</emphasis> your repository. It's intended for read-" 6318 "users to <emphasis>modify</emphasis> your repository. It's intended for read-"
6302 "only use." 6319 "only use."
6303 msgstr "" 6320 msgstr ""
6304 6321
6305 #. type: Content of: <book><chapter><sect1><para> 6322 #. type: Content of: <book><chapter><sect1><para>
6306 #: ../en/ch06-collab.xml:459 6323 #: ../en/ch06-collab.xml:462
6307 msgid "" 6324 msgid ""
6308 "If you're getting started with Mercurial, there's nothing to prevent you from " 6325 "If you're getting started with Mercurial, there's nothing to prevent you from "
6309 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on " 6326 "using <command role=\"hg-cmd\">hg serve</command> to serve up a repository on "
6310 "your own computer, then use commands like <command role=\"hg-cmd\">hg clone</" 6327 "your own computer, then use commands like <command role=\"hg-cmd\">hg clone</"
6311 "command>, <command role=\"hg-cmd\">hg incoming</command>, and so on to talk " 6328 "command>, <command role=\"hg-cmd\">hg incoming</command>, and so on to talk "
6312 "to that server as if the repository was hosted remotely. This can help you to " 6329 "to that server as if the repository was hosted remotely. This can help you to "
6313 "quickly get acquainted with using commands on network-hosted repositories." 6330 "quickly get acquainted with using commands on network-hosted repositories."
6314 msgstr "" 6331 msgstr ""
6315 6332
6316 #. type: Content of: <book><chapter><sect1><sect2><title> 6333 #. type: Content of: <book><chapter><sect1><sect2><title>
6317 #: ../en/ch06-collab.xml:469 6334 #: ../en/ch06-collab.xml:472
6318 msgid "A few things to keep in mind" 6335 msgid "A few things to keep in mind"
6319 msgstr "要牢记的几件事" 6336 msgstr "要牢记的几件事"
6320 6337
6321 #. type: Content of: <book><chapter><sect1><sect2><para> 6338 #. type: Content of: <book><chapter><sect1><sect2><para>
6322 #: ../en/ch06-collab.xml:471 6339 #: ../en/ch06-collab.xml:474
6323 msgid "" 6340 msgid ""
6324 "Because it provides unauthenticated read access to all clients, you should " 6341 "Because it provides unauthenticated read access to all clients, you should "
6325 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where " 6342 "only use <command role=\"hg-cmd\">hg serve</command> in an environment where "
6326 "you either don't care, or have complete control over, who can access your " 6343 "you either don't care, or have complete control over, who can access your "
6327 "network and pull data from your repository." 6344 "network and pull data from your repository."
6328 msgstr "" 6345 msgstr ""
6329 6346
6330 #. type: Content of: <book><chapter><sect1><sect2><para> 6347 #. type: Content of: <book><chapter><sect1><sect2><para>
6331 #: ../en/ch06-collab.xml:477 6348 #: ../en/ch06-collab.xml:480
6332 msgid "" 6349 msgid ""
6333 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about " 6350 "The <command role=\"hg-cmd\">hg serve</command> command knows nothing about "
6334 "any firewall software you might have installed on your system or network. It " 6351 "any firewall software you might have installed on your system or network. It "
6335 "cannot detect or control your firewall software. If other people are unable " 6352 "cannot detect or control your firewall software. If other people are unable "
6336 "to talk to a running <command role=\"hg-cmd\">hg serve</command> instance, " 6353 "to talk to a running <command role=\"hg-cmd\">hg serve</command> instance, "
6337 "the second thing you should do (<emphasis>after</emphasis> you make sure that " 6354 "the second thing you should do (<emphasis>after</emphasis> you make sure that "
6338 "they're using the correct URL) is check your firewall configuration." 6355 "they're using the correct URL) is check your firewall configuration."
6339 msgstr "" 6356 msgstr ""
6340 6357
6341 #. type: Content of: <book><chapter><sect1><sect2><para> 6358 #. type: Content of: <book><chapter><sect1><sect2><para>
6342 #: ../en/ch06-collab.xml:486 6359 #: ../en/ch06-collab.xml:489
6343 msgid "" 6360 msgid ""
6344 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming " 6361 "By default, <command role=\"hg-cmd\">hg serve</command> listens for incoming "
6345 "connections on port 8000. If another process is already listening on the " 6362 "connections on port 8000. If another process is already listening on the "
6346 "port you want to use, you can specify a different port to listen on using the " 6363 "port you want to use, you can specify a different port to listen on using the "
6347 "<option role=\"hg-opt-serve\">-p</option> option." 6364 "<option role=\"hg-opt-serve\">-p</option> option."
6348 msgstr "" 6365 msgstr ""
6349 6366
6350 #. type: Content of: <book><chapter><sect1><sect2><para> 6367 #. type: Content of: <book><chapter><sect1><sect2><para>
6351 #: ../en/ch06-collab.xml:492 6368 #: ../en/ch06-collab.xml:495
6352 msgid "" 6369 msgid ""
6353 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints " 6370 "Normally, when <command role=\"hg-cmd\">hg serve</command> starts, it prints "
6354 "no output, which can be a bit unnerving. If you'd like to confirm that it is " 6371 "no output, which can be a bit unnerving. If you'd like to confirm that it is "
6355 "indeed running correctly, and find out what URL you should send to your " 6372 "indeed running correctly, and find out what URL you should send to your "
6356 "collaborators, start it with the <option role=\"hg-opt-global\">-v</option> " 6373 "collaborators, start it with the <option role=\"hg-opt-global\">-v</option> "
6357 "option." 6374 "option."
6358 msgstr "" 6375 msgstr ""
6359 6376
6360 #. type: Content of: <book><chapter><sect1><title> 6377 #. type: Content of: <book><chapter><sect1><title>
6361 #: ../en/ch06-collab.xml:502 6378 #: ../en/ch06-collab.xml:505
6362 msgid "Using the Secure Shell (ssh) protocol" 6379 msgid "Using the Secure Shell (ssh) protocol"
6363 msgstr "使用 ssh 协议" 6380 msgstr "使用 ssh 协议"
6364 6381
6365 #. type: Content of: <book><chapter><sect1><para> 6382 #. type: Content of: <book><chapter><sect1><para>
6366 #: ../en/ch06-collab.xml:504 6383 #: ../en/ch06-collab.xml:507
6367 msgid "" 6384 msgid ""
6368 "You can pull and push changes securely over a network connection using the " 6385 "You can pull and push changes securely over a network connection using the "
6369 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, " 6386 "Secure Shell (<literal>ssh</literal>) protocol. To use this successfully, "
6370 "you may have to do a little bit of configuration on the client or server " 6387 "you may have to do a little bit of configuration on the client or server "
6371 "sides." 6388 "sides."
6372 msgstr "" 6389 msgstr ""
6373 6390
6374 #. type: Content of: <book><chapter><sect1><para> 6391 #. type: Content of: <book><chapter><sect1><para>
6375 #: ../en/ch06-collab.xml:509 6392 #: ../en/ch06-collab.xml:512
6376 msgid "" 6393 msgid ""
6377 "If you're not familiar with ssh, it's a network protocol that lets you " 6394 "If you're not familiar with ssh, it's a network protocol that lets you "
6378 "securely communicate with another computer. To use it with Mercurial, you'll " 6395 "securely communicate with another computer. To use it with Mercurial, you'll "
6379 "be setting up one or more user accounts on a server so that remote users can " 6396 "be setting up one or more user accounts on a server so that remote users can "
6380 "log in and execute commands." 6397 "log in and execute commands."
6381 msgstr "" 6398 msgstr ""
6382 6399
6383 #. type: Content of: <book><chapter><sect1><para> 6400 #. type: Content of: <book><chapter><sect1><para>
6384 #: ../en/ch06-collab.xml:515 6401 #: ../en/ch06-collab.xml:518
6385 msgid "" 6402 msgid ""
6386 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some " 6403 "(If you <emphasis>are</emphasis> familiar with ssh, you'll probably find some "
6387 "of the material that follows to be elementary in nature.)" 6404 "of the material that follows to be elementary in nature.)"
6388 msgstr "" 6405 msgstr ""
6389 6406
6390 #. type: Content of: <book><chapter><sect1><sect2><title> 6407 #. type: Content of: <book><chapter><sect1><sect2><title>
6391 #: ../en/ch06-collab.xml:520 6408 #: ../en/ch06-collab.xml:523
6392 msgid "How to read and write ssh URLs" 6409 msgid "How to read and write ssh URLs"
6393 msgstr "如何读写 ssh 路径" 6410 msgstr "如何读写 ssh 路径"
6394 6411
6395 #. type: Content of: <book><chapter><sect1><sect2><para> 6412 #. type: Content of: <book><chapter><sect1><sect2><para>
6396 #: ../en/ch06-collab.xml:522 6413 #: ../en/ch06-collab.xml:525
6397 msgid "An ssh URL tends to look like this:" 6414 msgid "An ssh URL tends to look like this:"
6398 msgstr "" 6415 msgstr ""
6399 6416
6400 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6417 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6401 #: ../en/ch06-collab.xml:525 6418 #: ../en/ch06-collab.xml:528
6402 msgid "" 6419 msgid ""
6403 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the " 6420 "The <quote><literal>ssh://</literal></quote> part tells Mercurial to use the "
6404 "ssh protocol." 6421 "ssh protocol."
6405 msgstr "" 6422 msgstr ""
6406 6423
6407 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6424 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6408 #: ../en/ch06-collab.xml:528 6425 #: ../en/ch06-collab.xml:531
6409 msgid "" 6426 msgid ""
6410 "The <quote><literal>bos@</literal></quote> component indicates what username " 6427 "The <quote><literal>bos@</literal></quote> component indicates what username "
6411 "to log into the server as. You can leave this out if the remote username is " 6428 "to log into the server as. You can leave this out if the remote username is "
6412 "the same as your local username." 6429 "the same as your local username."
6413 msgstr "" 6430 msgstr ""
6414 6431
6415 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6432 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6416 #: ../en/ch06-collab.xml:533 6433 #: ../en/ch06-collab.xml:536
6417 msgid "" 6434 msgid ""
6418 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of " 6435 "The <quote><literal>hg.serpentine.com</literal></quote> gives the hostname of "
6419 "the server to log into." 6436 "the server to log into."
6420 msgstr "" 6437 msgstr ""
6421 6438
6422 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6439 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6423 #: ../en/ch06-collab.xml:537 6440 #: ../en/ch06-collab.xml:540
6424 msgid "" 6441 msgid ""
6425 "The <quote>:22</quote> identifies the port number to connect to the server " 6442 "The <quote>:22</quote> identifies the port number to connect to the server "
6426 "on. The default port is 22, so you only need to specify this part if you're " 6443 "on. The default port is 22, so you only need to specify this part if you're "
6427 "<emphasis>not</emphasis> using port 22." 6444 "<emphasis>not</emphasis> using port 22."
6428 msgstr "" 6445 msgstr ""
6429 6446
6430 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6447 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6431 #: ../en/ch06-collab.xml:542 6448 #: ../en/ch06-collab.xml:545
6432 msgid "" 6449 msgid ""
6433 "The remainder of the URL is the local path to the repository on the server." 6450 "The remainder of the URL is the local path to the repository on the server."
6434 msgstr "" 6451 msgstr ""
6435 6452
6436 #. type: Content of: <book><chapter><sect1><sect2><para> 6453 #. type: Content of: <book><chapter><sect1><sect2><para>
6437 #: ../en/ch06-collab.xml:546 6454 #: ../en/ch06-collab.xml:549
6438 msgid "" 6455 msgid ""
6439 "There's plenty of scope for confusion with the path component of ssh URLs, as " 6456 "There's plenty of scope for confusion with the path component of ssh URLs, as "
6440 "there is no standard way for tools to interpret it. Some programs behave " 6457 "there is no standard way for tools to interpret it. Some programs behave "
6441 "differently than others when dealing with these paths. This isn't an ideal " 6458 "differently than others when dealing with these paths. This isn't an ideal "
6442 "situation, but it's unlikely to change. Please read the following paragraphs " 6459 "situation, but it's unlikely to change. Please read the following paragraphs "
6443 "carefully." 6460 "carefully."
6444 msgstr "" 6461 msgstr ""
6445 6462
6446 #. type: Content of: <book><chapter><sect1><sect2><para> 6463 #. type: Content of: <book><chapter><sect1><sect2><para>
6447 #: ../en/ch06-collab.xml:553 6464 #: ../en/ch06-collab.xml:556
6448 msgid "" 6465 msgid ""
6449 "Mercurial treats the path to a repository on the server as relative to the " 6466 "Mercurial treats the path to a repository on the server as relative to the "
6450 "remote user's home directory. For example, if user <literal>foo</literal> on " 6467 "remote user's home directory. For example, if user <literal>foo</literal> on "
6451 "the server has a home directory of <filename class=\"directory\">/home/foo</" 6468 "the server has a home directory of <filename class=\"directory\">/home/foo</"
6452 "filename>, then an ssh URL that contains a path component of <filename class=" 6469 "filename>, then an ssh URL that contains a path component of <filename class="
6453 "\"directory\">bar</filename> <emphasis>really</emphasis> refers to the " 6470 "\"directory\">bar</filename> <emphasis>really</emphasis> refers to the "
6454 "directory <filename class=\"directory\">/home/foo/bar</filename>." 6471 "directory <filename class=\"directory\">/home/foo/bar</filename>."
6455 msgstr "" 6472 msgstr ""
6456 6473
6457 #. type: Content of: <book><chapter><sect1><sect2><para> 6474 #. type: Content of: <book><chapter><sect1><sect2><para>
6458 #: ../en/ch06-collab.xml:562 6475 #: ../en/ch06-collab.xml:565
6459 msgid "" 6476 msgid ""
6460 "If you want to specify a path relative to another user's home directory, you " 6477 "If you want to specify a path relative to another user's home directory, you "
6461 "can use a path that starts with a tilde character followed by the user's name " 6478 "can use a path that starts with a tilde character followed by the user's name "
6462 "(let's call them <literal>otheruser</literal>), like this." 6479 "(let's call them <literal>otheruser</literal>), like this."
6463 msgstr "" 6480 msgstr ""
6464 6481
6465 #. type: Content of: <book><chapter><sect1><sect2><para> 6482 #. type: Content of: <book><chapter><sect1><sect2><para>
6466 #: ../en/ch06-collab.xml:568 6483 #: ../en/ch06-collab.xml:571
6467 msgid "" 6484 msgid ""
6468 "And if you really want to specify an <emphasis>absolute</emphasis> path on " 6485 "And if you really want to specify an <emphasis>absolute</emphasis> path on "
6469 "the server, begin the path component with two slashes, as in this example." 6486 "the server, begin the path component with two slashes, as in this example."
6470 msgstr "" 6487 msgstr ""
6471 6488
6472 #. type: Content of: <book><chapter><sect1><sect2><title> 6489 #. type: Content of: <book><chapter><sect1><sect2><title>
6473 #: ../en/ch06-collab.xml:575 6490 #: ../en/ch06-collab.xml:578
6474 msgid "Finding an ssh client for your system" 6491 msgid "Finding an ssh client for your system"
6475 msgstr "为你的系统寻找 ssh 客户端" 6492 msgstr "为你的系统寻找 ssh 客户端"
6476 6493
6477 #. type: Content of: <book><chapter><sect1><sect2><para> 6494 #. type: Content of: <book><chapter><sect1><sect2><para>
6478 #: ../en/ch06-collab.xml:577 6495 #: ../en/ch06-collab.xml:580
6479 msgid "" 6496 msgid ""
6480 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're " 6497 "Almost every Unix-like system comes with OpenSSH preinstalled. If you're "
6481 "using such a system, run <literal>which ssh</literal> to find out if the " 6498 "using such a system, run <literal>which ssh</literal> to find out if the "
6482 "<command>ssh</command> command is installed (it's usually in <filename class=" 6499 "<command>ssh</command> command is installed (it's usually in <filename class="
6483 "\"directory\">/usr/bin</filename>). In the unlikely event that it isn't " 6500 "\"directory\">/usr/bin</filename>). In the unlikely event that it isn't "
6484 "present, take a look at your system documentation to figure out how to " 6501 "present, take a look at your system documentation to figure out how to "
6485 "install it." 6502 "install it."
6486 msgstr "" 6503 msgstr ""
6487 6504
6488 #. type: Content of: <book><chapter><sect1><sect2><para> 6505 #. type: Content of: <book><chapter><sect1><sect2><para>
6489 #: ../en/ch06-collab.xml:585 6506 #: ../en/ch06-collab.xml:588
6490 msgid "" 6507 msgid ""
6491 "On Windows, you'll first need to download a suitable ssh client. There are " 6508 "On Windows, you'll first need to download a suitable ssh client. There are "
6492 "two alternatives." 6509 "two alternatives."
6493 msgstr "" 6510 msgstr ""
6494 6511
6495 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6512 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6496 #: ../en/ch06-collab.xml:588 6513 #: ../en/ch06-collab.xml:591
6497 msgid "" 6514 msgid ""
6498 "Simon Tatham's excellent PuTTY package <citation>web:putty</citation> " 6515 "Simon Tatham's excellent PuTTY package <citation>web:putty</citation> "
6499 "provides a complete suite of ssh client commands." 6516 "provides a complete suite of ssh client commands."
6500 msgstr "" 6517 msgstr ""
6501 6518
6502 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6519 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6503 #: ../en/ch06-collab.xml:592 6520 #: ../en/ch06-collab.xml:595
6504 msgid "" 6521 msgid ""
6505 "If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH." 6522 "If you have a high tolerance for pain, you can use the Cygwin port of OpenSSH."
6506 msgstr "" 6523 msgstr ""
6507 6524
6508 #. type: Content of: <book><chapter><sect1><sect2><para> 6525 #. type: Content of: <book><chapter><sect1><sect2><para>
6509 #: ../en/ch06-collab.xml:595 6526 #: ../en/ch06-collab.xml:598
6510 msgid "" 6527 msgid ""
6511 "In either case, you'll need to edit your \\hgini\\ file to tell Mercurial " 6528 "In either case, you'll need to edit your \\hgini\\ file to tell Mercurial "
6512 "where to find the actual client command. For example, if you're using PuTTY, " 6529 "where to find the actual client command. For example, if you're using PuTTY, "
6513 "you'll need to use the <command>plink</command> command as a command-line ssh " 6530 "you'll need to use the <command>plink</command> command as a command-line ssh "
6514 "client." 6531 "client."
6515 msgstr "" 6532 msgstr ""
6516 6533
6517 #. type: Content of: <book><chapter><sect1><sect2><note><para> 6534 #. type: Content of: <book><chapter><sect1><sect2><note><para>
6518 #: ../en/ch06-collab.xml:604 6535 #: ../en/ch06-collab.xml:607
6519 msgid "" 6536 msgid ""
6520 "The path to <command>plink</command> shouldn't contain any whitespace " 6537 "The path to <command>plink</command> shouldn't contain any whitespace "
6521 "characters, or Mercurial may not be able to run it correctly (so putting it " 6538 "characters, or Mercurial may not be able to run it correctly (so putting it "
6522 "in <filename class=\"directory\">C:\\\\Program Files</filename> is probably " 6539 "in <filename class=\"directory\">C:\\\\Program Files</filename> is probably "
6523 "not a good idea)." 6540 "not a good idea)."
6524 msgstr "" 6541 msgstr ""
6525 6542
6526 #. type: Content of: <book><chapter><sect1><sect2><title> 6543 #. type: Content of: <book><chapter><sect1><sect2><title>
6527 #: ../en/ch06-collab.xml:613 6544 #: ../en/ch06-collab.xml:616
6528 msgid "Generating a key pair" 6545 msgid "Generating a key pair"
6529 msgstr "产生密钥对" 6546 msgstr "产生密钥对"
6530 6547
6531 #. type: Content of: <book><chapter><sect1><sect2><para> 6548 #. type: Content of: <book><chapter><sect1><sect2><para>
6532 #: ../en/ch06-collab.xml:615 6549 #: ../en/ch06-collab.xml:618
6533 msgid "" 6550 msgid ""
6534 "To avoid the need to repetitively type a password every time you need to use " 6551 "To avoid the need to repetitively type a password every time you need to use "
6535 "your ssh client, I recommend generating a key pair. On a Unix-like system, " 6552 "your ssh client, I recommend generating a key pair. On a Unix-like system, "
6536 "the <command>ssh-keygen</command> command will do the trick. On Windows, if " 6553 "the <command>ssh-keygen</command> command will do the trick. On Windows, if "
6537 "you're using PuTTY, the <command>puttygen</command> command is what you'll " 6554 "you're using PuTTY, the <command>puttygen</command> command is what you'll "
6538 "need." 6555 "need."
6539 msgstr "" 6556 msgstr ""
6540 6557
6541 #. type: Content of: <book><chapter><sect1><sect2><para> 6558 #. type: Content of: <book><chapter><sect1><sect2><para>
6542 #: ../en/ch06-collab.xml:623 6559 #: ../en/ch06-collab.xml:626
6543 msgid "" 6560 msgid ""
6544 "When you generate a key pair, it's usually <emphasis>highly</emphasis> " 6561 "When you generate a key pair, it's usually <emphasis>highly</emphasis> "
6545 "advisable to protect it with a passphrase. (The only time that you might not " 6562 "advisable to protect it with a passphrase. (The only time that you might not "
6546 "want to do this is when you're using the ssh protocol for automated tasks on " 6563 "want to do this is when you're using the ssh protocol for automated tasks on "
6547 "a secure network.)" 6564 "a secure network.)"
6548 msgstr "" 6565 msgstr ""
6549 6566
6550 #. type: Content of: <book><chapter><sect1><sect2><para> 6567 #. type: Content of: <book><chapter><sect1><sect2><para>
6551 #: ../en/ch06-collab.xml:629 6568 #: ../en/ch06-collab.xml:632
6552 msgid "" 6569 msgid ""
6553 "Simply generating a key pair isn't enough, however. You'll need to add the " 6570 "Simply generating a key pair isn't enough, however. You'll need to add the "
6554 "public key to the set of authorised keys for whatever user you're logging in " 6571 "public key to the set of authorised keys for whatever user you're logging in "
6555 "remotely as. For servers using OpenSSH (the vast majority), this will mean " 6572 "remotely as. For servers using OpenSSH (the vast majority), this will mean "
6556 "adding the public key to a list in a file called <filename role=\"special" 6573 "adding the public key to a list in a file called <filename role=\"special"
6557 "\">authorized_keys</filename> in their <filename role=\"special\" class=" 6574 "\">authorized_keys</filename> in their <filename role=\"special\" class="
6558 "\"directory\">.ssh</filename> directory." 6575 "\"directory\">.ssh</filename> directory."
6559 msgstr "" 6576 msgstr ""
6560 6577
6561 #. type: Content of: <book><chapter><sect1><sect2><para> 6578 #. type: Content of: <book><chapter><sect1><sect2><para>
6562 #: ../en/ch06-collab.xml:638 6579 #: ../en/ch06-collab.xml:641
6563 msgid "" 6580 msgid ""
6564 "On a Unix-like system, your public key will have a <filename>.pub</filename> " 6581 "On a Unix-like system, your public key will have a <filename>.pub</filename> "
6565 "extension. If you're using <command>puttygen</command> on Windows, you can " 6582 "extension. If you're using <command>puttygen</command> on Windows, you can "
6566 "save the public key to a file of your choosing, or paste it from the window " 6583 "save the public key to a file of your choosing, or paste it from the window "
6567 "it's displayed in straight into the <filename role=\"special" 6584 "it's displayed in straight into the <filename role=\"special"
6568 "\">authorized_keys</filename> file." 6585 "\">authorized_keys</filename> file."
6569 msgstr "" 6586 msgstr ""
6570 6587
6571 #. type: Content of: <book><chapter><sect1><sect2><title> 6588 #. type: Content of: <book><chapter><sect1><sect2><title>
6572 #: ../en/ch06-collab.xml:647 6589 #: ../en/ch06-collab.xml:650
6573 msgid "Using an authentication agent" 6590 msgid "Using an authentication agent"
6574 msgstr "使用认证代理" 6591 msgstr "使用认证代理"
6575 6592
6576 #. type: Content of: <book><chapter><sect1><sect2><para> 6593 #. type: Content of: <book><chapter><sect1><sect2><para>
6577 #: ../en/ch06-collab.xml:649 6594 #: ../en/ch06-collab.xml:652
6578 msgid "" 6595 msgid ""
6579 "An authentication agent is a daemon that stores passphrases in memory (so it " 6596 "An authentication agent is a daemon that stores passphrases in memory (so it "
6580 "will forget passphrases if you log out and log back in again). An ssh client " 6597 "will forget passphrases if you log out and log back in again). An ssh client "
6581 "will notice if it's running, and query it for a passphrase. If there's no " 6598 "will notice if it's running, and query it for a passphrase. If there's no "
6582 "authentication agent running, or the agent doesn't store the necessary " 6599 "authentication agent running, or the agent doesn't store the necessary "
6584 "communicate with a server on your behalf (e.g. whenever you pull or push " 6601 "communicate with a server on your behalf (e.g. whenever you pull or push "
6585 "changes)." 6602 "changes)."
6586 msgstr "" 6603 msgstr ""
6587 6604
6588 #. type: Content of: <book><chapter><sect1><sect2><para> 6605 #. type: Content of: <book><chapter><sect1><sect2><para>
6589 #: ../en/ch06-collab.xml:658 6606 #: ../en/ch06-collab.xml:661
6590 msgid "" 6607 msgid ""
6591 "The downside of storing passphrases in an agent is that it's possible for a " 6608 "The downside of storing passphrases in an agent is that it's possible for a "
6592 "well-prepared attacker to recover the plain text of your passphrases, in some " 6609 "well-prepared attacker to recover the plain text of your passphrases, in some "
6593 "cases even if your system has been power-cycled. You should make your own " 6610 "cases even if your system has been power-cycled. You should make your own "
6594 "judgment as to whether this is an acceptable risk. It certainly saves a lot " 6611 "judgment as to whether this is an acceptable risk. It certainly saves a lot "
6595 "of repeated typing." 6612 "of repeated typing."
6596 msgstr "" 6613 msgstr ""
6597 6614
6598 #. type: Content of: <book><chapter><sect1><sect2><para> 6615 #. type: Content of: <book><chapter><sect1><sect2><para>
6599 #: ../en/ch06-collab.xml:665 6616 #: ../en/ch06-collab.xml:668
6600 msgid "" 6617 msgid ""
6601 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and " 6618 "On Unix-like systems, the agent is called <command>ssh-agent</command>, and "
6602 "it's often run automatically for you when you log in. You'll need to use the " 6619 "it's often run automatically for you when you log in. You'll need to use the "
6603 "<command>ssh-add</command> command to add passphrases to the agent's store. " 6620 "<command>ssh-add</command> command to add passphrases to the agent's store. "
6604 "On Windows, if you're using PuTTY, the <command>pageant</command> command " 6621 "On Windows, if you're using PuTTY, the <command>pageant</command> command "
6605 "acts as the agent. It adds an icon to your system tray that will let you " 6622 "acts as the agent. It adds an icon to your system tray that will let you "
6606 "manage stored passphrases." 6623 "manage stored passphrases."
6607 msgstr "" 6624 msgstr ""
6608 6625
6609 #. type: Content of: <book><chapter><sect1><sect2><title> 6626 #. type: Content of: <book><chapter><sect1><sect2><title>
6610 #: ../en/ch06-collab.xml:676 6627 #: ../en/ch06-collab.xml:679
6611 msgid "Configuring the server side properly" 6628 msgid "Configuring the server side properly"
6612 msgstr "正确配置服务器端" 6629 msgstr "正确配置服务器端"
6613 6630
6614 #. type: Content of: <book><chapter><sect1><sect2><para> 6631 #. type: Content of: <book><chapter><sect1><sect2><para>
6615 #: ../en/ch06-collab.xml:678 6632 #: ../en/ch06-collab.xml:681
6616 msgid "" 6633 msgid ""
6617 "Because ssh can be fiddly to set up if you're new to it, there's a variety of " 6634 "Because ssh can be fiddly to set up if you're new to it, there's a variety of "
6618 "things that can go wrong. Add Mercurial on top, and there's plenty more " 6635 "things that can go wrong. Add Mercurial on top, and there's plenty more "
6619 "scope for head-scratching. Most of these potential problems occur on the " 6636 "scope for head-scratching. Most of these potential problems occur on the "
6620 "server side, not the client side. The good news is that once you've gotten a " 6637 "server side, not the client side. The good news is that once you've gotten a "
6621 "configuration working, it will usually continue to work indefinitely." 6638 "configuration working, it will usually continue to work indefinitely."
6622 msgstr "" 6639 msgstr ""
6623 6640
6624 #. type: Content of: <book><chapter><sect1><sect2><para> 6641 #. type: Content of: <book><chapter><sect1><sect2><para>
6625 #: ../en/ch06-collab.xml:686 6642 #: ../en/ch06-collab.xml:689
6626 msgid "" 6643 msgid ""
6627 "Before you try using Mercurial to talk to an ssh server, it's best to make " 6644 "Before you try using Mercurial to talk to an ssh server, it's best to make "
6628 "sure that you can use the normal <command>ssh</command> or <command>putty</" 6645 "sure that you can use the normal <command>ssh</command> or <command>putty</"
6629 "command> command to talk to the server first. If you run into problems with " 6646 "command> command to talk to the server first. If you run into problems with "
6630 "using these commands directly, Mercurial surely won't work. Worse, it will " 6647 "using these commands directly, Mercurial surely won't work. Worse, it will "
6633 "commands work first, <emphasis>before</emphasis> you worry about whether " 6650 "commands work first, <emphasis>before</emphasis> you worry about whether "
6634 "there's a problem with Mercurial." 6651 "there's a problem with Mercurial."
6635 msgstr "" 6652 msgstr ""
6636 6653
6637 #. type: Content of: <book><chapter><sect1><sect2><para> 6654 #. type: Content of: <book><chapter><sect1><sect2><para>
6638 #: ../en/ch06-collab.xml:697 6655 #: ../en/ch06-collab.xml:700
6639 msgid "" 6656 msgid ""
6640 "The first thing to be sure of on the server side is that you can actually log " 6657 "The first thing to be sure of on the server side is that you can actually log "
6641 "in from another machine at all. If you can't use <command>ssh</command> or " 6658 "in from another machine at all. If you can't use <command>ssh</command> or "
6642 "<command>putty</command> to log in, the error message you get may give you a " 6659 "<command>putty</command> to log in, the error message you get may give you a "
6643 "few hints as to what's wrong. The most common problems are as follows." 6660 "few hints as to what's wrong. The most common problems are as follows."
6644 msgstr "" 6661 msgstr ""
6645 6662
6646 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6663 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6647 #: ../en/ch06-collab.xml:704 6664 #: ../en/ch06-collab.xml:707
6648 msgid "" 6665 msgid ""
6649 "If you get a <quote>connection refused</quote> error, either there isn't an " 6666 "If you get a <quote>connection refused</quote> error, either there isn't an "
6650 "SSH daemon running on the server at all, or it's inaccessible due to firewall " 6667 "SSH daemon running on the server at all, or it's inaccessible due to firewall "
6651 "configuration." 6668 "configuration."
6652 msgstr "" 6669 msgstr ""
6653 6670
6654 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6671 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6655 #: ../en/ch06-collab.xml:709 6672 #: ../en/ch06-collab.xml:712
6656 msgid "" 6673 msgid ""
6657 "If you get a <quote>no route to host</quote> error, you either have an " 6674 "If you get a <quote>no route to host</quote> error, you either have an "
6658 "incorrect address for the server or a seriously locked down firewall that " 6675 "incorrect address for the server or a seriously locked down firewall that "
6659 "won't admit its existence at all." 6676 "won't admit its existence at all."
6660 msgstr "" 6677 msgstr ""
6661 6678
6662 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6679 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6663 #: ../en/ch06-collab.xml:714 6680 #: ../en/ch06-collab.xml:717
6664 msgid "" 6681 msgid ""
6665 "If you get a <quote>permission denied</quote> error, you may have mistyped " 6682 "If you get a <quote>permission denied</quote> error, you may have mistyped "
6666 "the username on the server, or you could have mistyped your key's passphrase " 6683 "the username on the server, or you could have mistyped your key's passphrase "
6667 "or the remote user's password." 6684 "or the remote user's password."
6668 msgstr "" 6685 msgstr ""
6669 6686
6670 #. type: Content of: <book><chapter><sect1><sect2><para> 6687 #. type: Content of: <book><chapter><sect1><sect2><para>
6671 #: ../en/ch06-collab.xml:719 6688 #: ../en/ch06-collab.xml:722
6672 msgid "" 6689 msgid ""
6673 "In summary, if you're having trouble talking to the server's ssh daemon, " 6690 "In summary, if you're having trouble talking to the server's ssh daemon, "
6674 "first make sure that one is running at all. On many systems it will be " 6691 "first make sure that one is running at all. On many systems it will be "
6675 "installed, but disabled, by default. Once you're done with this step, you " 6692 "installed, but disabled, by default. Once you're done with this step, you "
6676 "should then check that the server's firewall is configured to allow incoming " 6693 "should then check that the server's firewall is configured to allow incoming "
6678 "worry about more exotic possibilities for misconfiguration until you've " 6695 "worry about more exotic possibilities for misconfiguration until you've "
6679 "checked these two first." 6696 "checked these two first."
6680 msgstr "" 6697 msgstr ""
6681 6698
6682 #. type: Content of: <book><chapter><sect1><sect2><para> 6699 #. type: Content of: <book><chapter><sect1><sect2><para>
6683 #: ../en/ch06-collab.xml:729 6700 #: ../en/ch06-collab.xml:732
6684 msgid "" 6701 msgid ""
6685 "If you're using an authentication agent on the client side to store " 6702 "If you're using an authentication agent on the client side to store "
6686 "passphrases for your keys, you ought to be able to log into the server " 6703 "passphrases for your keys, you ought to be able to log into the server "
6687 "without being prompted for a passphrase or a password. If you're prompted " 6704 "without being prompted for a passphrase or a password. If you're prompted "
6688 "for a passphrase, there are a few possible culprits." 6705 "for a passphrase, there are a few possible culprits."
6689 msgstr "" 6706 msgstr ""
6690 6707
6691 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6708 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6692 #: ../en/ch06-collab.xml:735 6709 #: ../en/ch06-collab.xml:738
6693 msgid "" 6710 msgid ""
6694 "You might have forgotten to use <command>ssh-add</command> or " 6711 "You might have forgotten to use <command>ssh-add</command> or "
6695 "<command>pageant</command> to store the passphrase." 6712 "<command>pageant</command> to store the passphrase."
6696 msgstr "" 6713 msgstr ""
6697 6714
6698 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6715 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6699 #: ../en/ch06-collab.xml:739 6716 #: ../en/ch06-collab.xml:742
6700 msgid "You might have stored the passphrase for the wrong key." 6717 msgid "You might have stored the passphrase for the wrong key."
6701 msgstr "" 6718 msgstr ""
6702 6719
6703 #. type: Content of: <book><chapter><sect1><sect2><para> 6720 #. type: Content of: <book><chapter><sect1><sect2><para>
6704 #: ../en/ch06-collab.xml:742 6721 #: ../en/ch06-collab.xml:745
6705 msgid "" 6722 msgid ""
6706 "If you're being prompted for the remote user's password, there are another " 6723 "If you're being prompted for the remote user's password, there are another "
6707 "few possible problems to check." 6724 "few possible problems to check."
6708 msgstr "" 6725 msgstr ""
6709 6726
6710 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6727 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6711 #: ../en/ch06-collab.xml:745 6728 #: ../en/ch06-collab.xml:748
6712 msgid "" 6729 msgid ""
6713 "Either the user's home directory or their <filename role=\"special\" class=" 6730 "Either the user's home directory or their <filename role=\"special\" class="
6714 "\"directory\">.ssh</filename> directory might have excessively liberal " 6731 "\"directory\">.ssh</filename> directory might have excessively liberal "
6715 "permissions. As a result, the ssh daemon will not trust or read their " 6732 "permissions. As a result, the ssh daemon will not trust or read their "
6716 "<filename role=\"special\">authorized_keys</filename> file. For example, a " 6733 "<filename role=\"special\">authorized_keys</filename> file. For example, a "
6717 "group-writable home or <filename role=\"special\" class=\"directory\">.ssh</" 6734 "group-writable home or <filename role=\"special\" class=\"directory\">.ssh</"
6718 "filename> directory will often cause this symptom." 6735 "filename> directory will often cause this symptom."
6719 msgstr "" 6736 msgstr ""
6720 6737
6721 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6738 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6722 #: ../en/ch06-collab.xml:754 6739 #: ../en/ch06-collab.xml:757
6723 msgid "" 6740 msgid ""
6724 "The user's <filename role=\"special\">authorized_keys</filename> file may " 6741 "The user's <filename role=\"special\">authorized_keys</filename> file may "
6725 "have a problem. If anyone other than the user owns or can write to that file, " 6742 "have a problem. If anyone other than the user owns or can write to that file, "
6726 "the ssh daemon will not trust or read it." 6743 "the ssh daemon will not trust or read it."
6727 msgstr "" 6744 msgstr ""
6728 6745
6729 #. type: Content of: <book><chapter><sect1><sect2><para> 6746 #. type: Content of: <book><chapter><sect1><sect2><para>
6730 #: ../en/ch06-collab.xml:761 6747 #: ../en/ch06-collab.xml:764
6731 msgid "" 6748 msgid ""
6732 "In the ideal world, you should be able to run the following command " 6749 "In the ideal world, you should be able to run the following command "
6733 "successfully, and it should print exactly one line of output, the current " 6750 "successfully, and it should print exactly one line of output, the current "
6734 "date and time." 6751 "date and time."
6735 msgstr "" 6752 msgstr ""
6736 6753
6737 #. type: Content of: <book><chapter><sect1><sect2><para> 6754 #. type: Content of: <book><chapter><sect1><sect2><para>
6738 #: ../en/ch06-collab.xml:766 6755 #: ../en/ch06-collab.xml:769
6739 msgid "" 6756 msgid ""
6740 "If, on your server, you have login scripts that print banners or other junk " 6757 "If, on your server, you have login scripts that print banners or other junk "
6741 "even when running non-interactive commands like this, you should fix them " 6758 "even when running non-interactive commands like this, you should fix them "
6742 "before you continue, so that they only print output if they're run " 6759 "before you continue, so that they only print output if they're run "
6743 "interactively. Otherwise these banners will at least clutter up Mercurial's " 6760 "interactively. Otherwise these banners will at least clutter up Mercurial's "
6748 "login script is running in an interactive shell is to check the return code " 6765 "login script is running in an interactive shell is to check the return code "
6749 "from the command <literal>tty -s</literal>.)" 6766 "from the command <literal>tty -s</literal>.)"
6750 msgstr "" 6767 msgstr ""
6751 6768
6752 #. type: Content of: <book><chapter><sect1><sect2><para> 6769 #. type: Content of: <book><chapter><sect1><sect2><para>
6753 #: ../en/ch06-collab.xml:780 6770 #: ../en/ch06-collab.xml:783
6754 msgid "" 6771 msgid ""
6755 "Once you've verified that plain old ssh is working with your server, the next " 6772 "Once you've verified that plain old ssh is working with your server, the next "
6756 "step is to ensure that Mercurial runs on the server. The following command " 6773 "step is to ensure that Mercurial runs on the server. The following command "
6757 "should run successfully:" 6774 "should run successfully:"
6758 msgstr "" 6775 msgstr ""
6759 6776
6760 #. type: Content of: <book><chapter><sect1><sect2><para> 6777 #. type: Content of: <book><chapter><sect1><sect2><para>
6761 #: ../en/ch06-collab.xml:785 6778 #: ../en/ch06-collab.xml:788
6762 msgid "" 6779 msgid ""
6763 "If you see an error message instead of normal <command role=\"hg-cmd\">hg " 6780 "If you see an error message instead of normal <command role=\"hg-cmd\">hg "
6764 "version</command> output, this is usually because you haven't installed " 6781 "version</command> output, this is usually because you haven't installed "
6765 "Mercurial to <filename class=\"directory\">/usr/bin</filename>. Don't worry " 6782 "Mercurial to <filename class=\"directory\">/usr/bin</filename>. Don't worry "
6766 "if this is the case; you don't need to do that. But you should check for a " 6783 "if this is the case; you don't need to do that. But you should check for a "
6767 "few possible problems." 6784 "few possible problems."
6768 msgstr "" 6785 msgstr ""
6769 6786
6770 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6787 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6771 #: ../en/ch06-collab.xml:792 6788 #: ../en/ch06-collab.xml:795
6772 msgid "" 6789 msgid ""
6773 "Is Mercurial really installed on the server at all? I know this sounds " 6790 "Is Mercurial really installed on the server at all? I know this sounds "
6774 "trivial, but it's worth checking!" 6791 "trivial, but it's worth checking!"
6775 msgstr "" 6792 msgstr ""
6776 6793
6777 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6794 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6778 #: ../en/ch06-collab.xml:796 6795 #: ../en/ch06-collab.xml:799
6779 msgid "" 6796 msgid ""
6780 "Maybe your shell's search path (usually set via the <envar>PATH</envar> " 6797 "Maybe your shell's search path (usually set via the <envar>PATH</envar> "
6781 "environment variable) is simply misconfigured." 6798 "environment variable) is simply misconfigured."
6782 msgstr "" 6799 msgstr ""
6783 6800
6784 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6801 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6785 #: ../en/ch06-collab.xml:800 6802 #: ../en/ch06-collab.xml:803
6786 msgid "" 6803 msgid ""
6787 "Perhaps your <envar>PATH</envar> environment variable is only being set to " 6804 "Perhaps your <envar>PATH</envar> environment variable is only being set to "
6788 "point to the location of the <command>hg</command> executable if the login " 6805 "point to the location of the <command>hg</command> executable if the login "
6789 "session is interactive. This can happen if you're setting the path in the " 6806 "session is interactive. This can happen if you're setting the path in the "
6790 "wrong shell login script. See your shell's documentation for details." 6807 "wrong shell login script. See your shell's documentation for details."
6791 msgstr "" 6808 msgstr ""
6792 6809
6793 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 6810 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
6794 #: ../en/ch06-collab.xml:807 6811 #: ../en/ch06-collab.xml:810
6795 msgid "" 6812 msgid ""
6796 "The <envar>PYTHONPATH</envar> environment variable may need to contain the " 6813 "The <envar>PYTHONPATH</envar> environment variable may need to contain the "
6797 "path to the Mercurial Python modules. It might not be set at all; it could " 6814 "path to the Mercurial Python modules. It might not be set at all; it could "
6798 "be incorrect; or it may be set only if the login is interactive." 6815 "be incorrect; or it may be set only if the login is interactive."
6799 msgstr "" 6816 msgstr ""
6800 6817
6801 #. type: Content of: <book><chapter><sect1><sect2><para> 6818 #. type: Content of: <book><chapter><sect1><sect2><para>
6802 #: ../en/ch06-collab.xml:814 6819 #: ../en/ch06-collab.xml:817
6803 msgid "" 6820 msgid ""
6804 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh " 6821 "If you can run <command role=\"hg-cmd\">hg version</command> over an ssh "
6805 "connection, well done! You've got the server and client sorted out. You " 6822 "connection, well done! You've got the server and client sorted out. You "
6806 "should now be able to use Mercurial to access repositories hosted by that " 6823 "should now be able to use Mercurial to access repositories hosted by that "
6807 "username on that server. If you run into problems with Mercurial and ssh at " 6824 "username on that server. If you run into problems with Mercurial and ssh at "
6808 "this point, try using the <option role=\"hg-opt-global\">--debug</option> " 6825 "this point, try using the <option role=\"hg-opt-global\">--debug</option> "
6809 "option to get a clearer picture of what's going on." 6826 "option to get a clearer picture of what's going on."
6810 msgstr "" 6827 msgstr ""
6811 6828
6812 #. type: Content of: <book><chapter><sect1><sect2><title> 6829 #. type: Content of: <book><chapter><sect1><sect2><title>
6813 #: ../en/ch06-collab.xml:824 6830 #: ../en/ch06-collab.xml:827
6814 msgid "Using compression with ssh" 6831 msgid "Using compression with ssh"
6815 msgstr "通过 ssh 使用压缩" 6832 msgstr "通过 ssh 使用压缩"
6816 6833
6817 #. type: Content of: <book><chapter><sect1><sect2><para> 6834 #. type: Content of: <book><chapter><sect1><sect2><para>
6818 #: ../en/ch06-collab.xml:826 6835 #: ../en/ch06-collab.xml:829
6819 msgid "" 6836 msgid ""
6820 "Mercurial does not compress data when it uses the ssh protocol, because the " 6837 "Mercurial does not compress data when it uses the ssh protocol, because the "
6821 "ssh protocol can transparently compress data. However, the default behaviour " 6838 "ssh protocol can transparently compress data. However, the default behaviour "
6822 "of ssh clients is <emphasis>not</emphasis> to request compression." 6839 "of ssh clients is <emphasis>not</emphasis> to request compression."
6823 msgstr "" 6840 msgstr ""
6824 6841
6825 #. type: Content of: <book><chapter><sect1><sect2><para> 6842 #. type: Content of: <book><chapter><sect1><sect2><para>
6826 #: ../en/ch06-collab.xml:831 6843 #: ../en/ch06-collab.xml:834
6827 msgid "" 6844 msgid ""
6828 "Over any network other than a fast LAN (even a wireless network), using " 6845 "Over any network other than a fast LAN (even a wireless network), using "
6829 "compression is likely to significantly speed up Mercurial's network " 6846 "compression is likely to significantly speed up Mercurial's network "
6830 "operations. For example, over a WAN, someone measured compression as " 6847 "operations. For example, over a WAN, someone measured compression as "
6831 "reducing the amount of time required to clone a particularly large repository " 6848 "reducing the amount of time required to clone a particularly large repository "
6832 "from 51 minutes to 17 minutes." 6849 "from 51 minutes to 17 minutes."
6833 msgstr "" 6850 msgstr ""
6834 6851
6835 #. type: Content of: <book><chapter><sect1><sect2><para> 6852 #. type: Content of: <book><chapter><sect1><sect2><para>
6836 #: ../en/ch06-collab.xml:838 6853 #: ../en/ch06-collab.xml:841
6837 msgid "" 6854 msgid ""
6838 "Both <command>ssh</command> and <command>plink</command> accept a <option " 6855 "Both <command>ssh</command> and <command>plink</command> accept a <option "
6839 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can " 6856 "role=\"cmd-opt-ssh\">-C</option> option which turns on compression. You can "
6840 "easily edit your <filename role=\"special\"> /.hgrc</filename>\\ to enable " 6857 "easily edit your <filename role=\"special\"> /.hgrc</filename>\\ to enable "
6841 "compression for all of Mercurial's uses of the ssh protocol." 6858 "compression for all of Mercurial's uses of the ssh protocol."
6842 msgstr "" 6859 msgstr ""
6843 6860
6844 #. type: Content of: <book><chapter><sect1><sect2><para> 6861 #. type: Content of: <book><chapter><sect1><sect2><para>
6845 #: ../en/ch06-collab.xml:845 6862 #: ../en/ch06-collab.xml:848
6846 msgid "" 6863 msgid ""
6847 "If you use <command>ssh</command>, you can configure it to always use " 6864 "If you use <command>ssh</command>, you can configure it to always use "
6848 "compression when talking to your server. To do this, edit your <filename " 6865 "compression when talking to your server. To do this, edit your <filename "
6849 "role=\"special\">.ssh/config</filename> file (which may not yet exist), as " 6866 "role=\"special\">.ssh/config</filename> file (which may not yet exist), as "
6850 "follows." 6867 "follows."
6851 msgstr "" 6868 msgstr ""
6852 6869
6853 #. type: Content of: <book><chapter><sect1><sect2><para> 6870 #. type: Content of: <book><chapter><sect1><sect2><para>
6854 #: ../en/ch06-collab.xml:852 6871 #: ../en/ch06-collab.xml:855
6855 msgid "" 6872 msgid ""
6856 "This defines an alias, <literal>hg</literal>. When you use it on the " 6873 "This defines an alias, <literal>hg</literal>. When you use it on the "
6857 "<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-" 6874 "<command>ssh</command> command line or in a Mercurial <literal>ssh</literal>-"
6858 "protocol URL, it will cause <command>ssh</command> to connect to <literal>hg." 6875 "protocol URL, it will cause <command>ssh</command> to connect to <literal>hg."
6859 "example.com</literal> and use compression. This gives you both a shorter " 6876 "example.com</literal> and use compression. This gives you both a shorter "
6860 "name to type and compression, each of which is a good thing in its own right." 6877 "name to type and compression, each of which is a good thing in its own right."
6861 msgstr "" 6878 msgstr ""
6862 6879
6863 #. type: Content of: <book><chapter><sect1><title> 6880 #. type: Content of: <book><chapter><sect1><title>
6864 #: ../en/ch06-collab.xml:863 6881 #: ../en/ch06-collab.xml:866
6865 msgid "Serving over HTTP using CGI" 6882 msgid "Serving over HTTP using CGI"
6866 msgstr "使用 CGI 通过 HTTP 提供服务" 6883 msgstr "使用 CGI 通过 HTTP 提供服务"
6867 6884
6868 #. type: Content of: <book><chapter><sect1><para> 6885 #. type: Content of: <book><chapter><sect1><para>
6869 #: ../en/ch06-collab.xml:865 6886 #: ../en/ch06-collab.xml:868
6870 msgid "" 6887 msgid ""
6871 "Depending on how ambitious you are, configuring Mercurial's CGI interface can " 6888 "Depending on how ambitious you are, configuring Mercurial's CGI interface can "
6872 "take anything from a few moments to several hours." 6889 "take anything from a few moments to several hours."
6873 msgstr "" 6890 msgstr ""
6874 6891
6875 #. type: Content of: <book><chapter><sect1><para> 6892 #. type: Content of: <book><chapter><sect1><para>
6876 #: ../en/ch06-collab.xml:869 6893 #: ../en/ch06-collab.xml:872
6877 msgid "" 6894 msgid ""
6878 "We'll begin with the simplest of examples, and work our way towards a more " 6895 "We'll begin with the simplest of examples, and work our way towards a more "
6879 "complex configuration. Even for the most basic case, you're almost certainly " 6896 "complex configuration. Even for the most basic case, you're almost certainly "
6880 "going to need to read and modify your web server's configuration." 6897 "going to need to read and modify your web server's configuration."
6881 msgstr "" 6898 msgstr ""
6882 6899
6883 #. type: Content of: <book><chapter><sect1><note><para> 6900 #. type: Content of: <book><chapter><sect1><note><para>
6884 #: ../en/ch06-collab.xml:875 6901 #: ../en/ch06-collab.xml:878
6885 msgid "" 6902 msgid ""
6886 "Configuring a web server is a complex, fiddly, and highly system-dependent " 6903 "Configuring a web server is a complex, fiddly, and highly system-dependent "
6887 "activity. I can't possibly give you instructions that will cover anything " 6904 "activity. I can't possibly give you instructions that will cover anything "
6888 "like all of the cases you will encounter. Please use your discretion and " 6905 "like all of the cases you will encounter. Please use your discretion and "
6889 "judgment in following the sections below. Be prepared to make plenty of " 6906 "judgment in following the sections below. Be prepared to make plenty of "
6890 "mistakes, and to spend a lot of time reading your server's error logs." 6907 "mistakes, and to spend a lot of time reading your server's error logs."
6891 msgstr "" 6908 msgstr ""
6892 6909
6893 #. type: Content of: <book><chapter><sect1><sect2><title> 6910 #. type: Content of: <book><chapter><sect1><sect2><title>
6894 #: ../en/ch06-collab.xml:885 6911 #: ../en/ch06-collab.xml:888
6895 msgid "Web server configuration checklist" 6912 msgid "Web server configuration checklist"
6896 msgstr "Web 服务器配置检查表" 6913 msgstr "Web 服务器配置检查表"
6897 6914
6898 #. type: Content of: <book><chapter><sect1><sect2><para> 6915 #. type: Content of: <book><chapter><sect1><sect2><para>
6899 #: ../en/ch06-collab.xml:887 6916 #: ../en/ch06-collab.xml:890
6900 msgid "" 6917 msgid ""
6901 "Before you continue, do take a few moments to check a few aspects of your " 6918 "Before you continue, do take a few moments to check a few aspects of your "
6902 "system's setup." 6919 "system's setup."
6903 msgstr "" 6920 msgstr ""
6904 6921
6905 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6922 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6906 #: ../en/ch06-collab.xml:891 6923 #: ../en/ch06-collab.xml:894
6907 msgid "" 6924 msgid ""
6908 "Do you have a web server installed at all? Mac OS X ships with Apache, but " 6925 "Do you have a web server installed at all? Mac OS X ships with Apache, but "
6909 "many other systems may not have a web server installed." 6926 "many other systems may not have a web server installed."
6910 msgstr "" 6927 msgstr ""
6911 6928
6912 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6929 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6913 #: ../en/ch06-collab.xml:895 6930 #: ../en/ch06-collab.xml:898
6914 msgid "" 6931 msgid ""
6915 "If you have a web server installed, is it actually running? On most systems, " 6932 "If you have a web server installed, is it actually running? On most systems, "
6916 "even if one is present, it will be disabled by default." 6933 "even if one is present, it will be disabled by default."
6917 msgstr "" 6934 msgstr ""
6918 6935
6919 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 6936 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
6920 #: ../en/ch06-collab.xml:899 6937 #: ../en/ch06-collab.xml:902
6921 msgid "" 6938 msgid ""
6922 "Is your server configured to allow you to run CGI programs in the directory " 6939 "Is your server configured to allow you to run CGI programs in the directory "
6923 "where you plan to do so? Most servers default to explicitly disabling the " 6940 "where you plan to do so? Most servers default to explicitly disabling the "
6924 "ability to run CGI programs." 6941 "ability to run CGI programs."
6925 msgstr "" 6942 msgstr ""
6926 6943
6927 #. type: Content of: <book><chapter><sect1><sect2><para> 6944 #. type: Content of: <book><chapter><sect1><sect2><para>
6928 #: ../en/ch06-collab.xml:905 6945 #: ../en/ch06-collab.xml:908
6929 msgid "" 6946 msgid ""
6930 "If you don't have a web server installed, and don't have substantial " 6947 "If you don't have a web server installed, and don't have substantial "
6931 "experience configuring Apache, you should consider using the " 6948 "experience configuring Apache, you should consider using the "
6932 "<literal>lighttpd</literal> web server instead of Apache. Apache has a well-" 6949 "<literal>lighttpd</literal> web server instead of Apache. Apache has a well-"
6933 "deserved reputation for baroque and confusing configuration. While " 6950 "deserved reputation for baroque and confusing configuration. While "
6936 "<literal>lighttpd</literal> is undeniably <emphasis>much</emphasis> easier to " 6953 "<literal>lighttpd</literal> is undeniably <emphasis>much</emphasis> easier to "
6937 "get started with than Apache." 6954 "get started with than Apache."
6938 msgstr "" 6955 msgstr ""
6939 6956
6940 #. type: Content of: <book><chapter><sect1><sect2><title> 6957 #. type: Content of: <book><chapter><sect1><sect2><title>
6941 #: ../en/ch06-collab.xml:918 6958 #: ../en/ch06-collab.xml:921
6942 msgid "Basic CGI configuration" 6959 msgid "Basic CGI configuration"
6943 msgstr "基本 CGI 配置" 6960 msgstr "基本 CGI 配置"
6944 6961
6945 #. type: Content of: <book><chapter><sect1><sect2><para> 6962 #. type: Content of: <book><chapter><sect1><sect2><para>
6946 #: ../en/ch06-collab.xml:920 6963 #: ../en/ch06-collab.xml:923
6947 msgid "" 6964 msgid ""
6948 "On Unix-like systems, it's common for users to have a subdirectory named " 6965 "On Unix-like systems, it's common for users to have a subdirectory named "
6949 "something like <filename class=\"directory\">public_html</filename> in their " 6966 "something like <filename class=\"directory\">public_html</filename> in their "
6950 "home directory, from which they can serve up web pages. A file named " 6967 "home directory, from which they can serve up web pages. A file named "
6951 "<filename>foo</filename> in this directory will be accessible at a URL of the " 6968 "<filename>foo</filename> in this directory will be accessible at a URL of the "
6952 "form <literal>http://www.example.com/\\ {</literal>username/foo}." 6969 "form <literal>http://www.example.com/\\ {</literal>username/foo}."
6953 msgstr "" 6970 msgstr ""
6954 6971
6955 #. type: Content of: <book><chapter><sect1><sect2><para> 6972 #. type: Content of: <book><chapter><sect1><sect2><para>
6956 #: ../en/ch06-collab.xml:929 6973 #: ../en/ch06-collab.xml:932
6957 msgid "" 6974 msgid ""
6958 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> " 6975 "To get started, find the <filename role=\"special\">hgweb.cgi</filename> "
6959 "script that should be present in your Mercurial installation. If you can't " 6976 "script that should be present in your Mercurial installation. If you can't "
6960 "quickly find a local copy on your system, simply download one from the master " 6977 "quickly find a local copy on your system, simply download one from the master "
6961 "Mercurial repository at <ulink url=\"http://www.selenic.com/repo/hg/raw-file/" 6978 "Mercurial repository at <ulink url=\"http://www.selenic.com/repo/hg/raw-file/"
6962 "tip/hgweb.cgi\">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>." 6979 "tip/hgweb.cgi\">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>."
6963 msgstr "" 6980 msgstr ""
6964 6981
6965 #. type: Content of: <book><chapter><sect1><sect2><para> 6982 #. type: Content of: <book><chapter><sect1><sect2><para>
6966 #: ../en/ch06-collab.xml:936 ../en/ch06-collab.xml:1109 6983 #: ../en/ch06-collab.xml:939 ../en/ch06-collab.xml:1112
6967 msgid "" 6984 msgid ""
6968 "You'll need to copy this script into your <filename class=\"directory" 6985 "You'll need to copy this script into your <filename class=\"directory"
6969 "\">public_html</filename> directory, and ensure that it's executable." 6986 "\">public_html</filename> directory, and ensure that it's executable."
6970 msgstr "" 6987 msgstr ""
6971 6988
6972 #. type: Content of: <book><chapter><sect1><sect2><para> 6989 #. type: Content of: <book><chapter><sect1><sect2><para>
6973 #: ../en/ch06-collab.xml:941 6990 #: ../en/ch06-collab.xml:944
6974 msgid "" 6991 msgid ""
6975 "The <literal>755</literal> argument to <command>chmod</command> is a little " 6992 "The <literal>755</literal> argument to <command>chmod</command> is a little "
6976 "more general than just making the script executable: it ensures that the " 6993 "more general than just making the script executable: it ensures that the "
6977 "script is executable by anyone, and that <quote>group</quote> and " 6994 "script is executable by anyone, and that <quote>group</quote> and "
6978 "<quote>other</quote> write permissions are <emphasis>not</emphasis> set. If " 6995 "<quote>other</quote> write permissions are <emphasis>not</emphasis> set. If "
6981 "<literal>suexec</literal> also insists that the <emphasis>directory</" 6998 "<literal>suexec</literal> also insists that the <emphasis>directory</"
6982 "emphasis> in which the script resides must not be writable by others." 6999 "emphasis> in which the script resides must not be writable by others."
6983 msgstr "" 7000 msgstr ""
6984 7001
6985 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7002 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
6986 #: ../en/ch06-collab.xml:955 7003 #: ../en/ch06-collab.xml:958
6987 msgid "What could <emphasis>possibly</emphasis> go wrong?" 7004 msgid "What could <emphasis>possibly</emphasis> go wrong?"
6988 msgstr "什么<emphasis>可能</emphasis>会出错?" 7005 msgstr "什么<emphasis>可能</emphasis>会出错?"
6989 7006
6990 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7007 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
6991 #: ../en/ch06-collab.xml:958 7008 #: ../en/ch06-collab.xml:961
6992 msgid "" 7009 msgid ""
6993 "Once you've copied the CGI script into place, go into a web browser, and try " 7010 "Once you've copied the CGI script into place, go into a web browser, and try "
6994 "to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://" 7011 "to open the URL <ulink url=\"http://myhostname/ myuser/hgweb.cgi\">http://"
6995 "myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself " 7012 "myhostname/ myuser/hgweb.cgi</ulink>, <emphasis>but</emphasis> brace yourself "
6996 "for instant failure. There's a high probability that trying to visit this " 7013 "for instant failure. There's a high probability that trying to visit this "
7000 "system running Fedora 7, with a fresh installation of Apache, and a user " 7017 "system running Fedora 7, with a fresh installation of Apache, and a user "
7001 "account that I created specially to perform this exercise." 7018 "account that I created specially to perform this exercise."
7002 msgstr "" 7019 msgstr ""
7003 7020
7004 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7021 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7005 #: ../en/ch06-collab.xml:972 7022 #: ../en/ch06-collab.xml:975
7006 msgid "" 7023 msgid ""
7007 "Your web server may have per-user directories disabled. If you're using " 7024 "Your web server may have per-user directories disabled. If you're using "
7008 "Apache, search your config file for a <literal>UserDir</literal> directive. " 7025 "Apache, search your config file for a <literal>UserDir</literal> directive. "
7009 "If there's none present, per-user directories will be disabled. If one " 7026 "If there's none present, per-user directories will be disabled. If one "
7010 "exists, but its value is <literal>disabled</literal>, then per-user " 7027 "exists, but its value is <literal>disabled</literal>, then per-user "
7013 "your home directory, for example <filename class=\"directory\">public_html</" 7030 "your home directory, for example <filename class=\"directory\">public_html</"
7014 "filename>." 7031 "filename>."
7015 msgstr "" 7032 msgstr ""
7016 7033
7017 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7034 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7018 #: ../en/ch06-collab.xml:983 7035 #: ../en/ch06-collab.xml:986
7019 msgid "" 7036 msgid ""
7020 "Your file access permissions may be too restrictive. The web server must be " 7037 "Your file access permissions may be too restrictive. The web server must be "
7021 "able to traverse your home directory and directories under your <filename " 7038 "able to traverse your home directory and directories under your <filename "
7022 "class=\"directory\">public_html</filename> directory, and read files under " 7039 "class=\"directory\">public_html</filename> directory, and read files under "
7023 "the latter too. Here's a quick recipe to help you to make your permissions " 7040 "the latter too. Here's a quick recipe to help you to make your permissions "
7024 "more appropriate." 7041 "more appropriate."
7025 msgstr "" 7042 msgstr ""
7026 7043
7027 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7044 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7028 #: ../en/ch06-collab.xml:993 7045 #: ../en/ch06-collab.xml:996
7029 msgid "" 7046 msgid ""
7030 "The other possibility with permissions is that you might get a completely " 7047 "The other possibility with permissions is that you might get a completely "
7031 "empty window when you try to load the script. In this case, it's likely that " 7048 "empty window when you try to load the script. In this case, it's likely that "
7032 "your access permissions are <emphasis>too permissive</emphasis>. Apache's " 7049 "your access permissions are <emphasis>too permissive</emphasis>. Apache's "
7033 "<literal>suexec</literal> subsystem won't execute a script that's group- or " 7050 "<literal>suexec</literal> subsystem won't execute a script that's group- or "
7034 "world-writable, for example." 7051 "world-writable, for example."
7035 msgstr "" 7052 msgstr ""
7036 7053
7037 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7054 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7038 #: ../en/ch06-collab.xml:1000 7055 #: ../en/ch06-collab.xml:1003
7039 msgid "" 7056 msgid ""
7040 "Your web server may be configured to disallow execution of CGI programs in " 7057 "Your web server may be configured to disallow execution of CGI programs in "
7041 "your per-user web directory. Here's Apache's default per-user configuration " 7058 "your per-user web directory. Here's Apache's default per-user configuration "
7042 "from my Fedora system." 7059 "from my Fedora system."
7043 msgstr "" 7060 msgstr ""
7044 7061
7045 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7062 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7046 #: ../en/ch06-collab.xml:1011 7063 #: ../en/ch06-collab.xml:1014
7047 msgid "" 7064 msgid ""
7048 "If you find a similar-looking <literal>Directory</literal> group in your " 7065 "If you find a similar-looking <literal>Directory</literal> group in your "
7049 "Apache configuration, the directive to look at inside it is <literal>Options</" 7066 "Apache configuration, the directive to look at inside it is <literal>Options</"
7050 "literal>. Add <literal>ExecCGI</literal> to the end of this list if it's " 7067 "literal>. Add <literal>ExecCGI</literal> to the end of this list if it's "
7051 "missing, and restart the web server." 7068 "missing, and restart the web server."
7052 msgstr "" 7069 msgstr ""
7053 7070
7054 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7071 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7055 #: ../en/ch06-collab.xml:1018 7072 #: ../en/ch06-collab.xml:1021
7056 msgid "" 7073 msgid ""
7057 "If you find that Apache serves you the text of the CGI script instead of " 7074 "If you find that Apache serves you the text of the CGI script instead of "
7058 "executing it, you may need to either uncomment (if already present) or add a " 7075 "executing it, you may need to either uncomment (if already present) or add a "
7059 "directive like this." 7076 "directive like this."
7060 msgstr "" 7077 msgstr ""
7061 7078
7062 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7079 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7063 #: ../en/ch06-collab.xml:1024 7080 #: ../en/ch06-collab.xml:1027
7064 msgid "" 7081 msgid ""
7065 "The next possibility is that you might be served with a colourful Python " 7082 "The next possibility is that you might be served with a colourful Python "
7066 "backtrace claiming that it can't import a <literal>mercurial</literal>-" 7083 "backtrace claiming that it can't import a <literal>mercurial</literal>-"
7067 "related module. This is actually progress! The server is now capable of " 7084 "related module. This is actually progress! The server is now capable of "
7068 "executing your CGI script. This error is only likely to occur if you're " 7085 "executing your CGI script. This error is only likely to occur if you're "
7073 "\"special\">hgweb.cgi</filename> and follow the directions inside it to " 7090 "\"special\">hgweb.cgi</filename> and follow the directions inside it to "
7074 "correctly set your <envar>PYTHONPATH</envar> environment variable." 7091 "correctly set your <envar>PYTHONPATH</envar> environment variable."
7075 msgstr "" 7092 msgstr ""
7076 7093
7077 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7094 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7078 #: ../en/ch06-collab.xml:1038 7095 #: ../en/ch06-collab.xml:1041
7079 msgid "" 7096 msgid ""
7080 "Finally, you are <emphasis>certain</emphasis> to by served with another " 7097 "Finally, you are <emphasis>certain</emphasis> to by served with another "
7081 "colourful Python backtrace: this one will complain that it can't find " 7098 "colourful Python backtrace: this one will complain that it can't find "
7082 "<filename class=\"directory\">/path/to/repository</filename>. Edit your " 7099 "<filename class=\"directory\">/path/to/repository</filename>. Edit your "
7083 "<filename role=\"special\">hgweb.cgi</filename> script and replace the " 7100 "<filename role=\"special\">hgweb.cgi</filename> script and replace the "
7084 "<filename class=\"directory\">/path/to/repository</filename> string with the " 7101 "<filename class=\"directory\">/path/to/repository</filename> string with the "
7085 "complete path to the repository you want to serve up." 7102 "complete path to the repository you want to serve up."
7086 msgstr "" 7103 msgstr ""
7087 7104
7088 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7105 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7089 #: ../en/ch06-collab.xml:1048 7106 #: ../en/ch06-collab.xml:1051
7090 msgid "" 7107 msgid ""
7091 "At this point, when you try to reload the page, you should be presented with " 7108 "At this point, when you try to reload the page, you should be presented with "
7092 "a nice HTML view of your repository's history. Whew!" 7109 "a nice HTML view of your repository's history. Whew!"
7093 msgstr "" 7110 msgstr ""
7094 7111
7095 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7112 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7096 #: ../en/ch06-collab.xml:1054 7113 #: ../en/ch06-collab.xml:1057
7097 msgid "Configuring lighttpd" 7114 msgid "Configuring lighttpd"
7098 msgstr "配置 lighttpd" 7115 msgstr "配置 lighttpd"
7099 7116
7100 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7117 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7101 #: ../en/ch06-collab.xml:1056 7118 #: ../en/ch06-collab.xml:1059
7102 msgid "" 7119 msgid ""
7103 "To be exhaustive in my experiments, I tried configuring the increasingly " 7120 "To be exhaustive in my experiments, I tried configuring the increasingly "
7104 "popular <literal>lighttpd</literal> web server to serve the same repository " 7121 "popular <literal>lighttpd</literal> web server to serve the same repository "
7105 "as I described with Apache above. I had already overcome all of the problems " 7122 "as I described with Apache above. I had already overcome all of the problems "
7106 "I outlined with Apache, many of which are not server-specific. As a result, " 7123 "I outlined with Apache, many of which are not server-specific. As a result, "
7107 "I was fairly sure that my file and directory permissions were good, and that " 7124 "I was fairly sure that my file and directory permissions were good, and that "
7108 "my <filename role=\"special\">hgweb.cgi</filename> script was properly edited." 7125 "my <filename role=\"special\">hgweb.cgi</filename> script was properly edited."
7109 msgstr "" 7126 msgstr ""
7110 7127
7111 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7128 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7112 #: ../en/ch06-collab.xml:1066 7129 #: ../en/ch06-collab.xml:1069
7113 msgid "" 7130 msgid ""
7114 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the " 7131 "Once I had Apache running, getting <literal>lighttpd</literal> to serve the "
7115 "repository was a snap (in other words, even if you're trying to use " 7132 "repository was a snap (in other words, even if you're trying to use "
7116 "<literal>lighttpd</literal>, you should read the Apache section). I first " 7133 "<literal>lighttpd</literal>, you should read the Apache section). I first "
7117 "had to edit the <literal>mod_access</literal> section of its config file to " 7134 "had to edit the <literal>mod_access</literal> section of its config file to "
7119 "which were disabled by default on my system. I then added a few lines to the " 7136 "which were disabled by default on my system. I then added a few lines to the "
7120 "end of the config file, to configure these modules." 7137 "end of the config file, to configure these modules."
7121 msgstr "" 7138 msgstr ""
7122 7139
7123 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7140 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7124 #: ../en/ch06-collab.xml:1078 7141 #: ../en/ch06-collab.xml:1081
7125 msgid "" 7142 msgid ""
7126 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had " 7143 "With this done, <literal>lighttpd</literal> ran immediately for me. If I had "
7127 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly " 7144 "configured <literal>lighttpd</literal> before Apache, I'd almost certainly "
7128 "have run into many of the same system-level configuration problems as I did " 7145 "have run into many of the same system-level configuration problems as I did "
7129 "with Apache. However, I found <literal>lighttpd</literal> to be noticeably " 7146 "with Apache. However, I found <literal>lighttpd</literal> to be noticeably "
7130 "easier to configure than Apache, even though I've used Apache for over a " 7147 "easier to configure than Apache, even though I've used Apache for over a "
7131 "decade, and this was my first exposure to <literal>lighttpd</literal>." 7148 "decade, and this was my first exposure to <literal>lighttpd</literal>."
7132 msgstr "" 7149 msgstr ""
7133 7150
7134 #. type: Content of: <book><chapter><sect1><sect2><title> 7151 #. type: Content of: <book><chapter><sect1><sect2><title>
7135 #: ../en/ch06-collab.xml:1091 7152 #: ../en/ch06-collab.xml:1094
7136 msgid "Sharing multiple repositories with one CGI script" 7153 msgid "Sharing multiple repositories with one CGI script"
7137 msgstr "使用一个 CGI 脚本共享多个版本库" 7154 msgstr "使用一个 CGI 脚本共享多个版本库"
7138 7155
7139 #. type: Content of: <book><chapter><sect1><sect2><para> 7156 #. type: Content of: <book><chapter><sect1><sect2><para>
7140 #: ../en/ch06-collab.xml:1093 7157 #: ../en/ch06-collab.xml:1096
7141 msgid "" 7158 msgid ""
7142 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you " 7159 "The <filename role=\"special\">hgweb.cgi</filename> script only lets you "
7143 "publish a single repository, which is an annoying restriction. If you want " 7160 "publish a single repository, which is an annoying restriction. If you want "
7144 "to publish more than one without wracking yourself with multiple copies of " 7161 "to publish more than one without wracking yourself with multiple copies of "
7145 "the same script, each with different names, a better choice is to use the " 7162 "the same script, each with different names, a better choice is to use the "
7146 "<filename role=\"special\">hgwebdir.cgi</filename> script." 7163 "<filename role=\"special\">hgwebdir.cgi</filename> script."
7147 msgstr "" 7164 msgstr ""
7148 7165
7149 #. type: Content of: <book><chapter><sect1><sect2><para> 7166 #. type: Content of: <book><chapter><sect1><sect2><para>
7150 #: ../en/ch06-collab.xml:1101 7167 #: ../en/ch06-collab.xml:1104
7151 msgid "" 7168 msgid ""
7152 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> " 7169 "The procedure to configure <filename role=\"special\">hgwebdir.cgi</filename> "
7153 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</" 7170 "is only a little more involved than for <filename role=\"special\">hgweb.cgi</"
7154 "filename>. First, you must obtain a copy of the script. If you don't have " 7171 "filename>. First, you must obtain a copy of the script. If you don't have "
7155 "one handy, you can download a copy from the master Mercurial repository at " 7172 "one handy, you can download a copy from the master Mercurial repository at "
7156 "<ulink url=\"http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi" 7173 "<ulink url=\"http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi"
7157 "\">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>." 7174 "\">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>."
7158 msgstr "" 7175 msgstr ""
7159 7176
7160 #. type: Content of: <book><chapter><sect1><sect2><para> 7177 #. type: Content of: <book><chapter><sect1><sect2><para>
7161 #: ../en/ch06-collab.xml:1114 7178 #: ../en/ch06-collab.xml:1117
7162 msgid "" 7179 msgid ""
7163 "With basic configuration out of the way, try to visit <ulink url=\"http://" 7180 "With basic configuration out of the way, try to visit <ulink url=\"http://"
7164 "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</" 7181 "myhostname/ myuser/hgwebdir.cgi\">http://myhostname/ myuser/hgwebdir.cgi</"
7165 "ulink> in your browser. It should display an empty list of repositories. If " 7182 "ulink> in your browser. It should display an empty list of repositories. If "
7166 "you get a blank window or error message, try walking through the list of " 7183 "you get a blank window or error message, try walking through the list of "
7167 "potential problems in section <xref linkend=\"sec.collab.wtf\"/>." 7184 "potential problems in section <xref linkend=\"sec.collab.wtf\"/>."
7168 msgstr "" 7185 msgstr ""
7169 7186
7170 #. type: Content of: <book><chapter><sect1><sect2><para> 7187 #. type: Content of: <book><chapter><sect1><sect2><para>
7171 #: ../en/ch06-collab.xml:1123 7188 #: ../en/ch06-collab.xml:1126
7172 msgid "" 7189 msgid ""
7173 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an " 7190 "The <filename role=\"special\">hgwebdir.cgi</filename> script relies on an "
7174 "external configuration file. By default, it searches for a file named " 7191 "external configuration file. By default, it searches for a file named "
7175 "<filename role=\"special\">hgweb.config</filename> in the same directory as " 7192 "<filename role=\"special\">hgweb.config</filename> in the same directory as "
7176 "itself. You'll need to create this file, and make it world-readable. The " 7193 "itself. You'll need to create this file, and make it world-readable. The "
7178 "understood by Python's <literal>ConfigParser</literal> <citation>web:" 7195 "understood by Python's <literal>ConfigParser</literal> <citation>web:"
7179 "configparser</citation> module." 7196 "configparser</citation> module."
7180 msgstr "" 7197 msgstr ""
7181 7198
7182 #. type: Content of: <book><chapter><sect1><sect2><para> 7199 #. type: Content of: <book><chapter><sect1><sect2><para>
7183 #: ../en/ch06-collab.xml:1133 7200 #: ../en/ch06-collab.xml:1136
7184 msgid "" 7201 msgid ""
7185 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</" 7202 "The easiest way to configure <filename role=\"special\">hgwebdir.cgi</"
7186 "filename> is with a section named <literal>collections</literal>. This will " 7203 "filename> is with a section named <literal>collections</literal>. This will "
7187 "automatically publish <emphasis>every</emphasis> repository under the " 7204 "automatically publish <emphasis>every</emphasis> repository under the "
7188 "directories you name. The section should look like this:" 7205 "directories you name. The section should look like this:"
7189 msgstr "" 7206 msgstr ""
7190 7207
7191 #. type: Content of: <book><chapter><sect1><sect2><para> 7208 #. type: Content of: <book><chapter><sect1><sect2><para>
7192 #: ../en/ch06-collab.xml:1141 7209 #: ../en/ch06-collab.xml:1144
7193 msgid "" 7210 msgid ""
7194 "Mercurial interprets this by looking at the directory name on the " 7211 "Mercurial interprets this by looking at the directory name on the "
7195 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></" 7212 "<emphasis>right</emphasis> hand side of the <quote><literal>=</literal></"
7196 "quote> sign; finding repositories in that directory hierarchy; and using the " 7213 "quote> sign; finding repositories in that directory hierarchy; and using the "
7197 "text on the <emphasis>left</emphasis> to strip off matching text from the " 7214 "text on the <emphasis>left</emphasis> to strip off matching text from the "
7199 "a path after this stripping has occurred is called a <quote>virtual path</" 7216 "a path after this stripping has occurred is called a <quote>virtual path</"
7200 "quote>." 7217 "quote>."
7201 msgstr "" 7218 msgstr ""
7202 7219
7203 #. type: Content of: <book><chapter><sect1><sect2><para> 7220 #. type: Content of: <book><chapter><sect1><sect2><para>
7204 #: ../en/ch06-collab.xml:1150 7221 #: ../en/ch06-collab.xml:1153
7205 msgid "" 7222 msgid ""
7206 "Given the example above, if we have a repository whose local path is " 7223 "Given the example above, if we have a repository whose local path is "
7207 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script " 7224 "<filename class=\"directory\">/my/root/this/repo</filename>, the CGI script "
7208 "will strip the leading <filename class=\"directory\">/my/root</filename> from " 7225 "will strip the leading <filename class=\"directory\">/my/root</filename> from "
7209 "the name, and publish the repository with a virtual path of <filename class=" 7226 "the name, and publish the repository with a virtual path of <filename class="
7213 "<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://" 7230 "<ulink url=\"http://myhostname/ myuser/hgwebdir.cgi/this/repo\">http://"
7214 "myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>." 7231 "myhostname/ myuser/hgwebdir.cgi/this/repo</ulink>."
7215 msgstr "" 7232 msgstr ""
7216 7233
7217 #. type: Content of: <book><chapter><sect1><sect2><para> 7234 #. type: Content of: <book><chapter><sect1><sect2><para>
7218 #: ../en/ch06-collab.xml:1164 7235 #: ../en/ch06-collab.xml:1167
7219 msgid "" 7236 msgid ""
7220 "If we replace <filename class=\"directory\">/my/root</filename> on the left " 7237 "If we replace <filename class=\"directory\">/my/root</filename> on the left "
7221 "hand side of this example with <filename class=\"directory\">/my</filename>, " 7238 "hand side of this example with <filename class=\"directory\">/my</filename>, "
7222 "then <filename role=\"special\">hgwebdir.cgi</filename> will only strip off " 7239 "then <filename role=\"special\">hgwebdir.cgi</filename> will only strip off "
7223 "<filename class=\"directory\">/my</filename> from the repository name, and " 7240 "<filename class=\"directory\">/my</filename> from the repository name, and "
7224 "will give us a virtual path of <filename class=\"directory\">root/this/repo</" 7241 "will give us a virtual path of <filename class=\"directory\">root/this/repo</"
7225 "filename> instead of <filename class=\"directory\">this/repo</filename>." 7242 "filename> instead of <filename class=\"directory\">this/repo</filename>."
7226 msgstr "" 7243 msgstr ""
7227 7244
7228 #. type: Content of: <book><chapter><sect1><sect2><para> 7245 #. type: Content of: <book><chapter><sect1><sect2><para>
7229 #: ../en/ch06-collab.xml:1174 7246 #: ../en/ch06-collab.xml:1177
7230 msgid "" 7247 msgid ""
7231 "The <filename role=\"special\">hgwebdir.cgi</filename> script will " 7248 "The <filename role=\"special\">hgwebdir.cgi</filename> script will "
7232 "recursively search each directory listed in the <literal>collections</" 7249 "recursively search each directory listed in the <literal>collections</"
7233 "literal> section of its configuration file, but it will <literal>not</" 7250 "literal> section of its configuration file, but it will <literal>not</"
7234 "literal> recurse into the repositories it finds." 7251 "literal> recurse into the repositories it finds."
7235 msgstr "" 7252 msgstr ""
7236 7253
7237 #. type: Content of: <book><chapter><sect1><sect2><para> 7254 #. type: Content of: <book><chapter><sect1><sect2><para>
7238 #: ../en/ch06-collab.xml:1180 7255 #: ../en/ch06-collab.xml:1183
7239 msgid "" 7256 msgid ""
7240 "The <literal>collections</literal> mechanism makes it easy to publish many " 7257 "The <literal>collections</literal> mechanism makes it easy to publish many "
7241 "repositories in a <quote>fire and forget</quote> manner. You only need to " 7258 "repositories in a <quote>fire and forget</quote> manner. You only need to "
7242 "set up the CGI script and configuration file one time. Afterwards, you can " 7259 "set up the CGI script and configuration file one time. Afterwards, you can "
7243 "publish or unpublish a repository at any time by simply moving it into, or " 7260 "publish or unpublish a repository at any time by simply moving it into, or "
7244 "out of, the directory hierarchy in which you've configured <filename role=" 7261 "out of, the directory hierarchy in which you've configured <filename role="
7245 "\"special\">hgwebdir.cgi</filename> to look." 7262 "\"special\">hgwebdir.cgi</filename> to look."
7246 msgstr "" 7263 msgstr ""
7247 7264
7248 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7265 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7249 #: ../en/ch06-collab.xml:1190 7266 #: ../en/ch06-collab.xml:1193
7250 msgid "Explicitly specifying which repositories to publish" 7267 msgid "Explicitly specifying which repositories to publish"
7251 msgstr "明确指出要发布的版本库" 7268 msgstr "明确指出要发布的版本库"
7252 7269
7253 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7270 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7254 #: ../en/ch06-collab.xml:1193 7271 #: ../en/ch06-collab.xml:1196
7255 msgid "" 7272 msgid ""
7256 "In addition to the <literal>collections</literal> mechanism, the <filename " 7273 "In addition to the <literal>collections</literal> mechanism, the <filename "
7257 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a " 7274 "role=\"special\">hgwebdir.cgi</filename> script allows you to publish a "
7258 "specific list of repositories. To do so, create a <literal>paths</literal> " 7275 "specific list of repositories. To do so, create a <literal>paths</literal> "
7259 "section, with contents of the following form." 7276 "section, with contents of the following form."
7260 msgstr "" 7277 msgstr ""
7261 7278
7262 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7279 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7263 #: ../en/ch06-collab.xml:1201 7280 #: ../en/ch06-collab.xml:1204
7264 msgid "" 7281 msgid ""
7265 "In this case, the virtual path (the component that will appear in a URL) is " 7282 "In this case, the virtual path (the component that will appear in a URL) is "
7266 "on the left hand side of each definition, while the path to the repository is " 7283 "on the left hand side of each definition, while the path to the repository is "
7267 "on the right. Notice that there does not need to be any relationship between " 7284 "on the right. Notice that there does not need to be any relationship between "
7268 "the virtual path you choose and the location of a repository in your " 7285 "the virtual path you choose and the location of a repository in your "
7269 "filesystem." 7286 "filesystem."
7270 msgstr "" 7287 msgstr ""
7271 7288
7272 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7289 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7273 #: ../en/ch06-collab.xml:1208 7290 #: ../en/ch06-collab.xml:1211
7274 msgid "" 7291 msgid ""
7275 "If you wish, you can use both the <literal>collections</literal> and " 7292 "If you wish, you can use both the <literal>collections</literal> and "
7276 "<literal>paths</literal> mechanisms simultaneously in a single configuration " 7293 "<literal>paths</literal> mechanisms simultaneously in a single configuration "
7277 "file." 7294 "file."
7278 msgstr "" 7295 msgstr ""
7279 7296
7280 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para> 7297 #. type: Content of: <book><chapter><sect1><sect2><sect3><note><para>
7281 #: ../en/ch06-collab.xml:1214 7298 #: ../en/ch06-collab.xml:1217
7282 msgid "" 7299 msgid ""
7283 "If multiple repositories have the same virtual path, <filename role=\"special" 7300 "If multiple repositories have the same virtual path, <filename role=\"special"
7284 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave " 7301 "\">hgwebdir.cgi</filename> will not report an error. Instead, it will behave "
7285 "unpredictably." 7302 "unpredictably."
7286 msgstr "" 7303 msgstr ""
7287 7304
7288 #. type: Content of: <book><chapter><sect1><sect2><title> 7305 #. type: Content of: <book><chapter><sect1><sect2><title>
7289 #: ../en/ch06-collab.xml:1223 7306 #: ../en/ch06-collab.xml:1226
7290 msgid "Downloading source archives" 7307 msgid "Downloading source archives"
7291 msgstr "下载源代码档案包" 7308 msgstr "下载源代码档案包"
7292 7309
7293 #. type: Content of: <book><chapter><sect1><sect2><para> 7310 #. type: Content of: <book><chapter><sect1><sect2><para>
7294 #: ../en/ch06-collab.xml:1225 7311 #: ../en/ch06-collab.xml:1228
7295 msgid "" 7312 msgid ""
7296 "Mercurial's web interface lets users download an archive of any revision. " 7313 "Mercurial's web interface lets users download an archive of any revision. "
7297 "This archive will contain a snapshot of the working directory as of that " 7314 "This archive will contain a snapshot of the working directory as of that "
7298 "revision, but it will not contain a copy of the repository data." 7315 "revision, but it will not contain a copy of the repository data."
7299 msgstr "" 7316 msgstr ""
7300 7317
7301 #. type: Content of: <book><chapter><sect1><sect2><para> 7318 #. type: Content of: <book><chapter><sect1><sect2><para>
7302 #: ../en/ch06-collab.xml:1230 7319 #: ../en/ch06-collab.xml:1233
7303 msgid "" 7320 msgid ""
7304 "By default, this feature is not enabled. To enable it, you'll need to add an " 7321 "By default, this feature is not enabled. To enable it, you'll need to add an "
7305 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role=" 7322 "<envar role=\"rc-item-web\">allow_archive</envar> item to the <literal role="
7306 "\"rc-web\">web</literal> section of your <filename role=\"special\"> /.hgrc</" 7323 "\"rc-web\">web</literal> section of your <filename role=\"special\"> /.hgrc</"
7307 "filename>." 7324 "filename>."
7308 msgstr "" 7325 msgstr ""
7309 7326
7310 #. type: Content of: <book><chapter><sect1><sect2><title> 7327 #. type: Content of: <book><chapter><sect1><sect2><title>
7311 #: ../en/ch06-collab.xml:1238 7328 #: ../en/ch06-collab.xml:1241
7312 msgid "Web configuration options" 7329 msgid "Web configuration options"
7313 msgstr "Web 配置选项" 7330 msgstr "Web 配置选项"
7314 7331
7315 #. type: Content of: <book><chapter><sect1><sect2><para> 7332 #. type: Content of: <book><chapter><sect1><sect2><para>
7316 #: ../en/ch06-collab.xml:1240 7333 #: ../en/ch06-collab.xml:1243
7317 msgid "" 7334 msgid ""
7318 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> " 7335 "Mercurial's web interfaces (the <command role=\"hg-cmd\">hg serve</command> "
7319 "command, and the <filename role=\"special\">hgweb.cgi</filename> and " 7336 "command, and the <filename role=\"special\">hgweb.cgi</filename> and "
7320 "<filename role=\"special\">hgwebdir.cgi</filename> scripts) have a number of " 7337 "<filename role=\"special\">hgwebdir.cgi</filename> scripts) have a number of "
7321 "configuration options that you can set. These belong in a section named " 7338 "configuration options that you can set. These belong in a section named "
7322 "<literal role=\"rc-web\">web</literal>." 7339 "<literal role=\"rc-web\">web</literal>."
7323 msgstr "" 7340 msgstr ""
7324 7341
7325 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7342 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7326 #: ../en/ch06-collab.xml:1248 7343 #: ../en/ch06-collab.xml:1251
7327 msgid "" 7344 msgid ""
7328 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) " 7345 "<envar role=\"rc-item-web\">allow_archive</envar>: Determines which (if any) "
7329 "archive download mechanisms Mercurial supports. If you enable this feature, " 7346 "archive download mechanisms Mercurial supports. If you enable this feature, "
7330 "users of the web interface will be able to download an archive of whatever " 7347 "users of the web interface will be able to download an archive of whatever "
7331 "revision of a repository they are viewing. To enable the archive feature, " 7348 "revision of a repository they are viewing. To enable the archive feature, "
7332 "this item must take the form of a sequence of words drawn from the list below." 7349 "this item must take the form of a sequence of words drawn from the list below."
7333 msgstr "" 7350 msgstr ""
7334 7351
7335 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7352 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7336 #: ../en/ch06-collab.xml:1257 7353 #: ../en/ch06-collab.xml:1260
7337 msgid "" 7354 msgid ""
7338 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using " 7355 "<literal>bz2</literal>: A <command>tar</command> archive, compressed using "
7339 "<literal>bzip2</literal> compression. This has the best compression ratio, " 7356 "<literal>bzip2</literal> compression. This has the best compression ratio, "
7340 "but uses the most CPU time on the server." 7357 "but uses the most CPU time on the server."
7341 msgstr "" 7358 msgstr ""
7342 7359
7343 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7360 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7344 #: ../en/ch06-collab.xml:1263 7361 #: ../en/ch06-collab.xml:1266
7345 msgid "" 7362 msgid ""
7346 "<literal>gz</literal>: A <command>tar</command> archive, compressed using " 7363 "<literal>gz</literal>: A <command>tar</command> archive, compressed using "
7347 "<literal>gzip</literal> compression." 7364 "<literal>gzip</literal> compression."
7348 msgstr "" 7365 msgstr ""
7349 7366
7350 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para> 7367 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><itemizedlist><listitem><para>
7351 #: ../en/ch06-collab.xml:1267 7368 #: ../en/ch06-collab.xml:1270
7352 msgid "" 7369 msgid ""
7353 "<literal>zip</literal>: A <command>zip</command> archive, compressed using " 7370 "<literal>zip</literal>: A <command>zip</command> archive, compressed using "
7354 "LZW compression. This format has the worst compression ratio, but is widely " 7371 "LZW compression. This format has the worst compression ratio, but is widely "
7355 "used in the Windows world." 7372 "used in the Windows world."
7356 msgstr "" 7373 msgstr ""
7357 7374
7358 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7375 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7359 #: ../en/ch06-collab.xml:1273 7376 #: ../en/ch06-collab.xml:1276
7360 msgid "" 7377 msgid ""
7361 "If you provide an empty list, or don't have an <envar role=\"rc-item-web" 7378 "If you provide an empty list, or don't have an <envar role=\"rc-item-web"
7362 "\">allow_archive</envar> entry at all, this feature will be disabled. Here " 7379 "\">allow_archive</envar> entry at all, this feature will be disabled. Here "
7363 "is an example of how to enable all three supported formats." 7380 "is an example of how to enable all three supported formats."
7364 msgstr "" 7381 msgstr ""
7365 7382
7366 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7383 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7367 #: ../en/ch06-collab.xml:1280 7384 #: ../en/ch06-collab.xml:1283
7368 msgid "" 7385 msgid ""
7369 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether " 7386 "<envar role=\"rc-item-web\">allowpull</envar>: Boolean. Determines whether "
7370 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</" 7387 "the web interface allows remote users to <command role=\"hg-cmd\">hg pull</"
7371 "command> and <command role=\"hg-cmd\">hg clone</command> this repository over " 7388 "command> and <command role=\"hg-cmd\">hg clone</command> this repository over "
7372 "HTTP. If set to <literal>no</literal> or <literal>false</literal>, only the " 7389 "HTTP. If set to <literal>no</literal> or <literal>false</literal>, only the "
7373 "<quote>human-oriented</quote> portion of the web interface is available." 7390 "<quote>human-oriented</quote> portion of the web interface is available."
7374 msgstr "" 7391 msgstr ""
7375 7392
7376 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7393 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7377 #: ../en/ch06-collab.xml:1289 7394 #: ../en/ch06-collab.xml:1292
7378 msgid "" 7395 msgid ""
7379 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but " 7396 "<envar role=\"rc-item-web\">contact</envar>: String. A free-form (but "
7380 "preferably brief) string identifying the person or group in charge of the " 7397 "preferably brief) string identifying the person or group in charge of the "
7381 "repository. This often contains the name and email address of a person or " 7398 "repository. This often contains the name and email address of a person or "
7382 "mailing list. It often makes sense to place this entry in a repository's own " 7399 "mailing list. It often makes sense to place this entry in a repository's own "
7384 "use in a global <filename role=\"special\"> /.hgrc</filename>\\ if every " 7401 "use in a global <filename role=\"special\"> /.hgrc</filename>\\ if every "
7385 "repository has a single maintainer." 7402 "repository has a single maintainer."
7386 msgstr "" 7403 msgstr ""
7387 7404
7388 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7405 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7389 #: ../en/ch06-collab.xml:1300 7406 #: ../en/ch06-collab.xml:1303
7390 msgid "" 7407 msgid ""
7391 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum " 7408 "<envar role=\"rc-item-web\">maxchanges</envar>: Integer. The default maximum "
7392 "number of changesets to display in a single page of output." 7409 "number of changesets to display in a single page of output."
7393 msgstr "" 7410 msgstr ""
7394 7411
7395 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7412 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7396 #: ../en/ch06-collab.xml:1304 7413 #: ../en/ch06-collab.xml:1307
7397 msgid "" 7414 msgid ""
7398 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum " 7415 "<envar role=\"rc-item-web\">maxfiles</envar>: Integer. The default maximum "
7399 "number of modified files to display in a single page of output." 7416 "number of modified files to display in a single page of output."
7400 msgstr "" 7417 msgstr ""
7401 7418
7402 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7419 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7403 #: ../en/ch06-collab.xml:1308 7420 #: ../en/ch06-collab.xml:1311
7404 msgid "" 7421 msgid ""
7405 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface " 7422 "<envar role=\"rc-item-web\">stripes</envar>: Integer. If the web interface "
7406 "displays alternating <quote>stripes</quote> to make it easier to visually " 7423 "displays alternating <quote>stripes</quote> to make it easier to visually "
7407 "align rows when you are looking at a table, this number controls the number " 7424 "align rows when you are looking at a table, this number controls the number "
7408 "of rows in each stripe." 7425 "of rows in each stripe."
7409 msgstr "" 7426 msgstr ""
7410 7427
7411 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7428 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7412 #: ../en/ch06-collab.xml:1314 7429 #: ../en/ch06-collab.xml:1317
7413 msgid "" 7430 msgid ""
7414 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial " 7431 "<envar role=\"rc-item-web\">style</envar>: Controls the template Mercurial "
7415 "uses to display the web interface. Mercurial ships with two web templates, " 7432 "uses to display the web interface. Mercurial ships with two web templates, "
7416 "named <literal>default</literal> and <literal>gitweb</literal> (the latter is " 7433 "named <literal>default</literal> and <literal>gitweb</literal> (the latter is "
7417 "much more visually attractive). You can also specify a custom template of " 7434 "much more visually attractive). You can also specify a custom template of "
7418 "your own; see chapter <xref linkend=\"chap.template\"/> for details. Here, " 7435 "your own; see chapter <xref linkend=\"chap.template\"/> for details. Here, "
7419 "you can see how to enable the <literal>gitweb</literal> style." 7436 "you can see how to enable the <literal>gitweb</literal> style."
7420 msgstr "" 7437 msgstr ""
7421 7438
7422 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 7439 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
7423 #: ../en/ch06-collab.xml:1325 7440 #: ../en/ch06-collab.xml:1328
7424 msgid "" 7441 msgid ""
7425 "<envar role=\"rc-item-web\">templates</envar>: Path. The directory in which " 7442 "<envar role=\"rc-item-web\">templates</envar>: Path. The directory in which "
7426 "to search for template files. By default, Mercurial searches in the " 7443 "to search for template files. By default, Mercurial searches in the "
7427 "directory in which it was installed." 7444 "directory in which it was installed."
7428 msgstr "" 7445 msgstr ""
7429 7446
7430 #. type: Content of: <book><chapter><sect1><sect2><para> 7447 #. type: Content of: <book><chapter><sect1><sect2><para>
7431 #: ../en/ch06-collab.xml:1330 7448 #: ../en/ch06-collab.xml:1333
7432 msgid "" 7449 msgid ""
7433 "If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can " 7450 "If you are using <filename role=\"special\">hgwebdir.cgi</filename>, you can "
7434 "place a few configuration items in a <literal role=\"rc-web\">web</literal> " 7451 "place a few configuration items in a <literal role=\"rc-web\">web</literal> "
7435 "section of the <filename role=\"special\">hgweb.config</filename> file " 7452 "section of the <filename role=\"special\">hgweb.config</filename> file "
7436 "instead of a <filename role=\"special\"> /.hgrc</filename>\\ file, for " 7453 "instead of a <filename role=\"special\"> /.hgrc</filename>\\ file, for "
7437 "convenience. These items are <envar role=\"rc-item-web\">motd</envar> and " 7454 "convenience. These items are <envar role=\"rc-item-web\">motd</envar> and "
7438 "<envar role=\"rc-item-web\">style</envar>." 7455 "<envar role=\"rc-item-web\">style</envar>."
7439 msgstr "" 7456 msgstr ""
7440 7457
7441 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7458 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7442 #: ../en/ch06-collab.xml:1341 7459 #: ../en/ch06-collab.xml:1344
7443 msgid "Options specific to an individual repository" 7460 msgid "Options specific to an individual repository"
7444 msgstr "针对单个版本库的选项" 7461 msgstr "针对单个版本库的选项"
7445 7462
7446 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7463 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7447 #: ../en/ch06-collab.xml:1343 7464 #: ../en/ch06-collab.xml:1346
7448 msgid "" 7465 msgid ""
7449 "A few <literal role=\"rc-web\">web</literal> configuration items ought to be " 7466 "A few <literal role=\"rc-web\">web</literal> configuration items ought to be "
7450 "placed in a repository's local <filename role=\"special\">.hg/hgrc</" 7467 "placed in a repository's local <filename role=\"special\">.hg/hgrc</"
7451 "filename>, rather than a user's or global <filename role=\"special\"> /.hgrc</" 7468 "filename>, rather than a user's or global <filename role=\"special\"> /.hgrc</"
7452 "filename>." 7469 "filename>."
7453 msgstr "" 7470 msgstr ""
7454 7471
7455 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7472 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7456 #: ../en/ch06-collab.xml:1349 7473 #: ../en/ch06-collab.xml:1352
7457 msgid "" 7474 msgid ""
7458 "<envar role=\"rc-item-web\">description</envar>: String. A free-form (but " 7475 "<envar role=\"rc-item-web\">description</envar>: String. A free-form (but "
7459 "preferably brief) string that describes the contents or purpose of the " 7476 "preferably brief) string that describes the contents or purpose of the "
7460 "repository." 7477 "repository."
7461 msgstr "" 7478 msgstr ""
7462 7479
7463 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7480 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7464 #: ../en/ch06-collab.xml:1354 7481 #: ../en/ch06-collab.xml:1357
7465 msgid "" 7482 msgid ""
7466 "<envar role=\"rc-item-web\">name</envar>: String. The name to use for the " 7483 "<envar role=\"rc-item-web\">name</envar>: String. The name to use for the "
7467 "repository in the web interface. This overrides the default name, which is " 7484 "repository in the web interface. This overrides the default name, which is "
7468 "the last component of the repository's path." 7485 "the last component of the repository's path."
7469 msgstr "" 7486 msgstr ""
7470 7487
7471 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7488 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7472 #: ../en/ch06-collab.xml:1362 7489 #: ../en/ch06-collab.xml:1365
7473 msgid "" 7490 msgid ""
7474 "Options specific to the <command role=\"hg-cmd\">hg serve</command> command" 7491 "Options specific to the <command role=\"hg-cmd\">hg serve</command> command"
7475 msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项" 7492 msgstr "命令 <command role=\"hg-cmd\">hg serve</command> 的选项"
7476 7493
7477 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7494 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7478 #: ../en/ch06-collab.xml:1365 7495 #: ../en/ch06-collab.xml:1368
7479 msgid "" 7496 msgid ""
7480 "Some of the items in the <literal role=\"rc-web\">web</literal> section of a " 7497 "Some of the items in the <literal role=\"rc-web\">web</literal> section of a "
7481 "<filename role=\"special\"> /.hgrc</filename>\\ file are only for use with " 7498 "<filename role=\"special\"> /.hgrc</filename>\\ file are only for use with "
7482 "the <command role=\"hg-cmd\">hg serve</command> command." 7499 "the <command role=\"hg-cmd\">hg serve</command> command."
7483 msgstr "" 7500 msgstr ""
7484 7501
7485 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7502 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7486 #: ../en/ch06-collab.xml:1371 7503 #: ../en/ch06-collab.xml:1374
7487 msgid "" 7504 msgid ""
7488 "<envar role=\"rc-item-web\">accesslog</envar>: Path. The name of a file into " 7505 "<envar role=\"rc-item-web\">accesslog</envar>: Path. The name of a file into "
7489 "which to write an access log. By default, the <command role=\"hg-cmd\">hg " 7506 "which to write an access log. By default, the <command role=\"hg-cmd\">hg "
7490 "serve</command> command writes this information to standard output, not to a " 7507 "serve</command> command writes this information to standard output, not to a "
7491 "file. Log entries are written in the standard <quote>combined</quote> file " 7508 "file. Log entries are written in the standard <quote>combined</quote> file "
7492 "format used by almost all web servers." 7509 "format used by almost all web servers."
7493 msgstr "" 7510 msgstr ""
7494 7511
7495 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7512 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7496 #: ../en/ch06-collab.xml:1379 7513 #: ../en/ch06-collab.xml:1382
7497 msgid "" 7514 msgid ""
7498 "<envar role=\"rc-item-web\">address</envar>: String. The local address on " 7515 "<envar role=\"rc-item-web\">address</envar>: String. The local address on "
7499 "which the server should listen for incoming connections. By default, the " 7516 "which the server should listen for incoming connections. By default, the "
7500 "server listens on all addresses." 7517 "server listens on all addresses."
7501 msgstr "" 7518 msgstr ""
7502 7519
7503 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7520 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7504 #: ../en/ch06-collab.xml:1384 7521 #: ../en/ch06-collab.xml:1387
7505 msgid "" 7522 msgid ""
7506 "<envar role=\"rc-item-web\">errorlog</envar>: Path. The name of a file into " 7523 "<envar role=\"rc-item-web\">errorlog</envar>: Path. The name of a file into "
7507 "which to write an error log. By default, the <command role=\"hg-cmd\">hg " 7524 "which to write an error log. By default, the <command role=\"hg-cmd\">hg "
7508 "serve</command> command writes this information to standard error, not to a " 7525 "serve</command> command writes this information to standard error, not to a "
7509 "file." 7526 "file."
7510 msgstr "" 7527 msgstr ""
7511 7528
7512 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7529 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7513 #: ../en/ch06-collab.xml:1390 7530 #: ../en/ch06-collab.xml:1393
7514 msgid "" 7531 msgid ""
7515 "<envar role=\"rc-item-web\">ipv6</envar>: Boolean. Whether to use the IPv6 " 7532 "<envar role=\"rc-item-web\">ipv6</envar>: Boolean. Whether to use the IPv6 "
7516 "protocol. By default, IPv6 is not used." 7533 "protocol. By default, IPv6 is not used."
7517 msgstr "" 7534 msgstr ""
7518 7535
7519 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para> 7536 #. type: Content of: <book><chapter><sect1><sect2><sect3><itemizedlist><listitem><para>
7520 #: ../en/ch06-collab.xml:1394 7537 #: ../en/ch06-collab.xml:1397
7521 msgid "" 7538 msgid ""
7522 "<envar role=\"rc-item-web\">port</envar>: Integer. The TCP port number on " 7539 "<envar role=\"rc-item-web\">port</envar>: Integer. The TCP port number on "
7523 "which the server should listen. The default port number used is 8000." 7540 "which the server should listen. The default port number used is 8000."
7524 msgstr "" 7541 msgstr ""
7525 7542
7526 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 7543 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
7527 #: ../en/ch06-collab.xml:1401 7544 #: ../en/ch06-collab.xml:1404
7528 msgid "" 7545 msgid ""
7529 "Choosing the right <filename role=\"special\"> /.hgrc</filename>\\ file to " 7546 "Choosing the right <filename role=\"special\"> /.hgrc</filename>\\ file to "
7530 "add <literal role=\"rc-web\">web</literal> items to" 7547 "add <literal role=\"rc-web\">web</literal> items to"
7531 msgstr "" 7548 msgstr ""
7532 "选择正确的 <filename role=\"special\"> /.hgrc</filename> 文件增加到 <literal " 7549 "选择正确的 <filename role=\"special\"> /.hgrc</filename> 文件增加到 <literal "
7533 "role=\"rc-web\">web</literal> 条目" 7550 "role=\"rc-web\">web</literal> 条目"
7534 7551
7535 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7552 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7536 #: ../en/ch06-collab.xml:1405 7553 #: ../en/ch06-collab.xml:1408
7537 msgid "" 7554 msgid ""
7538 "It is important to remember that a web server like Apache or " 7555 "It is important to remember that a web server like Apache or "
7539 "<literal>lighttpd</literal> will run under a user ID that is different to " 7556 "<literal>lighttpd</literal> will run under a user ID that is different to "
7540 "yours. CGI scripts run by your server, such as <filename role=\"special" 7557 "yours. CGI scripts run by your server, such as <filename role=\"special"
7541 "\">hgweb.cgi</filename>, will usually also run under that user ID." 7558 "\">hgweb.cgi</filename>, will usually also run under that user ID."
7542 msgstr "" 7559 msgstr ""
7543 7560
7544 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 7561 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
7545 #: ../en/ch06-collab.xml:1412 7562 #: ../en/ch06-collab.xml:1415
7546 msgid "" 7563 msgid ""
7547 "If you add <literal role=\"rc-web\">web</literal> items to your own personal " 7564 "If you add <literal role=\"rc-web\">web</literal> items to your own personal "
7548 "<filename role=\"special\"> /.hgrc</filename>\\ file, CGI scripts won't read " 7565 "<filename role=\"special\"> /.hgrc</filename>\\ file, CGI scripts won't read "
7549 "that <filename role=\"special\"> /.hgrc</filename>\\ file. Those settings " 7566 "that <filename role=\"special\"> /.hgrc</filename>\\ file. Those settings "
7550 "will thus only affect the behaviour of the <command role=\"hg-cmd\">hg serve</" 7567 "will thus only affect the behaviour of the <command role=\"hg-cmd\">hg serve</"
9234 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg " 9251 "longer present. Taking a look at the output of <command role=\"hg-cmd\">hg "
9235 "log</command> gives us an idea of what the <command role=\"hg-cmd\">hg " 9252 "log</command> gives us an idea of what the <command role=\"hg-cmd\">hg "
9236 "backout</command> command has done. &interaction.backout.simple.log; Notice " 9253 "backout</command> command has done. &interaction.backout.simple.log; Notice "
9237 "that the new changeset that <command role=\"hg-cmd\">hg backout</command> has " 9254 "that the new changeset that <command role=\"hg-cmd\">hg backout</command> has "
9238 "created is a child of the changeset we backed out. It's easier to see this " 9255 "created is a child of the changeset we backed out. It's easier to see this "
9239 "in figure <xref linkend=\"fig.undo.backout\"/>, which presents a graphical " 9256 "in figure <xref endterm=\"fig.undo.backout.caption\" linkend=\"fig.undo."
9240 "view of the change history. As you can see, the history is nice and linear." 9257 "backout\"/>, which presents a graphical view of the change history. As you "
9258 "can see, the history is nice and linear."
9241 msgstr "" 9259 msgstr ""
9242 9260
9243 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9261 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
9244 #: ../en/ch09-undo.xml:362 9262 #: ../en/ch09-undo.xml:364
9245 msgid "" 9263 msgid ""
9246 "<imageobject><imagedata fileref=\"images/undo-simple.png\"/></imageobject>" 9264 "<imageobject><imagedata fileref=\"images/undo-simple.png\"/> </imageobject>"
9247 msgstr "" 9265 msgstr ""
9248 9266
9249 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 9267 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9250 #: ../en/ch09-undo.xml:364 ../en/ch09-undo.xml:477 9268 #: ../en/ch09-undo.xml:367 ../en/ch09-undo.xml:486
9251 msgid "" 9269 msgid ""
9252 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> " 9270 "Backing out a change using the <command role=\"hg-cmd\">hg backout</command> "
9253 "command" 9271 "command"
9254 msgstr "" 9272 msgstr ""
9255 9273
9256 #. type: Content of: <book><chapter><sect1><sect2><title> 9274 #. type: Content of: <book><chapter><sect1><sect2><title>
9257 #: ../en/ch09-undo.xml:373 9275 #: ../en/ch09-undo.xml:376
9258 msgid "Backing out a non-tip change" 9276 msgid "Backing out a non-tip change"
9259 msgstr "恢复非顶点的修改" 9277 msgstr "恢复非顶点的修改"
9260 9278
9261 #. type: Content of: <book><chapter><sect1><sect2><para> 9279 #. type: Content of: <book><chapter><sect1><sect2><para>
9262 #: ../en/ch09-undo.xml:375 9280 #: ../en/ch09-undo.xml:378
9263 msgid "" 9281 msgid ""
9264 "If you want to back out a change other than the last one you committed, pass " 9282 "If you want to back out a change other than the last one you committed, pass "
9265 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command " 9283 "the <option role=\"hg-opt-backout\">--merge</option> option to the <command "
9266 "role=\"hg-cmd\">hg backout</command> command." 9284 "role=\"hg-cmd\">hg backout</command> command."
9267 msgstr "" 9285 msgstr ""
9268 9286
9269 #. type: Content of: <book><chapter><sect1><sect2><para> 9287 #. type: Content of: <book><chapter><sect1><sect2><para>
9270 #: ../en/ch09-undo.xml:382 9288 #: ../en/ch09-undo.xml:385
9271 msgid "" 9289 msgid ""
9272 "This makes backing out any changeset a <quote>one-shot</quote> operation " 9290 "This makes backing out any changeset a <quote>one-shot</quote> operation "
9273 "that's usually simple and fast." 9291 "that's usually simple and fast."
9274 msgstr "" 9292 msgstr ""
9275 9293
9276 #. type: Content of: <book><chapter><sect1><sect2><para> 9294 #. type: Content of: <book><chapter><sect1><sect2><para>
9277 #: ../en/ch09-undo.xml:388 9295 #: ../en/ch09-undo.xml:391
9278 msgid "" 9296 msgid ""
9279 "If you take a look at the contents of <filename>myfile</filename> after the " 9297 "If you take a look at the contents of <filename>myfile</filename> after the "
9280 "backout finishes, you'll see that the first and third changes are present, " 9298 "backout finishes, you'll see that the first and third changes are present, "
9281 "but not the second." 9299 "but not the second."
9282 msgstr "" 9300 msgstr ""
9283 9301
9284 #. type: Content of: <book><chapter><sect1><sect2><para> 9302 #. type: Content of: <book><chapter><sect1><sect2><para>
9285 #: ../en/ch09-undo.xml:395 9303 #: ../en/ch09-undo.xml:398
9286 msgid "" 9304 msgid ""
9287 "As the graphical history in figure <xref linkend=\"fig.undo.backout-non-tip\"/" 9305 "As the graphical history in figure <xref endterm=\"fig.undo.backout-non-tip."
9288 "> illustrates, Mercurial actually commits <emphasis>two</emphasis> changes in " 9306 "caption\" linkend=\"fig.undo.backout-non-tip\"/> illustrates, Mercurial "
9289 "this kind of situation (the box-shaped nodes are the ones that Mercurial " 9307 "actually commits <emphasis>two</emphasis> changes in this kind of situation "
9290 "commits automatically). Before Mercurial begins the backout process, it " 9308 "(the box-shaped nodes are the ones that Mercurial commits automatically). "
9291 "first remembers what the current parent of the working directory is. It then " 9309 "Before Mercurial begins the backout process, it first remembers what the "
9292 "backs out the target changeset, and commits that as a changeset. Finally, it " 9310 "current parent of the working directory is. It then backs out the target "
9293 "merges back to the previous parent of the working directory, and commits the " 9311 "changeset, and commits that as a changeset. Finally, it merges back to the "
9294 "result of the merge." 9312 "previous parent of the working directory, and commits the result of the merge."
9295 msgstr "" 9313 msgstr ""
9296 9314
9297 #. type: Content of: <book><chapter><sect1><sect2><para> 9315 #. type: Content of: <book><chapter><sect1><sect2><para>
9298 #: ../en/ch09-undo.xml:406 9316 #: ../en/ch09-undo.xml:410
9299 msgid "" 9317 msgid ""
9300 "% TODO: to me it looks like mercurial doesn't commit the second merge " 9318 "% TODO: to me it looks like mercurial doesn't commit the second merge "
9301 "automatically!" 9319 "automatically!"
9302 msgstr "" 9320 msgstr ""
9303 9321
9304 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9322 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
9305 #: ../en/ch09-undo.xml:410 9323 #: ../en/ch09-undo.xml:415
9306 msgid "" 9324 msgid ""
9307 "<imageobject><imagedata fileref=\"images/undo-non-tip.png\"/></imageobject>" 9325 "<imageobject><imagedata fileref=\"images/undo-non-tip.png\"/> </imageobject>"
9308 msgstr "" 9326 msgstr ""
9309 9327
9310 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 9328 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9311 #: ../en/ch09-undo.xml:412 9329 #: ../en/ch09-undo.xml:418
9312 msgid "" 9330 msgid ""
9313 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg " 9331 "Automated backout of a non-tip change using the <command role=\"hg-cmd\">hg "
9314 "backout</command> command" 9332 "backout</command> command"
9315 msgstr "" 9333 msgstr ""
9316 9334
9317 #. type: Content of: <book><chapter><sect1><sect2><para> 9335 #. type: Content of: <book><chapter><sect1><sect2><para>
9318 #: ../en/ch09-undo.xml:418 9336 #: ../en/ch09-undo.xml:424
9319 msgid "" 9337 msgid ""
9320 "The result is that you end up <quote>back where you were</quote>, only with " 9338 "The result is that you end up <quote>back where you were</quote>, only with "
9321 "some extra history that undoes the effect of the changeset you wanted to back " 9339 "some extra history that undoes the effect of the changeset you wanted to back "
9322 "out." 9340 "out."
9323 msgstr "" 9341 msgstr ""
9324 9342
9325 #. type: Content of: <book><chapter><sect1><sect2><sect3><title> 9343 #. type: Content of: <book><chapter><sect1><sect2><sect3><title>
9326 #: ../en/ch09-undo.xml:423 9344 #: ../en/ch09-undo.xml:429
9327 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option" 9345 msgid "Always use the <option role=\"hg-opt-backout\">--merge</option> option"
9328 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>" 9346 msgstr "始终使用选项 <option role=\"hg-opt-backout\">--merge</option>"
9329 9347
9330 #. type: Content of: <book><chapter><sect1><sect2><sect3><para> 9348 #. type: Content of: <book><chapter><sect1><sect2><sect3><para>
9331 #: ../en/ch09-undo.xml:426 9349 #: ../en/ch09-undo.xml:432
9332 msgid "" 9350 msgid ""
9333 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option " 9351 "In fact, since the <option role=\"hg-opt-backout\">--merge</option> option "
9334 "will do the <quote>right thing</quote> whether or not the changeset you're " 9352 "will do the <quote>right thing</quote> whether or not the changeset you're "
9335 "backing out is the tip (i.e. it won't try to merge if it's backing out the " 9353 "backing out is the tip (i.e. it won't try to merge if it's backing out the "
9336 "tip, since there's no need), you should <emphasis>always</emphasis> use this " 9354 "tip, since there's no need), you should <emphasis>always</emphasis> use this "
9337 "option when you run the <command role=\"hg-cmd\">hg backout</command> command." 9355 "option when you run the <command role=\"hg-cmd\">hg backout</command> command."
9338 msgstr "" 9356 msgstr ""
9339 9357
9340 #. type: Content of: <book><chapter><sect1><sect2><title> 9358 #. type: Content of: <book><chapter><sect1><sect2><title>
9341 #: ../en/ch09-undo.xml:437 9359 #: ../en/ch09-undo.xml:443
9342 msgid "Gaining more control of the backout process" 9360 msgid "Gaining more control of the backout process"
9343 msgstr "在恢复处理中获得更多控制" 9361 msgstr "在恢复处理中获得更多控制"
9344 9362
9345 #. type: Content of: <book><chapter><sect1><sect2><para> 9363 #. type: Content of: <book><chapter><sect1><sect2><para>
9346 #: ../en/ch09-undo.xml:439 9364 #: ../en/ch09-undo.xml:445
9347 msgid "" 9365 msgid ""
9348 "While I've recommended that you always use the <option role=\"hg-opt-backout" 9366 "While I've recommended that you always use the <option role=\"hg-opt-backout"
9349 "\">--merge</option> option when backing out a change, the <command role=\"hg-" 9367 "\">--merge</option> option when backing out a change, the <command role=\"hg-"
9350 "cmd\">hg backout</command> command lets you decide how to merge a backout " 9368 "cmd\">hg backout</command> command lets you decide how to merge a backout "
9351 "changeset. Taking control of the backout process by hand is something you " 9369 "changeset. Taking control of the backout process by hand is something you "
9354 "To illustrate this, let's clone our first repository, but omit the backout " 9372 "To illustrate this, let's clone our first repository, but omit the backout "
9355 "change that it contains." 9373 "change that it contains."
9356 msgstr "" 9374 msgstr ""
9357 9375
9358 #. type: Content of: <book><chapter><sect1><sect2><para> 9376 #. type: Content of: <book><chapter><sect1><sect2><para>
9359 #: ../en/ch09-undo.xml:452 9377 #: ../en/ch09-undo.xml:458
9360 msgid "" 9378 msgid ""
9361 "As with our earlier example, We'll commit a third changeset, then back out " 9379 "As with our earlier example, We'll commit a third changeset, then back out "
9362 "its parent, and see what happens." 9380 "its parent, and see what happens."
9363 msgstr "" 9381 msgstr ""
9364 9382
9365 #. type: Content of: <book><chapter><sect1><sect2><para> 9383 #. type: Content of: <book><chapter><sect1><sect2><para>
9366 #: ../en/ch09-undo.xml:458 9384 #: ../en/ch09-undo.xml:464
9367 msgid "" 9385 msgid ""
9368 "Our new changeset is again a descendant of the changeset we backout out; it's " 9386 "Our new changeset is again a descendant of the changeset we backout out; it's "
9369 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that " 9387 "thus a new head, <emphasis>not</emphasis> a descendant of the changeset that "
9370 "was the tip. The <command role=\"hg-cmd\">hg backout</command> command was " 9388 "was the tip. The <command role=\"hg-cmd\">hg backout</command> command was "
9371 "quite explicit in telling us this." 9389 "quite explicit in telling us this."
9372 msgstr "" 9390 msgstr ""
9373 9391
9374 #. type: Content of: <book><chapter><sect1><sect2><para> 9392 #. type: Content of: <book><chapter><sect1><sect2><para>
9375 #: ../en/ch09-undo.xml:466 9393 #: ../en/ch09-undo.xml:472
9376 msgid "" 9394 msgid ""
9377 "Again, it's easier to see what has happened by looking at a graph of the " 9395 "Again, it's easier to see what has happened by looking at a graph of the "
9378 "revision history, in figure <xref linkend=\"fig.undo.backout-manual\"/>. " 9396 "revision history, in figure <xref endterm=\"fig.undo.backout-manual.caption\" "
9379 "This makes it clear that when we use <command role=\"hg-cmd\">hg backout</" 9397 "linkend=\"fig.undo.backout-manual\"/>. This makes it clear that when we use "
9380 "command> to back out a change other than the tip, Mercurial adds a new head " 9398 "<command role=\"hg-cmd\">hg backout</command> to back out a change other than "
9381 "to the repository (the change it committed is box-shaped)." 9399 "the tip, Mercurial adds a new head to the repository (the change it committed "
9400 "is box-shaped)."
9382 msgstr "" 9401 msgstr ""
9383 9402
9384 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9403 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
9385 #: ../en/ch09-undo.xml:475 9404 #: ../en/ch09-undo.xml:483
9386 msgid "" 9405 msgid ""
9387 "<imageobject><imagedata fileref=\"images/undo-manual.png\"/></imageobject>" 9406 "<imageobject><imagedata fileref=\"images/undo-manual.png\"/> </imageobject>"
9388 msgstr "" 9407 msgstr ""
9389 9408
9390 #. type: Content of: <book><chapter><sect1><sect2><para> 9409 #. type: Content of: <book><chapter><sect1><sect2><para>
9391 #: ../en/ch09-undo.xml:484 9410 #: ../en/ch09-undo.xml:492
9392 msgid "" 9411 msgid ""
9393 "After the <command role=\"hg-cmd\">hg backout</command> command has " 9412 "After the <command role=\"hg-cmd\">hg backout</command> command has "
9394 "completed, it leaves the new <quote>backout</quote> changeset as the parent " 9413 "completed, it leaves the new <quote>backout</quote> changeset as the parent "
9395 "of the working directory." 9414 "of the working directory."
9396 msgstr "" 9415 msgstr ""
9397 9416
9398 #. type: Content of: <book><chapter><sect1><sect2><para> 9417 #. type: Content of: <book><chapter><sect1><sect2><para>
9399 #: ../en/ch09-undo.xml:491 9418 #: ../en/ch09-undo.xml:499
9400 msgid "Now we have two isolated sets of changes." 9419 msgid "Now we have two isolated sets of changes."
9401 msgstr "" 9420 msgstr ""
9402 9421
9403 #. type: Content of: <book><chapter><sect1><sect2><para> 9422 #. type: Content of: <book><chapter><sect1><sect2><para>
9404 #: ../en/ch09-undo.xml:495 9423 #: ../en/ch09-undo.xml:503
9405 msgid "" 9424 msgid ""
9406 "Let's think about what we expect to see as the contents of <filename>myfile</" 9425 "Let's think about what we expect to see as the contents of <filename>myfile</"
9407 "filename> now. The first change should be present, because we've never " 9426 "filename> now. The first change should be present, because we've never "
9408 "backed it out. The second change should be missing, as that's the change we " 9427 "backed it out. The second change should be missing, as that's the change we "
9409 "backed out. Since the history graph shows the third change as a separate " 9428 "backed out. Since the history graph shows the third change as a separate "
9410 "head, we <emphasis>don't</emphasis> expect to see the third change present in " 9429 "head, we <emphasis>don't</emphasis> expect to see the third change present in "
9411 "<filename>myfile</filename>." 9430 "<filename>myfile</filename>."
9412 msgstr "" 9431 msgstr ""
9413 9432
9414 #. type: Content of: <book><chapter><sect1><sect2><para> 9433 #. type: Content of: <book><chapter><sect1><sect2><para>
9415 #: ../en/ch09-undo.xml:505 9434 #: ../en/ch09-undo.xml:513
9416 msgid "" 9435 msgid ""
9417 "To get the third change back into the file, we just do a normal merge of our " 9436 "To get the third change back into the file, we just do a normal merge of our "
9418 "two heads." 9437 "two heads."
9419 msgstr "" 9438 msgstr ""
9420 9439
9421 #. type: Content of: <book><chapter><sect1><sect2><para> 9440 #. type: Content of: <book><chapter><sect1><sect2><para>
9422 #: ../en/ch09-undo.xml:510 9441 #: ../en/ch09-undo.xml:518
9423 msgid "" 9442 msgid ""
9424 "Afterwards, the graphical history of our repository looks like figure <xref " 9443 "Afterwards, the graphical history of our repository looks like figure <xref "
9425 "linkend=\"fig.undo.backout-manual-merge\"/>." 9444 "endterm=\"fig.undo.backout-manual-merge.caption\" linkend=\"fig.undo.backout-"
9445 "manual-merge\"/>."
9426 msgstr "" 9446 msgstr ""
9427 9447
9428 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 9448 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
9429 #: ../en/ch09-undo.xml:515 9449 #: ../en/ch09-undo.xml:525
9430 msgid "" 9450 msgid ""
9431 "<imageobject><imagedata fileref=\"images/undo-manual-merge.png\"/></" 9451 "<imageobject><imagedata fileref=\"images/undo-manual-merge.png\"/> </"
9432 "imageobject>" 9452 "imageobject>"
9433 msgstr "" 9453 msgstr ""
9434 9454
9435 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 9455 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
9436 #: ../en/ch09-undo.xml:517 9456 #: ../en/ch09-undo.xml:528
9437 msgid "Manually merging a backout change" 9457 msgid "Manually merging a backout change"
9438 msgstr "" 9458 msgstr ""
9439 9459
9440 #. type: Content of: <book><chapter><sect1><sect2><title> 9460 #. type: Content of: <book><chapter><sect1><sect2><title>
9441 #: ../en/ch09-undo.xml:524 9461 #: ../en/ch09-undo.xml:535
9442 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does" 9462 msgid "Why <command role=\"hg-cmd\">hg backout</command> works as it does"
9443 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕" 9463 msgstr "<command role=\"hg-cmd\">hg backout</command> 的内幕"
9444 9464
9445 #. type: Content of: <book><chapter><sect1><sect2><para> 9465 #. type: Content of: <book><chapter><sect1><sect2><para>
9446 #: ../en/ch09-undo.xml:527 9466 #: ../en/ch09-undo.xml:538
9447 msgid "" 9467 msgid ""
9448 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</" 9468 "Here's a brief description of how the <command role=\"hg-cmd\">hg backout</"
9449 "command> command works." 9469 "command> command works."
9450 msgstr "" 9470 msgstr ""
9451 9471
9452 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9472 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9453 #: ../en/ch09-undo.xml:530 9473 #: ../en/ch09-undo.xml:541
9454 msgid "" 9474 msgid ""
9455 "It ensures that the working directory is <quote>clean</quote>, i.e. that the " 9475 "It ensures that the working directory is <quote>clean</quote>, i.e. that the "
9456 "output of <command role=\"hg-cmd\">hg status</command> would be empty." 9476 "output of <command role=\"hg-cmd\">hg status</command> would be empty."
9457 msgstr "" 9477 msgstr ""
9458 9478
9459 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9479 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9460 #: ../en/ch09-undo.xml:534 9480 #: ../en/ch09-undo.xml:545
9461 msgid "" 9481 msgid ""
9462 "It remembers the current parent of the working directory. Let's call this " 9482 "It remembers the current parent of the working directory. Let's call this "
9463 "changeset <literal>orig</literal>" 9483 "changeset <literal>orig</literal>"
9464 msgstr "" 9484 msgstr ""
9465 9485
9466 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9486 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9467 #: ../en/ch09-undo.xml:538 9487 #: ../en/ch09-undo.xml:549
9468 msgid "" 9488 msgid ""
9469 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to " 9489 "It does the equivalent of a <command role=\"hg-cmd\">hg update</command> to "
9470 "sync the working directory to the changeset you want to back out. Let's call " 9490 "sync the working directory to the changeset you want to back out. Let's call "
9471 "this changeset <literal>backout</literal>" 9491 "this changeset <literal>backout</literal>"
9472 msgstr "" 9492 msgstr ""
9473 9493
9474 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9494 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9475 #: ../en/ch09-undo.xml:543 9495 #: ../en/ch09-undo.xml:554
9476 msgid "" 9496 msgid ""
9477 "It finds the parent of that changeset. Let's call that changeset " 9497 "It finds the parent of that changeset. Let's call that changeset "
9478 "<literal>parent</literal>." 9498 "<literal>parent</literal>."
9479 msgstr "" 9499 msgstr ""
9480 9500
9481 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9501 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9482 #: ../en/ch09-undo.xml:546 9502 #: ../en/ch09-undo.xml:557
9483 msgid "" 9503 msgid ""
9484 "For each file that the <literal>backout</literal> changeset affected, it does " 9504 "For each file that the <literal>backout</literal> changeset affected, it does "
9485 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on " 9505 "the equivalent of a <command role=\"hg-cmd\">hg revert -r parent</command> on "
9486 "that file, to restore it to the contents it had before that changeset was " 9506 "that file, to restore it to the contents it had before that changeset was "
9487 "committed." 9507 "committed."
9488 msgstr "" 9508 msgstr ""
9489 9509
9490 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9510 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9491 #: ../en/ch09-undo.xml:553 9511 #: ../en/ch09-undo.xml:564
9492 msgid "" 9512 msgid ""
9493 "It commits the result as a new changeset. This changeset has " 9513 "It commits the result as a new changeset. This changeset has "
9494 "<literal>backout</literal> as its parent." 9514 "<literal>backout</literal> as its parent."
9495 msgstr "" 9515 msgstr ""
9496 9516
9497 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9517 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9498 #: ../en/ch09-undo.xml:557 9518 #: ../en/ch09-undo.xml:568
9499 msgid "" 9519 msgid ""
9500 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the " 9520 "If you specify <option role=\"hg-opt-backout\">--merge</option> on the "
9501 "command line, it merges with <literal>orig</literal>, and commits the result " 9521 "command line, it merges with <literal>orig</literal>, and commits the result "
9502 "of the merge." 9522 "of the merge."
9503 msgstr "" 9523 msgstr ""
9504 9524
9505 #. type: Content of: <book><chapter><sect1><sect2><para> 9525 #. type: Content of: <book><chapter><sect1><sect2><para>
9506 #: ../en/ch09-undo.xml:563 9526 #: ../en/ch09-undo.xml:574
9507 msgid "" 9527 msgid ""
9508 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</" 9528 "An alternative way to implement the <command role=\"hg-cmd\">hg backout</"
9509 "command> command would be to <command role=\"hg-cmd\">hg export</command> the " 9529 "command> command would be to <command role=\"hg-cmd\">hg export</command> the "
9510 "to-be-backed-out changeset as a diff, then use the <option role=\"cmd-opt-" 9530 "to-be-backed-out changeset as a diff, then use the <option role=\"cmd-opt-"
9511 "patch\">--reverse</option> option to the <command>patch</command> command to " 9531 "patch\">--reverse</option> option to the <command>patch</command> command to "
9512 "reverse the effect of the change without fiddling with the working " 9532 "reverse the effect of the change without fiddling with the working "
9513 "directory. This sounds much simpler, but it would not work nearly as well." 9533 "directory. This sounds much simpler, but it would not work nearly as well."
9514 msgstr "" 9534 msgstr ""
9515 9535
9516 #. type: Content of: <book><chapter><sect1><sect2><para> 9536 #. type: Content of: <book><chapter><sect1><sect2><para>
9517 #: ../en/ch09-undo.xml:573 9537 #: ../en/ch09-undo.xml:584
9518 msgid "" 9538 msgid ""
9519 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, " 9539 "The reason that <command role=\"hg-cmd\">hg backout</command> does an update, "
9520 "a commit, a merge, and another commit is to give the merge machinery the best " 9540 "a commit, a merge, and another commit is to give the merge machinery the best "
9521 "chance to do a good job when dealing with all the changes <emphasis>between</" 9541 "chance to do a good job when dealing with all the changes <emphasis>between</"
9522 "emphasis> the change you're backing out and the current tip." 9542 "emphasis> the change you're backing out and the current tip."
9523 msgstr "" 9543 msgstr ""
9524 9544
9525 #. type: Content of: <book><chapter><sect1><sect2><para> 9545 #. type: Content of: <book><chapter><sect1><sect2><para>
9526 #: ../en/ch09-undo.xml:580 9546 #: ../en/ch09-undo.xml:591
9527 msgid "" 9547 msgid ""
9528 "If you're backing out a changeset that's 100 revisions back in your project's " 9548 "If you're backing out a changeset that's 100 revisions back in your project's "
9529 "history, the chances that the <command>patch</command> command will be able " 9549 "history, the chances that the <command>patch</command> command will be able "
9530 "to apply a reverse diff cleanly are not good, because intervening changes are " 9550 "to apply a reverse diff cleanly are not good, because intervening changes are "
9531 "likely to have <quote>broken the context</quote> that <command>patch</" 9551 "likely to have <quote>broken the context</quote> that <command>patch</"
9536 "modifications to binary files, none of which <command>patch</command> can " 9556 "modifications to binary files, none of which <command>patch</command> can "
9537 "deal with." 9557 "deal with."
9538 msgstr "" 9558 msgstr ""
9539 9559
9540 #. type: Content of: <book><chapter><sect1><title> 9560 #. type: Content of: <book><chapter><sect1><title>
9541 #: ../en/ch09-undo.xml:597 9561 #: ../en/ch09-undo.xml:608
9542 msgid "Changes that should never have been" 9562 msgid "Changes that should never have been"
9543 msgstr "不该发生的修改" 9563 msgstr "不该发生的修改"
9544 9564
9545 #. type: Content of: <book><chapter><sect1><para> 9565 #. type: Content of: <book><chapter><sect1><para>
9546 #: ../en/ch09-undo.xml:599 9566 #: ../en/ch09-undo.xml:610
9547 msgid "" 9567 msgid ""
9548 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command " 9568 "Most of the time, the <command role=\"hg-cmd\">hg backout</command> command "
9549 "is exactly what you need if you want to undo the effects of a change. It " 9569 "is exactly what you need if you want to undo the effects of a change. It "
9550 "leaves a permanent record of exactly what you did, both when committing the " 9570 "leaves a permanent record of exactly what you did, both when committing the "
9551 "original changeset and when you cleaned up after it." 9571 "original changeset and when you cleaned up after it."
9552 msgstr "" 9572 msgstr ""
9553 9573
9554 #. type: Content of: <book><chapter><sect1><para> 9574 #. type: Content of: <book><chapter><sect1><para>
9555 #: ../en/ch09-undo.xml:605 9575 #: ../en/ch09-undo.xml:616
9556 msgid "" 9576 msgid ""
9557 "On rare occasions, though, you may find that you've committed a change that " 9577 "On rare occasions, though, you may find that you've committed a change that "
9558 "really should not be present in the repository at all. For example, it would " 9578 "really should not be present in the repository at all. For example, it would "
9559 "be very unusual, and usually considered a mistake, to commit a software " 9579 "be very unusual, and usually considered a mistake, to commit a software "
9560 "project's object files as well as its source files. Object files have almost " 9580 "project's object files as well as its source files. Object files have almost "
9562 "the size of the repository and the amount of time it takes to clone or pull " 9582 "the size of the repository and the amount of time it takes to clone or pull "
9563 "changes." 9583 "changes."
9564 msgstr "" 9584 msgstr ""
9565 9585
9566 #. type: Content of: <book><chapter><sect1><para> 9586 #. type: Content of: <book><chapter><sect1><para>
9567 #: ../en/ch09-undo.xml:614 9587 #: ../en/ch09-undo.xml:625
9568 msgid "" 9588 msgid ""
9569 "Before I discuss the options that you have if you commit a <quote>brown paper " 9589 "Before I discuss the options that you have if you commit a <quote>brown paper "
9570 "bag</quote> change (the kind that's so bad that you want to pull a brown " 9590 "bag</quote> change (the kind that's so bad that you want to pull a brown "
9571 "paper bag over your head), let me first discuss some approaches that probably " 9591 "paper bag over your head), let me first discuss some approaches that probably "
9572 "won't work." 9592 "won't work."
9573 msgstr "" 9593 msgstr ""
9574 9594
9575 #. type: Content of: <book><chapter><sect1><para> 9595 #. type: Content of: <book><chapter><sect1><para>
9576 #: ../en/ch09-undo.xml:619 9596 #: ../en/ch09-undo.xml:630
9577 msgid "" 9597 msgid ""
9578 "Since Mercurial treats history as accumulative&emdash;every change builds on " 9598 "Since Mercurial treats history as accumulative&emdash;every change builds on "
9579 "top of all changes that preceded it&emdash;you generally can't just make " 9599 "top of all changes that preceded it&emdash;you generally can't just make "
9580 "disastrous changes disappear. The one exception is when you've just " 9600 "disastrous changes disappear. The one exception is when you've just "
9581 "committed a change, and it hasn't been pushed or pulled into another " 9601 "committed a change, and it hasn't been pushed or pulled into another "
9583 "rollback</command> command, as I detailed in section <xref linkend=\"sec.undo." 9603 "rollback</command> command, as I detailed in section <xref linkend=\"sec.undo."
9584 "rollback\"/>." 9604 "rollback\"/>."
9585 msgstr "" 9605 msgstr ""
9586 9606
9587 #. type: Content of: <book><chapter><sect1><para> 9607 #. type: Content of: <book><chapter><sect1><para>
9588 #: ../en/ch09-undo.xml:628 9608 #: ../en/ch09-undo.xml:639
9589 msgid "" 9609 msgid ""
9590 "After you've pushed a bad change to another repository, you <emphasis>could</" 9610 "After you've pushed a bad change to another repository, you <emphasis>could</"
9591 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make " 9611 "emphasis> still use <command role=\"hg-cmd\">hg rollback</command> to make "
9592 "your local copy of the change disappear, but it won't have the consequences " 9612 "your local copy of the change disappear, but it won't have the consequences "
9593 "you want. The change will still be present in the remote repository, so it " 9613 "you want. The change will still be present in the remote repository, so it "
9594 "will reappear in your local repository the next time you pull." 9614 "will reappear in your local repository the next time you pull."
9595 msgstr "" 9615 msgstr ""
9596 9616
9597 #. type: Content of: <book><chapter><sect1><para> 9617 #. type: Content of: <book><chapter><sect1><para>
9598 #: ../en/ch09-undo.xml:636 9618 #: ../en/ch09-undo.xml:647
9599 msgid "" 9619 msgid ""
9600 "If a situation like this arises, and you know which repositories your bad " 9620 "If a situation like this arises, and you know which repositories your bad "
9601 "change has propagated into, you can <emphasis>try</emphasis> to get rid of " 9621 "change has propagated into, you can <emphasis>try</emphasis> to get rid of "
9602 "the changeefrom <emphasis>every</emphasis> one of those repositories. This " 9622 "the changeefrom <emphasis>every</emphasis> one of those repositories. This "
9603 "is, of course, not a satisfactory solution: if you miss even a single " 9623 "is, of course, not a satisfactory solution: if you miss even a single "
9604 "repository while you're expunging, the change is still <quote>in the wild</" 9624 "repository while you're expunging, the change is still <quote>in the wild</"
9605 "quote>, and could propagate further." 9625 "quote>, and could propagate further."
9606 msgstr "" 9626 msgstr ""
9607 9627
9608 #. type: Content of: <book><chapter><sect1><para> 9628 #. type: Content of: <book><chapter><sect1><para>
9609 #: ../en/ch09-undo.xml:644 9629 #: ../en/ch09-undo.xml:655
9610 msgid "" 9630 msgid ""
9611 "If you've committed one or more changes <emphasis>after</emphasis> the change " 9631 "If you've committed one or more changes <emphasis>after</emphasis> the change "
9612 "that you'd like to see disappear, your options are further reduced. Mercurial " 9632 "that you'd like to see disappear, your options are further reduced. Mercurial "
9613 "doesn't provide a way to <quote>punch a hole</quote> in history, leaving " 9633 "doesn't provide a way to <quote>punch a hole</quote> in history, leaving "
9614 "changesets intact." 9634 "changesets intact."
9615 msgstr "" 9635 msgstr ""
9616 9636
9617 #. type: Content of: <book><chapter><sect1><para> 9637 #. type: Content of: <book><chapter><sect1><para>
9618 #: ../en/ch09-undo.xml:650 9638 #: ../en/ch09-undo.xml:661
9619 msgid "" 9639 msgid ""
9620 "XXX This needs filling out. The <literal>hg-replay</literal> script in the " 9640 "XXX This needs filling out. The <literal>hg-replay</literal> script in the "
9621 "<literal>examples</literal> directory works, but doesn't handle merge " 9641 "<literal>examples</literal> directory works, but doesn't handle merge "
9622 "changesets. Kind of an important omission." 9642 "changesets. Kind of an important omission."
9623 msgstr "" 9643 msgstr ""
9624 9644
9625 #. type: Content of: <book><chapter><sect1><sect2><title> 9645 #. type: Content of: <book><chapter><sect1><sect2><title>
9626 #: ../en/ch09-undo.xml:656 9646 #: ../en/ch09-undo.xml:667
9627 msgid "Protect yourself from <quote>escaped</quote> changes" 9647 msgid "Protect yourself from <quote>escaped</quote> changes"
9628 msgstr "使用<quote>校验</quote>修改来保护你自己" 9648 msgstr "使用<quote>校验</quote>修改来保护你自己"
9629 9649
9630 #. type: Content of: <book><chapter><sect1><sect2><para> 9650 #. type: Content of: <book><chapter><sect1><sect2><para>
9631 #: ../en/ch09-undo.xml:659 9651 #: ../en/ch09-undo.xml:670
9632 msgid "" 9652 msgid ""
9633 "If you've committed some changes to your local repository and they've been " 9653 "If you've committed some changes to your local repository and they've been "
9634 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can " 9654 "pushed or pulled somewhere else, this isn't necessarily a disaster. You can "
9635 "protect yourself ahead of time against some classes of bad changeset. This " 9655 "protect yourself ahead of time against some classes of bad changeset. This "
9636 "is particularly easy if your team usually pulls changes from a central " 9656 "is particularly easy if your team usually pulls changes from a central "
9637 "repository." 9657 "repository."
9638 msgstr "" 9658 msgstr ""
9639 9659
9640 #. type: Content of: <book><chapter><sect1><sect2><para> 9660 #. type: Content of: <book><chapter><sect1><sect2><para>
9641 #: ../en/ch09-undo.xml:666 9661 #: ../en/ch09-undo.xml:677
9642 msgid "" 9662 msgid ""
9643 "By configuring some hooks on that repository to validate incoming changesets " 9663 "By configuring some hooks on that repository to validate incoming changesets "
9644 "(see chapter <xref linkend=\"chap.hook\"/>), you can automatically prevent " 9664 "(see chapter <xref linkend=\"chap.hook\"/>), you can automatically prevent "
9645 "some kinds of bad changeset from being pushed to the central repository at " 9665 "some kinds of bad changeset from being pushed to the central repository at "
9646 "all. With such a configuration in place, some kinds of bad changeset will " 9666 "all. With such a configuration in place, some kinds of bad changeset will "
9648 "the central repository. Better yet, this happens without any need for " 9668 "the central repository. Better yet, this happens without any need for "
9649 "explicit intervention." 9669 "explicit intervention."
9650 msgstr "" 9670 msgstr ""
9651 9671
9652 #. type: Content of: <book><chapter><sect1><sect2><para> 9672 #. type: Content of: <book><chapter><sect1><sect2><para>
9653 #: ../en/ch09-undo.xml:676 9673 #: ../en/ch09-undo.xml:687
9654 msgid "" 9674 msgid ""
9655 "For instance, an incoming change hook that verifies that a changeset will " 9675 "For instance, an incoming change hook that verifies that a changeset will "
9656 "actually compile can prevent people from inadvertantly <quote>breaking the " 9676 "actually compile can prevent people from inadvertantly <quote>breaking the "
9657 "build</quote>." 9677 "build</quote>."
9658 msgstr "" 9678 msgstr ""
9659 9679
9660 #. type: Content of: <book><chapter><sect1><title> 9680 #. type: Content of: <book><chapter><sect1><title>
9661 #: ../en/ch09-undo.xml:683 9681 #: ../en/ch09-undo.xml:694
9662 msgid "Finding the source of a bug" 9682 msgid "Finding the source of a bug"
9663 msgstr "查找问题的根源" 9683 msgstr "查找问题的根源"
9664 9684
9665 #. type: Content of: <book><chapter><sect1><para> 9685 #. type: Content of: <book><chapter><sect1><para>
9666 #: ../en/ch09-undo.xml:685 9686 #: ../en/ch09-undo.xml:696
9667 msgid "" 9687 msgid ""
9668 "While it's all very well to be able to back out a changeset that introduced a " 9688 "While it's all very well to be able to back out a changeset that introduced a "
9669 "bug, this requires that you know which changeset to back out. Mercurial " 9689 "bug, this requires that you know which changeset to back out. Mercurial "
9670 "provides an invaluable command, called <command role=\"hg-cmd\">hg bisect</" 9690 "provides an invaluable command, called <command role=\"hg-cmd\">hg bisect</"
9671 "command>, that helps you to automate this process and accomplish it very " 9691 "command>, that helps you to automate this process and accomplish it very "
9672 "efficiently." 9692 "efficiently."
9673 msgstr "" 9693 msgstr ""
9674 9694
9675 #. type: Content of: <book><chapter><sect1><para> 9695 #. type: Content of: <book><chapter><sect1><para>
9676 #: ../en/ch09-undo.xml:692 9696 #: ../en/ch09-undo.xml:703
9677 msgid "" 9697 msgid ""
9678 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is " 9698 "The idea behind the <command role=\"hg-cmd\">hg bisect</command> command is "
9679 "that a changeset has introduced some change of behaviour that you can " 9699 "that a changeset has introduced some change of behaviour that you can "
9680 "identify with a simple binary test. You don't know which piece of code " 9700 "identify with a simple binary test. You don't know which piece of code "
9681 "introduced the change, but you know how to test for the presence of the bug. " 9701 "introduced the change, but you know how to test for the presence of the bug. "
9683 "direct its search for the changeset that introduced the code that caused the " 9703 "direct its search for the changeset that introduced the code that caused the "
9684 "bug." 9704 "bug."
9685 msgstr "" 9705 msgstr ""
9686 9706
9687 #. type: Content of: <book><chapter><sect1><para> 9707 #. type: Content of: <book><chapter><sect1><para>
9688 #: ../en/ch09-undo.xml:701 9708 #: ../en/ch09-undo.xml:712
9689 msgid "" 9709 msgid ""
9690 "Here are a few scenarios to help you understand how you might apply this " 9710 "Here are a few scenarios to help you understand how you might apply this "
9691 "command." 9711 "command."
9692 msgstr "" 9712 msgstr ""
9693 9713
9694 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9714 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9695 #: ../en/ch09-undo.xml:704 9715 #: ../en/ch09-undo.xml:715
9696 msgid "" 9716 msgid ""
9697 "The most recent version of your software has a bug that you remember wasn't " 9717 "The most recent version of your software has a bug that you remember wasn't "
9698 "present a few weeks ago, but you don't know when it was introduced. Here, " 9718 "present a few weeks ago, but you don't know when it was introduced. Here, "
9699 "your binary test checks for the presence of that bug." 9719 "your binary test checks for the presence of that bug."
9700 msgstr "" 9720 msgstr ""
9701 9721
9702 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9722 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9703 #: ../en/ch09-undo.xml:709 9723 #: ../en/ch09-undo.xml:720
9704 msgid "" 9724 msgid ""
9705 "You fixed a bug in a rush, and now it's time to close the entry in your " 9725 "You fixed a bug in a rush, and now it's time to close the entry in your "
9706 "team's bug database. The bug database requires a changeset ID when you close " 9726 "team's bug database. The bug database requires a changeset ID when you close "
9707 "an entry, but you don't remember which changeset you fixed the bug in. Once " 9727 "an entry, but you don't remember which changeset you fixed the bug in. Once "
9708 "again, your binary test checks for the presence of the bug." 9728 "again, your binary test checks for the presence of the bug."
9709 msgstr "" 9729 msgstr ""
9710 9730
9711 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9731 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9712 #: ../en/ch09-undo.xml:716 9732 #: ../en/ch09-undo.xml:727
9713 msgid "" 9733 msgid ""
9714 "Your software works correctly, but runs 15% slower than the last time you " 9734 "Your software works correctly, but runs 15% slower than the last time you "
9715 "measured it. You want to know which changeset introduced the performance " 9735 "measured it. You want to know which changeset introduced the performance "
9716 "regression. In this case, your binary test measures the performance of your " 9736 "regression. In this case, your binary test measures the performance of your "
9717 "software, to see whether it's <quote>fast</quote> or <quote>slow</quote>." 9737 "software, to see whether it's <quote>fast</quote> or <quote>slow</quote>."
9718 msgstr "" 9738 msgstr ""
9719 9739
9720 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 9740 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
9721 #: ../en/ch09-undo.xml:723 9741 #: ../en/ch09-undo.xml:734
9722 msgid "" 9742 msgid ""
9723 "The sizes of the components of your project that you ship exploded recently, " 9743 "The sizes of the components of your project that you ship exploded recently, "
9724 "and you suspect that something changed in the way you build your project." 9744 "and you suspect that something changed in the way you build your project."
9725 msgstr "" 9745 msgstr ""
9726 9746
9727 #. type: Content of: <book><chapter><sect1><para> 9747 #. type: Content of: <book><chapter><sect1><para>
9728 #: ../en/ch09-undo.xml:728 9748 #: ../en/ch09-undo.xml:739
9729 msgid "" 9749 msgid ""
9730 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg " 9750 "From these examples, it should be clear that the <command role=\"hg-cmd\">hg "
9731 "bisect</command> command is not useful only for finding the sources of bugs. " 9751 "bisect</command> command is not useful only for finding the sources of bugs. "
9732 "You can use it to find any <quote>emergent property</quote> of a repository " 9752 "You can use it to find any <quote>emergent property</quote> of a repository "
9733 "(anything that you can't find from a simple text search of the files in the " 9753 "(anything that you can't find from a simple text search of the files in the "
9734 "tree) for which you can write a binary test." 9754 "tree) for which you can write a binary test."
9735 msgstr "" 9755 msgstr ""
9736 9756
9737 #. type: Content of: <book><chapter><sect1><para> 9757 #. type: Content of: <book><chapter><sect1><para>
9738 #: ../en/ch09-undo.xml:735 9758 #: ../en/ch09-undo.xml:746
9739 msgid "" 9759 msgid ""
9740 "We'll introduce a little bit of terminology here, just to make it clear which " 9760 "We'll introduce a little bit of terminology here, just to make it clear which "
9741 "parts of the search process are your responsibility, and which are " 9761 "parts of the search process are your responsibility, and which are "
9742 "Mercurial's. A <emphasis>test</emphasis> is something that <emphasis>you</" 9762 "Mercurial's. A <emphasis>test</emphasis> is something that <emphasis>you</"
9743 "emphasis> run when <command role=\"hg-cmd\">hg bisect</command> chooses a " 9763 "emphasis> run when <command role=\"hg-cmd\">hg bisect</command> chooses a "
9747 "the phrase <quote>search using the <command role=\"hg-cmd\">hg bisect</" 9767 "the phrase <quote>search using the <command role=\"hg-cmd\">hg bisect</"
9748 "command> command</quote>." 9768 "command> command</quote>."
9749 msgstr "" 9769 msgstr ""
9750 9770
9751 #. type: Content of: <book><chapter><sect1><para> 9771 #. type: Content of: <book><chapter><sect1><para>
9752 #: ../en/ch09-undo.xml:748 9772 #: ../en/ch09-undo.xml:759
9753 msgid "" 9773 msgid ""
9754 "One simple way to automate the searching process would be simply to probe " 9774 "One simple way to automate the searching process would be simply to probe "
9755 "every changeset. However, this scales poorly. If it took ten minutes to " 9775 "every changeset. However, this scales poorly. If it took ten minutes to "
9756 "test a single changeset, and you had 10,000 changesets in your repository, " 9776 "test a single changeset, and you had 10,000 changesets in your repository, "
9757 "the exhaustive approach would take on average 35 <emphasis>days</emphasis> to " 9777 "the exhaustive approach would take on average 35 <emphasis>days</emphasis> to "
9760 "those, you'd still be looking at over 40 hours to find the changeset that " 9780 "those, you'd still be looking at over 40 hours to find the changeset that "
9761 "introduced your bug." 9781 "introduced your bug."
9762 msgstr "" 9782 msgstr ""
9763 9783
9764 #. type: Content of: <book><chapter><sect1><para> 9784 #. type: Content of: <book><chapter><sect1><para>
9765 #: ../en/ch09-undo.xml:758 9785 #: ../en/ch09-undo.xml:769
9766 msgid "" 9786 msgid ""
9767 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its " 9787 "What the <command role=\"hg-cmd\">hg bisect</command> command does is use its "
9768 "knowledge of the <quote>shape</quote> of your project's revision history to " 9788 "knowledge of the <quote>shape</quote> of your project's revision history to "
9769 "perform a search in time proportional to the <emphasis>logarithm</emphasis> " 9789 "perform a search in time proportional to the <emphasis>logarithm</emphasis> "
9770 "of the number of changesets to check (the kind of search it performs is " 9790 "of the number of changesets to check (the kind of search it performs is "
9773 "search will require about 14 tests). Limit your search to the last hundred " 9793 "search will require about 14 tests). Limit your search to the last hundred "
9774 "changesets, and it will take only about an hour (roughly seven tests)." 9794 "changesets, and it will take only about an hour (roughly seven tests)."
9775 msgstr "" 9795 msgstr ""
9776 9796
9777 #. type: Content of: <book><chapter><sect1><para> 9797 #. type: Content of: <book><chapter><sect1><para>
9778 #: ../en/ch09-undo.xml:769 9798 #: ../en/ch09-undo.xml:780
9779 msgid "" 9799 msgid ""
9780 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the " 9800 "The <command role=\"hg-cmd\">hg bisect</command> command is aware of the "
9781 "<quote>branchy</quote> nature of a Mercurial project's revision history, so " 9801 "<quote>branchy</quote> nature of a Mercurial project's revision history, so "
9782 "it has no problems dealing with branches, merges, or multiple heads in a " 9802 "it has no problems dealing with branches, merges, or multiple heads in a "
9783 "repository. It can prune entire branches of history with a single probe, " 9803 "repository. It can prune entire branches of history with a single probe, "
9784 "which is how it operates so efficiently." 9804 "which is how it operates so efficiently."
9785 msgstr "" 9805 msgstr ""
9786 9806
9787 #. type: Content of: <book><chapter><sect1><sect2><title> 9807 #. type: Content of: <book><chapter><sect1><sect2><title>
9788 #: ../en/ch09-undo.xml:777 9808 #: ../en/ch09-undo.xml:788
9789 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command" 9809 msgid "Using the <command role=\"hg-cmd\">hg bisect</command> command"
9790 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>" 9810 msgstr "使用命令 <command role=\"hg-cmd\">hg bisect</command>"
9791 9811
9792 #. type: Content of: <book><chapter><sect1><sect2><para> 9812 #. type: Content of: <book><chapter><sect1><sect2><para>
9793 #: ../en/ch09-undo.xml:780 9813 #: ../en/ch09-undo.xml:791
9794 msgid "" 9814 msgid ""
9795 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action." 9815 "Here's an example of <command role=\"hg-cmd\">hg bisect</command> in action."
9796 msgstr "" 9816 msgstr ""
9797 9817
9798 #. type: Content of: <book><chapter><sect1><sect2><note><para> 9818 #. type: Content of: <book><chapter><sect1><sect2><note><para>
9799 #: ../en/ch09-undo.xml:784 9819 #: ../en/ch09-undo.xml:795
9800 msgid "" 9820 msgid ""
9801 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg " 9821 "In versions 0.9.5 and earlier of Mercurial, <command role=\"hg-cmd\">hg "
9802 "bisect</command> was not a core command: it was distributed with Mercurial as " 9822 "bisect</command> was not a core command: it was distributed with Mercurial as "
9803 "an extension. This section describes the built-in command, not the old " 9823 "an extension. This section describes the built-in command, not the old "
9804 "extension." 9824 "extension."
9805 msgstr "" 9825 msgstr ""
9806 9826
9807 #. type: Content of: <book><chapter><sect1><sect2><para> 9827 #. type: Content of: <book><chapter><sect1><sect2><para>
9808 #: ../en/ch09-undo.xml:791 9828 #: ../en/ch09-undo.xml:802
9809 msgid "" 9829 msgid ""
9810 "Now let's create a repository, so that we can try out the <command role=\"hg-" 9830 "Now let's create a repository, so that we can try out the <command role=\"hg-"
9811 "cmd\">hg bisect</command> command in isolation." 9831 "cmd\">hg bisect</command> command in isolation."
9812 msgstr "" 9832 msgstr ""
9813 9833
9814 #. type: Content of: <book><chapter><sect1><sect2><para> 9834 #. type: Content of: <book><chapter><sect1><sect2><para>
9815 #: ../en/ch09-undo.xml:797 9835 #: ../en/ch09-undo.xml:808
9816 msgid "" 9836 msgid ""
9817 "We'll simulate a project that has a bug in it in a simple-minded way: create " 9837 "We'll simulate a project that has a bug in it in a simple-minded way: create "
9818 "trivial changes in a loop, and nominate one specific change that will have " 9838 "trivial changes in a loop, and nominate one specific change that will have "
9819 "the <quote>bug</quote>. This loop creates 35 changesets, each adding a " 9839 "the <quote>bug</quote>. This loop creates 35 changesets, each adding a "
9820 "single file to the repository. We'll represent our <quote>bug</quote> with a " 9840 "single file to the repository. We'll represent our <quote>bug</quote> with a "
9821 "file that contains the text <quote>i have a gub</quote>." 9841 "file that contains the text <quote>i have a gub</quote>."
9822 msgstr "" 9842 msgstr ""
9823 9843
9824 #. type: Content of: <book><chapter><sect1><sect2><para> 9844 #. type: Content of: <book><chapter><sect1><sect2><para>
9825 #: ../en/ch09-undo.xml:807 9845 #: ../en/ch09-undo.xml:818
9826 msgid "" 9846 msgid ""
9827 "The next thing that we'd like to do is figure out how to use the <command " 9847 "The next thing that we'd like to do is figure out how to use the <command "
9828 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal " 9848 "role=\"hg-cmd\">hg bisect</command> command. We can use Mercurial's normal "
9829 "built-in help mechanism for this." 9849 "built-in help mechanism for this."
9830 msgstr "" 9850 msgstr ""
9831 9851
9832 #. type: Content of: <book><chapter><sect1><sect2><para> 9852 #. type: Content of: <book><chapter><sect1><sect2><para>
9833 #: ../en/ch09-undo.xml:814 9853 #: ../en/ch09-undo.xml:825
9834 msgid "" 9854 msgid ""
9835 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. " 9855 "The <command role=\"hg-cmd\">hg bisect</command> command works in steps. "
9836 "Each step proceeds as follows." 9856 "Each step proceeds as follows."
9837 msgstr "" 9857 msgstr ""
9838 9858
9839 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9859 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9840 #: ../en/ch09-undo.xml:817 9860 #: ../en/ch09-undo.xml:828
9841 msgid "You run your binary test." 9861 msgid "You run your binary test."
9842 msgstr "" 9862 msgstr ""
9843 9863
9844 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 9864 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
9845 #: ../en/ch09-undo.xml:819 9865 #: ../en/ch09-undo.xml:830
9846 msgid "" 9866 msgid ""
9847 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> " 9867 "If the test succeeded, you tell <command role=\"hg-cmd\">hg bisect</command> "
9848 "by running the <command role=\"hg-cmd\">hg bisect good</command> command." 9868 "by running the <command role=\"hg-cmd\">hg bisect good</command> command."
9849 msgstr "" 9869 msgstr ""
9850 9870
9851 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para> 9871 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><itemizedlist><listitem><para>
9852 #: ../en/ch09-undo.xml:824 9872 #: ../en/ch09-undo.xml:835
9853 msgid "" 9873 msgid ""
9854 "If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> " 9874 "If it failed, run the <command role=\"hg-cmd\">hg bisect bad</command> "
9855 "command." 9875 "command."
9856 msgstr "" 9876 msgstr ""
9857 9877
9858 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9878 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9859 #: ../en/ch09-undo.xml:828 9879 #: ../en/ch09-undo.xml:839
9860 msgid "" 9880 msgid ""
9861 "The command uses your information to decide which changeset to test next." 9881 "The command uses your information to decide which changeset to test next."
9862 msgstr "" 9882 msgstr ""
9863 9883
9864 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para> 9884 #. type: Content of: <book><chapter><sect1><sect2><orderedlist><listitem><para>
9865 #: ../en/ch09-undo.xml:831 9885 #: ../en/ch09-undo.xml:842
9866 msgid "" 9886 msgid ""
9867 "It updates the working directory to that changeset, and the process begins " 9887 "It updates the working directory to that changeset, and the process begins "
9868 "again." 9888 "again."
9869 msgstr "" 9889 msgstr ""
9870 9890
9871 #. type: Content of: <book><chapter><sect1><sect2><para> 9891 #. type: Content of: <book><chapter><sect1><sect2><para>
9872 #: ../en/ch09-undo.xml:834 9892 #: ../en/ch09-undo.xml:845
9873 msgid "" 9893 msgid ""
9874 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies " 9894 "The process ends when <command role=\"hg-cmd\">hg bisect</command> identifies "
9875 "a unique changeset that marks the point where your test transitioned from " 9895 "a unique changeset that marks the point where your test transitioned from "
9876 "<quote>succeeding</quote> to <quote>failing</quote>." 9896 "<quote>succeeding</quote> to <quote>failing</quote>."
9877 msgstr "" 9897 msgstr ""
9878 9898
9879 # 9899 #
9880 #. type: Content of: <book><chapter><sect1><sect2><para> 9900 #. type: Content of: <book><chapter><sect1><sect2><para>
9881 #: ../en/ch09-undo.xml:839 9901 #: ../en/ch09-undo.xml:850
9882 msgid "" 9902 msgid ""
9883 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --" 9903 "To start the search, we must run the <command role=\"hg-cmd\">hg bisect --"
9884 "reset</command> command." 9904 "reset</command> command."
9885 msgstr "" 9905 msgstr ""
9886 9906
9887 #. type: Content of: <book><chapter><sect1><sect2><para> 9907 #. type: Content of: <book><chapter><sect1><sect2><para>
9888 #: ../en/ch09-undo.xml:844 9908 #: ../en/ch09-undo.xml:855
9889 msgid "" 9909 msgid ""
9890 "In our case, the binary test we use is simple: we check to see if any file in " 9910 "In our case, the binary test we use is simple: we check to see if any file in "
9891 "the repository contains the string <quote>i have a gub</quote>. If it does, " 9911 "the repository contains the string <quote>i have a gub</quote>. If it does, "
9892 "this changeset contains the change that <quote>caused the bug</quote>. By " 9912 "this changeset contains the change that <quote>caused the bug</quote>. By "
9893 "convention, a changeset that has the property we're searching for is " 9913 "convention, a changeset that has the property we're searching for is "
9894 "<quote>bad</quote>, while one that doesn't is <quote>good</quote>." 9914 "<quote>bad</quote>, while one that doesn't is <quote>good</quote>."
9895 msgstr "" 9915 msgstr ""
9896 9916
9897 #. type: Content of: <book><chapter><sect1><sect2><para> 9917 #. type: Content of: <book><chapter><sect1><sect2><para>
9898 #: ../en/ch09-undo.xml:852 9918 #: ../en/ch09-undo.xml:863
9899 msgid "" 9919 msgid ""
9900 "Most of the time, the revision to which the working directory is synced " 9920 "Most of the time, the revision to which the working directory is synced "
9901 "(usually the tip) already exhibits the problem introduced by the buggy " 9921 "(usually the tip) already exhibits the problem introduced by the buggy "
9902 "change, so we'll mark it as <quote>bad</quote>." 9922 "change, so we'll mark it as <quote>bad</quote>."
9903 msgstr "" 9923 msgstr ""
9904 9924
9905 # 9925 #
9906 #. type: Content of: <book><chapter><sect1><sect2><para> 9926 #. type: Content of: <book><chapter><sect1><sect2><para>
9907 #: ../en/ch09-undo.xml:859 9927 #: ../en/ch09-undo.xml:870
9908 msgid "" 9928 msgid ""
9909 "Our next task is to nominate a changeset that we know <emphasis>doesn't</" 9929 "Our next task is to nominate a changeset that we know <emphasis>doesn't</"
9910 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> " 9930 "emphasis> have the bug; the <command role=\"hg-cmd\">hg bisect</command> "
9911 "command will <quote>bracket</quote> its search between the first pair of good " 9931 "command will <quote>bracket</quote> its search between the first pair of good "
9912 "and bad changesets. In our case, we know that revision 10 didn't have the " 9932 "and bad changesets. In our case, we know that revision 10 didn't have the "
9913 "bug. (I'll have more words about choosing the first <quote>good</quote> " 9933 "bug. (I'll have more words about choosing the first <quote>good</quote> "
9914 "changeset later.)" 9934 "changeset later.)"
9915 msgstr "" 9935 msgstr ""
9916 9936
9917 #. type: Content of: <book><chapter><sect1><sect2><para> 9937 #. type: Content of: <book><chapter><sect1><sect2><para>
9918 #: ../en/ch09-undo.xml:869 9938 #: ../en/ch09-undo.xml:880
9919 msgid "Notice that this command printed some output." 9939 msgid "Notice that this command printed some output."
9920 msgstr "" 9940 msgstr ""
9921 9941
9922 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 9942 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
9923 #: ../en/ch09-undo.xml:871 9943 #: ../en/ch09-undo.xml:882
9924 msgid "" 9944 msgid ""
9925 "It told us how many changesets it must consider before it can identify the " 9945 "It told us how many changesets it must consider before it can identify the "
9926 "one that introduced the bug, and how many tests that will require." 9946 "one that introduced the bug, and how many tests that will require."
9927 msgstr "" 9947 msgstr ""
9928 9948
9929 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 9949 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
9930 #: ../en/ch09-undo.xml:875 9950 #: ../en/ch09-undo.xml:886
9931 msgid "" 9951 msgid ""
9932 "It updated the working directory to the next changeset to test, and told us " 9952 "It updated the working directory to the next changeset to test, and told us "
9933 "which changeset it's testing." 9953 "which changeset it's testing."
9934 msgstr "" 9954 msgstr ""
9935 9955
9936 #. type: Content of: <book><chapter><sect1><sect2><para> 9956 #. type: Content of: <book><chapter><sect1><sect2><para>
9937 #: ../en/ch09-undo.xml:880 9957 #: ../en/ch09-undo.xml:891
9938 msgid "" 9958 msgid ""
9939 "We now run our test in the working directory. We use the <command>grep</" 9959 "We now run our test in the working directory. We use the <command>grep</"
9940 "command> command to see if our <quote>bad</quote> file is present in the " 9960 "command> command to see if our <quote>bad</quote> file is present in the "
9941 "working directory. If it is, this revision is bad; if not, this revision is " 9961 "working directory. If it is, this revision is bad; if not, this revision is "
9942 "good. &interaction.bisect.search.step1;" 9962 "good. &interaction.bisect.search.step1;"
9943 msgstr "" 9963 msgstr ""
9944 9964
9945 #. type: Content of: <book><chapter><sect1><sect2><para> 9965 #. type: Content of: <book><chapter><sect1><sect2><para>
9946 #: ../en/ch09-undo.xml:886 9966 #: ../en/ch09-undo.xml:897
9947 msgid "" 9967 msgid ""
9948 "This test looks like a perfect candidate for automation, so let's turn it " 9968 "This test looks like a perfect candidate for automation, so let's turn it "
9949 "into a shell function." 9969 "into a shell function."
9950 msgstr "" 9970 msgstr ""
9951 9971
9952 #. type: Content of: <book><chapter><sect1><sect2><para> 9972 #. type: Content of: <book><chapter><sect1><sect2><para>
9953 #: ../en/ch09-undo.xml:890 9973 #: ../en/ch09-undo.xml:901
9954 msgid "" 9974 msgid ""
9955 "We can now run an entire test step with a single command, <literal>mytest</" 9975 "We can now run an entire test step with a single command, <literal>mytest</"
9956 "literal>." 9976 "literal>."
9957 msgstr "" 9977 msgstr ""
9958 9978
9959 #. type: Content of: <book><chapter><sect1><sect2><para> 9979 #. type: Content of: <book><chapter><sect1><sect2><para>
9960 #: ../en/ch09-undo.xml:895 9980 #: ../en/ch09-undo.xml:906
9961 msgid "A few more invocations of our canned test step command, and we're done." 9981 msgid "A few more invocations of our canned test step command, and we're done."
9962 msgstr "" 9982 msgstr ""
9963 9983
9964 #. type: Content of: <book><chapter><sect1><sect2><para> 9984 #. type: Content of: <book><chapter><sect1><sect2><para>
9965 #: ../en/ch09-undo.xml:900 9985 #: ../en/ch09-undo.xml:911
9966 msgid "" 9986 msgid ""
9967 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd" 9987 "Even though we had 40 changesets to search through, the <command role=\"hg-cmd"
9968 "\">hg bisect</command> command let us find the changeset that introduced our " 9988 "\">hg bisect</command> command let us find the changeset that introduced our "
9969 "<quote>bug</quote> with only five tests. Because the number of tests that " 9989 "<quote>bug</quote> with only five tests. Because the number of tests that "
9970 "the <command role=\"hg-cmd\">hg bisect</command> command performs grows " 9990 "the <command role=\"hg-cmd\">hg bisect</command> command performs grows "
9972 "it has over the <quote>brute force</quote> search approach increases with " 9992 "it has over the <quote>brute force</quote> search approach increases with "
9973 "every changeset you add." 9993 "every changeset you add."
9974 msgstr "" 9994 msgstr ""
9975 9995
9976 #. type: Content of: <book><chapter><sect1><sect2><title> 9996 #. type: Content of: <book><chapter><sect1><sect2><title>
9977 #: ../en/ch09-undo.xml:911 9997 #: ../en/ch09-undo.xml:922
9978 msgid "Cleaning up after your search" 9998 msgid "Cleaning up after your search"
9979 msgstr "搜索后的清理" 9999 msgstr "搜索后的清理"
9980 10000
9981 # 10001 #
9982 #. type: Content of: <book><chapter><sect1><sect2><para> 10002 #. type: Content of: <book><chapter><sect1><sect2><para>
9983 #: ../en/ch09-undo.xml:913 10003 #: ../en/ch09-undo.xml:924
9984 msgid "" 10004 msgid ""
9985 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> " 10005 "When you're finished using the <command role=\"hg-cmd\">hg bisect</command> "
9986 "command in a repository, you can use the <command role=\"hg-cmd\">hg bisect " 10006 "command in a repository, you can use the <command role=\"hg-cmd\">hg bisect "
9987 "reset</command> command to drop the information it was using to drive your " 10007 "reset</command> command to drop the information it was using to drive your "
9988 "search. The command doesn't use much space, so it doesn't matter if you " 10008 "search. The command doesn't use much space, so it doesn't matter if you "
9990 "command> won't let you start a new search in that repository until you do a " 10010 "command> won't let you start a new search in that repository until you do a "
9991 "<command role=\"hg-cmd\">hg bisect reset</command>." 10011 "<command role=\"hg-cmd\">hg bisect reset</command>."
9992 msgstr "" 10012 msgstr ""
9993 10013
9994 #. type: Content of: <book><chapter><sect1><title> 10014 #. type: Content of: <book><chapter><sect1><title>
9995 #: ../en/ch09-undo.xml:928 10015 #: ../en/ch09-undo.xml:939
9996 msgid "Tips for finding bugs effectively" 10016 msgid "Tips for finding bugs effectively"
9997 msgstr "有效查找问题的技巧" 10017 msgstr "有效查找问题的技巧"
9998 10018
9999 #. type: Content of: <book><chapter><sect1><sect2><title> 10019 #. type: Content of: <book><chapter><sect1><sect2><title>
10000 #: ../en/ch09-undo.xml:931 10020 #: ../en/ch09-undo.xml:942
10001 msgid "Give consistent input" 10021 msgid "Give consistent input"
10002 msgstr "给出一致的输入" 10022 msgstr "给出一致的输入"
10003 10023
10004 #. type: Content of: <book><chapter><sect1><sect2><para> 10024 #. type: Content of: <book><chapter><sect1><sect2><para>
10005 #: ../en/ch09-undo.xml:933 10025 #: ../en/ch09-undo.xml:944
10006 msgid "" 10026 msgid ""
10007 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you " 10027 "The <command role=\"hg-cmd\">hg bisect</command> command requires that you "
10008 "correctly report the result of every test you perform. If you tell it that a " 10028 "correctly report the result of every test you perform. If you tell it that a "
10009 "test failed when it really succeeded, it <emphasis>might</emphasis> be able " 10029 "test failed when it really succeeded, it <emphasis>might</emphasis> be able "
10010 "to detect the inconsistency. If it can identify an inconsistency in your " 10030 "to detect the inconsistency. If it can identify an inconsistency in your "
10012 "However, it can't do this perfectly; it's about as likely to report the wrong " 10032 "However, it can't do this perfectly; it's about as likely to report the wrong "
10013 "changeset as the source of the bug." 10033 "changeset as the source of the bug."
10014 msgstr "" 10034 msgstr ""
10015 10035
10016 #. type: Content of: <book><chapter><sect1><sect2><title> 10036 #. type: Content of: <book><chapter><sect1><sect2><title>
10017 #: ../en/ch09-undo.xml:945 10037 #: ../en/ch09-undo.xml:956
10018 msgid "Automate as much as possible" 10038 msgid "Automate as much as possible"
10019 msgstr "尽量自动" 10039 msgstr "尽量自动"
10020 10040
10021 #. type: Content of: <book><chapter><sect1><sect2><para> 10041 #. type: Content of: <book><chapter><sect1><sect2><para>
10022 #: ../en/ch09-undo.xml:947 10042 #: ../en/ch09-undo.xml:958
10023 msgid "" 10043 msgid ""
10024 "When I started using the <command role=\"hg-cmd\">hg bisect</command> " 10044 "When I started using the <command role=\"hg-cmd\">hg bisect</command> "
10025 "command, I tried a few times to run my tests by hand, on the command line. " 10045 "command, I tried a few times to run my tests by hand, on the command line. "
10026 "This is an approach that I, at least, am not suited to. After a few tries, I " 10046 "This is an approach that I, at least, am not suited to. After a few tries, I "
10027 "found that I was making enough mistakes that I was having to restart my " 10047 "found that I was making enough mistakes that I was having to restart my "
10028 "searches several times before finally getting correct results." 10048 "searches several times before finally getting correct results."
10029 msgstr "" 10049 msgstr ""
10030 10050
10031 #. type: Content of: <book><chapter><sect1><sect2><para> 10051 #. type: Content of: <book><chapter><sect1><sect2><para>
10032 #: ../en/ch09-undo.xml:955 10052 #: ../en/ch09-undo.xml:966
10033 msgid "" 10053 msgid ""
10034 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</" 10054 "My initial problems with driving the <command role=\"hg-cmd\">hg bisect</"
10035 "command> command by hand occurred even with simple searches on small " 10055 "command> command by hand occurred even with simple searches on small "
10036 "repositories; if the problem you're looking for is more subtle, or the number " 10056 "repositories; if the problem you're looking for is more subtle, or the number "
10037 "of tests that <command role=\"hg-cmd\">hg bisect</command> must perform " 10057 "of tests that <command role=\"hg-cmd\">hg bisect</command> must perform "
10038 "increases, the likelihood of operator error ruining the search is much " 10058 "increases, the likelihood of operator error ruining the search is much "
10039 "higher. Once I started automating my tests, I had much better results." 10059 "higher. Once I started automating my tests, I had much better results."
10040 msgstr "" 10060 msgstr ""
10041 10061
10042 #. type: Content of: <book><chapter><sect1><sect2><para> 10062 #. type: Content of: <book><chapter><sect1><sect2><para>
10043 #: ../en/ch09-undo.xml:964 10063 #: ../en/ch09-undo.xml:975
10044 msgid "The key to automated testing is twofold:" 10064 msgid "The key to automated testing is twofold:"
10045 msgstr "" 10065 msgstr ""
10046 10066
10047 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10067 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10048 #: ../en/ch09-undo.xml:966 10068 #: ../en/ch09-undo.xml:977
10049 msgid "always test for the same symptom, and" 10069 msgid "always test for the same symptom, and"
10050 msgstr "" 10070 msgstr ""
10051 10071
10052 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10072 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10053 #: ../en/ch09-undo.xml:968 10073 #: ../en/ch09-undo.xml:979
10054 msgid "" 10074 msgid ""
10055 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</" 10075 "always feed consistent input to the <command role=\"hg-cmd\">hg bisect</"
10056 "command> command." 10076 "command> command."
10057 msgstr "" 10077 msgstr ""
10058 10078
10059 #. type: Content of: <book><chapter><sect1><sect2><para> 10079 #. type: Content of: <book><chapter><sect1><sect2><para>
10060 #: ../en/ch09-undo.xml:971 10080 #: ../en/ch09-undo.xml:982
10061 msgid "" 10081 msgid ""
10062 "In my tutorial example above, the <command>grep</command> command tests for " 10082 "In my tutorial example above, the <command>grep</command> command tests for "
10063 "the symptom, and the <literal>if</literal> statement takes the result of this " 10083 "the symptom, and the <literal>if</literal> statement takes the result of this "
10064 "check and ensures that we always feed the same input to the <command role=" 10084 "check and ensures that we always feed the same input to the <command role="
10065 "\"hg-cmd\">hg bisect</command> command. The <literal>mytest</literal> " 10085 "\"hg-cmd\">hg bisect</command> command. The <literal>mytest</literal> "
10066 "function marries these together in a reproducible way, so that every test is " 10086 "function marries these together in a reproducible way, so that every test is "
10067 "uniform and consistent." 10087 "uniform and consistent."
10068 msgstr "" 10088 msgstr ""
10069 10089
10070 #. type: Content of: <book><chapter><sect1><sect2><title> 10090 #. type: Content of: <book><chapter><sect1><sect2><title>
10071 #: ../en/ch09-undo.xml:981 10091 #: ../en/ch09-undo.xml:992
10072 msgid "Check your results" 10092 msgid "Check your results"
10073 msgstr "检查你的结果" 10093 msgstr "检查你的结果"
10074 10094
10075 #. type: Content of: <book><chapter><sect1><sect2><para> 10095 #. type: Content of: <book><chapter><sect1><sect2><para>
10076 #: ../en/ch09-undo.xml:983 10096 #: ../en/ch09-undo.xml:994
10077 msgid "" 10097 msgid ""
10078 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search " 10098 "Because the output of a <command role=\"hg-cmd\">hg bisect</command> search "
10079 "is only as good as the input you give it, don't take the changeset it reports " 10099 "is only as good as the input you give it, don't take the changeset it reports "
10080 "as the absolute truth. A simple way to cross-check its report is to manually " 10100 "as the absolute truth. A simple way to cross-check its report is to manually "
10081 "run your test at each of the following changesets:" 10101 "run your test at each of the following changesets:"
10082 msgstr "" 10102 msgstr ""
10083 10103
10084 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10104 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10085 #: ../en/ch09-undo.xml:989 10105 #: ../en/ch09-undo.xml:1000
10086 msgid "" 10106 msgid ""
10087 "The changeset that it reports as the first bad revision. Your test should " 10107 "The changeset that it reports as the first bad revision. Your test should "
10088 "still report this as bad." 10108 "still report this as bad."
10089 msgstr "" 10109 msgstr ""
10090 10110
10091 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10111 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10092 #: ../en/ch09-undo.xml:993 10112 #: ../en/ch09-undo.xml:1004
10093 msgid "" 10113 msgid ""
10094 "The parent of that changeset (either parent, if it's a merge). Your test " 10114 "The parent of that changeset (either parent, if it's a merge). Your test "
10095 "should report this changeset as good." 10115 "should report this changeset as good."
10096 msgstr "" 10116 msgstr ""
10097 10117
10098 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 10118 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
10099 #: ../en/ch09-undo.xml:997 10119 #: ../en/ch09-undo.xml:1008
10100 msgid "" 10120 msgid ""
10101 "A child of that changeset. Your test should report this changeset as bad." 10121 "A child of that changeset. Your test should report this changeset as bad."
10102 msgstr "" 10122 msgstr ""
10103 10123
10104 #. type: Content of: <book><chapter><sect1><sect2><title> 10124 #. type: Content of: <book><chapter><sect1><sect2><title>
10105 #: ../en/ch09-undo.xml:1003 10125 #: ../en/ch09-undo.xml:1014
10106 msgid "Beware interference between bugs" 10126 msgid "Beware interference between bugs"
10107 msgstr "谨防问题之间的冲突" 10127 msgstr "谨防问题之间的冲突"
10108 10128
10109 #. type: Content of: <book><chapter><sect1><sect2><para> 10129 #. type: Content of: <book><chapter><sect1><sect2><para>
10110 #: ../en/ch09-undo.xml:1005 10130 #: ../en/ch09-undo.xml:1016
10111 msgid "" 10131 msgid ""
10112 "It's possible that your search for one bug could be disrupted by the presence " 10132 "It's possible that your search for one bug could be disrupted by the presence "
10113 "of another. For example, let's say your software crashes at revision 100, " 10133 "of another. For example, let's say your software crashes at revision 100, "
10114 "and worked correctly at revision 50. Unknown to you, someone else introduced " 10134 "and worked correctly at revision 50. Unknown to you, someone else introduced "
10115 "a different crashing bug at revision 60, and fixed it at revision 80. This " 10135 "a different crashing bug at revision 60, and fixed it at revision 80. This "
10116 "could distort your results in one of several ways." 10136 "could distort your results in one of several ways."
10117 msgstr "" 10137 msgstr ""
10118 10138
10119 #. type: Content of: <book><chapter><sect1><sect2><para> 10139 #. type: Content of: <book><chapter><sect1><sect2><para>
10120 #: ../en/ch09-undo.xml:1013 10140 #: ../en/ch09-undo.xml:1024
10121 msgid "" 10141 msgid ""
10122 "It is possible that this other bug completely <quote>masks</quote> yours, " 10142 "It is possible that this other bug completely <quote>masks</quote> yours, "
10123 "which is to say that it occurs before your bug has a chance to manifest " 10143 "which is to say that it occurs before your bug has a chance to manifest "
10124 "itself. If you can't avoid that other bug (for example, it prevents your " 10144 "itself. If you can't avoid that other bug (for example, it prevents your "
10125 "project from building), and so can't tell whether your bug is present in a " 10145 "project from building), and so can't tell whether your bug is present in a "
10127 "command cannot help you directly. Instead, you can mark a changeset as " 10147 "command cannot help you directly. Instead, you can mark a changeset as "
10128 "untested by running <command role=\"hg-cmd\">hg bisect --skip</command>." 10148 "untested by running <command role=\"hg-cmd\">hg bisect --skip</command>."
10129 msgstr "" 10149 msgstr ""
10130 10150
10131 #. type: Content of: <book><chapter><sect1><sect2><para> 10151 #. type: Content of: <book><chapter><sect1><sect2><para>
10132 #: ../en/ch09-undo.xml:1023 10152 #: ../en/ch09-undo.xml:1034
10133 msgid "" 10153 msgid ""
10134 "A different problem could arise if your test for a bug's presence is not " 10154 "A different problem could arise if your test for a bug's presence is not "
10135 "specific enough. If you check for <quote>my program crashes</quote>, then " 10155 "specific enough. If you check for <quote>my program crashes</quote>, then "
10136 "both your crashing bug and an unrelated crashing bug that masks it will look " 10156 "both your crashing bug and an unrelated crashing bug that masks it will look "
10137 "like the same thing, and mislead <command role=\"hg-cmd\">hg bisect</command>." 10157 "like the same thing, and mislead <command role=\"hg-cmd\">hg bisect</command>."
10138 msgstr "" 10158 msgstr ""
10139 10159
10140 #. type: Content of: <book><chapter><sect1><sect2><para> 10160 #. type: Content of: <book><chapter><sect1><sect2><para>
10141 #: ../en/ch09-undo.xml:1030 10161 #: ../en/ch09-undo.xml:1041
10142 msgid "" 10162 msgid ""
10143 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --" 10163 "Another useful situation in which to use <command role=\"hg-cmd\">hg bisect --"
10144 "skip</command> is if you can't test a revision because your project was in a " 10164 "skip</command> is if you can't test a revision because your project was in a "
10145 "broken and hence untestable state at that revision, perhaps because someone " 10165 "broken and hence untestable state at that revision, perhaps because someone "
10146 "checked in a change that prevented the project from building." 10166 "checked in a change that prevented the project from building."
10147 msgstr "" 10167 msgstr ""
10148 10168
10149 #. type: Content of: <book><chapter><sect1><sect2><title> 10169 #. type: Content of: <book><chapter><sect1><sect2><title>
10150 #: ../en/ch09-undo.xml:1039 10170 #: ../en/ch09-undo.xml:1050
10151 msgid "Bracket your search lazily" 10171 msgid "Bracket your search lazily"
10152 msgstr "减少你的查找工作" 10172 msgstr "减少你的查找工作"
10153 10173
10154 #. type: Content of: <book><chapter><sect1><sect2><para> 10174 #. type: Content of: <book><chapter><sect1><sect2><para>
10155 #: ../en/ch09-undo.xml:1041 10175 #: ../en/ch09-undo.xml:1052
10156 msgid "" 10176 msgid ""
10157 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that " 10177 "Choosing the first <quote>good</quote> and <quote>bad</quote> changesets that "
10158 "will mark the end points of your search is often easy, but it bears a little " 10178 "will mark the end points of your search is often easy, but it bears a little "
10159 "discussion nevertheless. From the perspective of <command role=\"hg-cmd\">hg " 10179 "discussion nevertheless. From the perspective of <command role=\"hg-cmd\">hg "
10160 "bisect</command>, the <quote>newest</quote> changeset is conventionally " 10180 "bisect</command>, the <quote>newest</quote> changeset is conventionally "
10161 "<quote>bad</quote>, and the older changeset is <quote>good</quote>." 10181 "<quote>bad</quote>, and the older changeset is <quote>good</quote>."
10162 msgstr "" 10182 msgstr ""
10163 10183
10164 #. type: Content of: <book><chapter><sect1><sect2><para> 10184 #. type: Content of: <book><chapter><sect1><sect2><para>
10165 #: ../en/ch09-undo.xml:1049 10185 #: ../en/ch09-undo.xml:1060
10166 msgid "" 10186 msgid ""
10167 "If you're having trouble remembering when a suitable <quote>good</quote> " 10187 "If you're having trouble remembering when a suitable <quote>good</quote> "
10168 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</" 10188 "change was, so that you can tell <command role=\"hg-cmd\">hg bisect</"
10169 "command>, you could do worse than testing changesets at random. Just " 10189 "command>, you could do worse than testing changesets at random. Just "
10170 "remember to eliminate contenders that can't possibly exhibit the bug (perhaps " 10190 "remember to eliminate contenders that can't possibly exhibit the bug (perhaps "
10171 "because the feature with the bug isn't present yet) and those where another " 10191 "because the feature with the bug isn't present yet) and those where another "
10172 "problem masks the bug (as I discussed above)." 10192 "problem masks the bug (as I discussed above)."
10173 msgstr "" 10193 msgstr ""
10174 10194
10175 #. type: Content of: <book><chapter><sect1><sect2><para> 10195 #. type: Content of: <book><chapter><sect1><sect2><para>
10176 #: ../en/ch09-undo.xml:1058 10196 #: ../en/ch09-undo.xml:1069
10177 msgid "" 10197 msgid ""
10178 "Even if you end up <quote>early</quote> by thousands of changesets or months " 10198 "Even if you end up <quote>early</quote> by thousands of changesets or months "
10179 "of history, you will only add a handful of tests to the total number that " 10199 "of history, you will only add a handful of tests to the total number that "
10180 "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its " 10200 "<command role=\"hg-cmd\">hg bisect</command> must perform, thanks to its "
10181 "logarithmic behaviour." 10201 "logarithmic behaviour."
13952 "repository, and the effects of the patch and changeset are visible in the " 13972 "repository, and the effects of the patch and changeset are visible in the "
13953 "working directory. You can undo the application of a patch using the " 13973 "working directory. You can undo the application of a patch using the "
13954 "<command role=\"hg-ext-mq\">qpop</command> command. MQ still <emphasis>knows " 13974 "<command role=\"hg-ext-mq\">qpop</command> command. MQ still <emphasis>knows "
13955 "about</emphasis>, or manages, a popped patch, but the patch no longer has a " 13975 "about</emphasis>, or manages, a popped patch, but the patch no longer has a "
13956 "corresponding changeset in the repository, and the working directory does not " 13976 "corresponding changeset in the repository, and the working directory does not "
13957 "contain the changes made by the patch. Figure <xref linkend=\"fig.mq.stack\"/" 13977 "contain the changes made by the patch. Figure <xref endterm=\"fig.mq.stack."
13958 "> illustrates the difference between applied and tracked patches." 13978 "caption\" linkend=\"fig.mq.stack\"/> illustrates the difference between "
13979 "applied and tracked patches."
13959 msgstr "" 13980 msgstr ""
13960 13981
13961 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject> 13982 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject>
13962 #: ../en/ch12-mq.xml:407 13983 #: ../en/ch12-mq.xml:408
13963 msgid "<imageobject><imagedata fileref=\"images/mq-stack.png\"/></imageobject>" 13984 msgid "<imageobject><imagedata fileref=\"images/mq-stack.png\"/></imageobject>"
13964 msgstr "" 13985 msgstr ""
13965 13986
13966 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para> 13987 #. type: Content of: <book><chapter><sect1><sect2><informalfigure><mediaobject><caption><para>
13967 #: ../en/ch12-mq.xml:409 13988 #: ../en/ch12-mq.xml:410
13968 msgid "Applied and unapplied patches in the MQ patch stack" 13989 msgid "Applied and unapplied patches in the MQ patch stack"
13969 msgstr "" 13990 msgstr ""
13970 13991
13971 #. type: Content of: <book><chapter><sect1><sect2><para> 13992 #. type: Content of: <book><chapter><sect1><sect2><para>
13972 #: ../en/ch12-mq.xml:414 13993 #: ../en/ch12-mq.xml:415
13973 msgid "" 13994 msgid ""
13974 "You can reapply an unapplied, or popped, patch using the <command role=\"hg-" 13995 "You can reapply an unapplied, or popped, patch using the <command role=\"hg-"
13975 "ext-mq\">qpush</command> command. This creates a new changeset to correspond " 13996 "ext-mq\">qpush</command> command. This creates a new changeset to correspond "
13976 "to the patch, and the patch's changes once again become present in the " 13997 "to the patch, and the patch's changes once again become present in the "
13977 "working directory. See below for examples of <command role=\"hg-ext-mq" 13998 "working directory. See below for examples of <command role=\"hg-ext-mq"
13978 "\">qpop</command> and <command role=\"hg-ext-mq\">qpush</command> in action." 13999 "\">qpop</command> and <command role=\"hg-ext-mq\">qpush</command> in action."
13979 msgstr "" 14000 msgstr ""
13980 14001
13981 #. type: Content of: <book><chapter><sect1><sect2><para> 14002 #. type: Content of: <book><chapter><sect1><sect2><para>
13982 #: ../en/ch12-mq.xml:423 14003 #: ../en/ch12-mq.xml:424
13983 msgid "" 14004 msgid ""
13984 "Notice that once we have popped a patch or two patches, the output of " 14005 "Notice that once we have popped a patch or two patches, the output of "
13985 "<command role=\"hg-ext-mq\">qseries</command> remains the same, while that of " 14006 "<command role=\"hg-ext-mq\">qseries</command> remains the same, while that of "
13986 "<command role=\"hg-ext-mq\">qapplied</command> has changed." 14007 "<command role=\"hg-ext-mq\">qapplied</command> has changed."
13987 msgstr "" 14008 msgstr ""
13988 14009
13989 #. type: Content of: <book><chapter><sect1><sect2><title> 14010 #. type: Content of: <book><chapter><sect1><sect2><title>
13990 #: ../en/ch12-mq.xml:431 14011 #: ../en/ch12-mq.xml:432
13991 msgid "Pushing and popping many patches" 14012 msgid "Pushing and popping many patches"
13992 msgstr "压入或弹出多个补丁" 14013 msgstr "压入或弹出多个补丁"
13993 14014
13994 #. type: Content of: <book><chapter><sect1><sect2><para> 14015 #. type: Content of: <book><chapter><sect1><sect2><para>
13995 #: ../en/ch12-mq.xml:433 14016 #: ../en/ch12-mq.xml:434
13996 msgid "" 14017 msgid ""
13997 "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-" 14018 "While <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-"
13998 "mq\">qpop</command> each operate on a single patch at a time by default, you " 14019 "mq\">qpop</command> each operate on a single patch at a time by default, you "
13999 "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-" 14020 "can push and pop many patches in one go. The <option role=\"hg-ext-mq-cmd-"
14000 "qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</" 14021 "qpush-opt\">hg -a</option> option to <command role=\"hg-ext-mq\">qpush</"
14003 "command> causes it to pop all applied patches. (For some more ways to push " 14024 "command> causes it to pop all applied patches. (For some more ways to push "
14004 "and pop many patches, see section <xref linkend=\"sec.mq.perf\"/> below.)" 14025 "and pop many patches, see section <xref linkend=\"sec.mq.perf\"/> below.)"
14005 msgstr "" 14026 msgstr ""
14006 14027
14007 #. type: Content of: <book><chapter><sect1><sect2><title> 14028 #. type: Content of: <book><chapter><sect1><sect2><title>
14008 #: ../en/ch12-mq.xml:450 14029 #: ../en/ch12-mq.xml:451
14009 msgid "Safety checks, and overriding them" 14030 msgid "Safety checks, and overriding them"
14010 msgstr "安全的检查,然后覆盖它们" 14031 msgstr "安全的检查,然后覆盖它们"
14011 14032
14012 #. type: Content of: <book><chapter><sect1><sect2><para> 14033 #. type: Content of: <book><chapter><sect1><sect2><para>
14013 #: ../en/ch12-mq.xml:452 14034 #: ../en/ch12-mq.xml:453
14014 msgid "" 14035 msgid ""
14015 "Several MQ commands check the working directory before they do anything, and " 14036 "Several MQ commands check the working directory before they do anything, and "
14016 "fail if they find any modifications. They do this to ensure that you won't " 14037 "fail if they find any modifications. They do this to ensure that you won't "
14017 "lose any changes that you have made, but not yet incorporated into a patch. " 14038 "lose any changes that you have made, but not yet incorporated into a patch. "
14018 "The example below illustrates this; the <command role=\"hg-ext-mq\">qnew</" 14039 "The example below illustrates this; the <command role=\"hg-ext-mq\">qnew</"
14020 "changes, caused in this case by the <command role=\"hg-cmd\">hg add</command> " 14041 "changes, caused in this case by the <command role=\"hg-cmd\">hg add</command> "
14021 "of <filename>file3</filename>." 14042 "of <filename>file3</filename>."
14022 msgstr "" 14043 msgstr ""
14023 14044
14024 #. type: Content of: <book><chapter><sect1><sect2><para> 14045 #. type: Content of: <book><chapter><sect1><sect2><para>
14025 #: ../en/ch12-mq.xml:464 14046 #: ../en/ch12-mq.xml:465
14026 msgid "" 14047 msgid ""
14027 "Commands that check the working directory all take an <quote>I know what I'm " 14048 "Commands that check the working directory all take an <quote>I know what I'm "
14028 "doing</quote> option, which is always named <option>-f</option>. The exact " 14049 "doing</quote> option, which is always named <option>-f</option>. The exact "
14029 "meaning of <option>-f</option> depends on the command. For example, <command " 14050 "meaning of <option>-f</option> depends on the command. For example, <command "
14030 "role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</" 14051 "role=\"hg-cmd\">hg qnew <option role=\"hg-ext-mq-cmd-qnew-opt\">hg -f</"
14034 "affected by the patch that it is popping. Be sure to read the documentation " 14055 "affected by the patch that it is popping. Be sure to read the documentation "
14035 "for a command's <option>-f</option> option before you use it!" 14056 "for a command's <option>-f</option> option before you use it!"
14036 msgstr "" 14057 msgstr ""
14037 14058
14038 #. type: Content of: <book><chapter><sect1><sect2><title> 14059 #. type: Content of: <book><chapter><sect1><sect2><title>
14039 #: ../en/ch12-mq.xml:479 14060 #: ../en/ch12-mq.xml:480
14040 msgid "Working on several patches at once" 14061 msgid "Working on several patches at once"
14041 msgstr "同时处理多个补丁" 14062 msgstr "同时处理多个补丁"
14042 14063
14043 #. type: Content of: <book><chapter><sect1><sect2><para> 14064 #. type: Content of: <book><chapter><sect1><sect2><para>
14044 #: ../en/ch12-mq.xml:481 14065 #: ../en/ch12-mq.xml:482
14045 msgid "" 14066 msgid ""
14046 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes " 14067 "The <command role=\"hg-ext-mq\">qrefresh</command> command always refreshes "
14047 "the <emphasis>topmost</emphasis> applied patch. This means that you can " 14068 "the <emphasis>topmost</emphasis> applied patch. This means that you can "
14048 "suspend work on one patch (by refreshing it), pop or push to make a different " 14069 "suspend work on one patch (by refreshing it), pop or push to make a different "
14049 "patch the top, and work on <emphasis>that</emphasis> patch for a while." 14070 "patch the top, and work on <emphasis>that</emphasis> patch for a while."
14050 msgstr "" 14071 msgstr ""
14051 14072
14052 #. type: Content of: <book><chapter><sect1><sect2><para> 14073 #. type: Content of: <book><chapter><sect1><sect2><para>
14053 #: ../en/ch12-mq.xml:488 14074 #: ../en/ch12-mq.xml:489
14054 msgid "" 14075 msgid ""
14055 "Here's an example that illustrates how you can use this ability. Let's say " 14076 "Here's an example that illustrates how you can use this ability. Let's say "
14056 "you're developing a new feature as two patches. The first is a change to the " 14077 "you're developing a new feature as two patches. The first is a change to the "
14057 "core of your software, and the second&emdash;layered on top of the " 14078 "core of your software, and the second&emdash;layered on top of the "
14058 "first&emdash;changes the user interface to use the code you just added to the " 14079 "first&emdash;changes the user interface to use the code you just added to the "
14064 "role=\"hg-ext-mq\">qpush</command> back to the UI patch to continue where you " 14085 "role=\"hg-ext-mq\">qpush</command> back to the UI patch to continue where you "
14065 "left off." 14086 "left off."
14066 msgstr "" 14087 msgstr ""
14067 14088
14068 #. type: Content of: <book><chapter><sect1><title> 14089 #. type: Content of: <book><chapter><sect1><title>
14069 #: ../en/ch12-mq.xml:505 14090 #: ../en/ch12-mq.xml:506
14070 msgid "More about patches" 14091 msgid "More about patches"
14071 msgstr "关于补丁的更多信息" 14092 msgstr "关于补丁的更多信息"
14072 14093
14073 #. type: Content of: <book><chapter><sect1><para> 14094 #. type: Content of: <book><chapter><sect1><para>
14074 #: ../en/ch12-mq.xml:507 14095 #: ../en/ch12-mq.xml:508
14075 msgid "" 14096 msgid ""
14076 "MQ uses the GNU <command>patch</command> command to apply patches, so it's " 14097 "MQ uses the GNU <command>patch</command> command to apply patches, so it's "
14077 "helpful to know a few more detailed aspects of how <command>patch</command> " 14098 "helpful to know a few more detailed aspects of how <command>patch</command> "
14078 "works, and about patches themselves." 14099 "works, and about patches themselves."
14079 msgstr "" 14100 msgstr ""
14080 14101
14081 #. type: Content of: <book><chapter><sect1><sect2><title> 14102 #. type: Content of: <book><chapter><sect1><sect2><title>
14082 #: ../en/ch12-mq.xml:513 14103 #: ../en/ch12-mq.xml:514
14083 msgid "The strip count" 14104 msgid "The strip count"
14084 msgstr "修剪计数" 14105 msgstr "修剪计数"
14085 14106
14086 #. type: Content of: <book><chapter><sect1><sect2><para> 14107 #. type: Content of: <book><chapter><sect1><sect2><para>
14087 #: ../en/ch12-mq.xml:515 14108 #: ../en/ch12-mq.xml:516
14088 msgid "" 14109 msgid ""
14089 "If you look at the file headers in a patch, you will notice that the " 14110 "If you look at the file headers in a patch, you will notice that the "
14090 "pathnames usually have an extra component on the front that isn't present in " 14111 "pathnames usually have an extra component on the front that isn't present in "
14091 "the actual path name. This is a holdover from the way that people used to " 14112 "the actual path name. This is a holdover from the way that people used to "
14092 "generate patches (people still do this, but it's somewhat rare with modern " 14113 "generate patches (people still do this, but it's somewhat rare with modern "
14093 "revision control tools)." 14114 "revision control tools)."
14094 msgstr "" 14115 msgstr ""
14095 14116
14096 #. type: Content of: <book><chapter><sect1><sect2><para> 14117 #. type: Content of: <book><chapter><sect1><sect2><para>
14097 #: ../en/ch12-mq.xml:522 14118 #: ../en/ch12-mq.xml:523
14098 msgid "" 14119 msgid ""
14099 "Alice would unpack a tarball, edit her files, then decide that she wanted to " 14120 "Alice would unpack a tarball, edit her files, then decide that she wanted to "
14100 "create a patch. So she'd rename her working directory, unpack the tarball " 14121 "create a patch. So she'd rename her working directory, unpack the tarball "
14101 "again (hence the need for the rename), and use the <option role=\"cmd-opt-diff" 14122 "again (hence the need for the rename), and use the <option role=\"cmd-opt-diff"
14102 "\">-r</option> and <option role=\"cmd-opt-diff\">-N</option> options to " 14123 "\">-r</option> and <option role=\"cmd-opt-diff\">-N</option> options to "
14106 "every file header, and the name of the modified directory would be at the " 14127 "every file header, and the name of the modified directory would be at the "
14107 "front of the right-hand path." 14128 "front of the right-hand path."
14108 msgstr "" 14129 msgstr ""
14109 14130
14110 #. type: Content of: <book><chapter><sect1><sect2><para> 14131 #. type: Content of: <book><chapter><sect1><sect2><para>
14111 #: ../en/ch12-mq.xml:535 14132 #: ../en/ch12-mq.xml:536
14112 msgid "" 14133 msgid ""
14113 "Since someone receiving a patch from the Alices of the net would be unlikely " 14134 "Since someone receiving a patch from the Alices of the net would be unlikely "
14114 "to have unmodified and modified directories with exactly the same names, the " 14135 "to have unmodified and modified directories with exactly the same names, the "
14115 "<command>patch</command> command has a <option role=\"cmd-opt-patch\">-p</" 14136 "<command>patch</command> command has a <option role=\"cmd-opt-patch\">-p</"
14116 "option> option that indicates the number of leading path name components to " 14137 "option> option that indicates the number of leading path name components to "
14117 "strip when trying to apply a patch. This number is called the " 14138 "strip when trying to apply a patch. This number is called the "
14118 "<emphasis>strip count</emphasis>." 14139 "<emphasis>strip count</emphasis>."
14119 msgstr "" 14140 msgstr ""
14120 14141
14121 #. type: Content of: <book><chapter><sect1><sect2><para> 14142 #. type: Content of: <book><chapter><sect1><sect2><para>
14122 #: ../en/ch12-mq.xml:543 14143 #: ../en/ch12-mq.xml:544
14123 msgid "" 14144 msgid ""
14124 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip " 14145 "An option of <quote><literal>-p1</literal></quote> means <quote>use a strip "
14125 "count of one</quote>. If <command>patch</command> sees a file name " 14146 "count of one</quote>. If <command>patch</command> sees a file name "
14126 "<filename>foo/bar/baz</filename> in a file header, it will strip " 14147 "<filename>foo/bar/baz</filename> in a file header, it will strip "
14127 "<filename>foo</filename> and try to patch a file named <filename>bar/baz</" 14148 "<filename>foo</filename> and try to patch a file named <filename>bar/baz</"
14131 "<filename>bar</filename>, but <filename>/foo/bar</filename> (notice the extra " 14152 "<filename>bar</filename>, but <filename>/foo/bar</filename> (notice the extra "
14132 "leading slash) into <filename>foo/bar</filename>.)" 14153 "leading slash) into <filename>foo/bar</filename>.)"
14133 msgstr "" 14154 msgstr ""
14134 14155
14135 #. type: Content of: <book><chapter><sect1><sect2><para> 14156 #. type: Content of: <book><chapter><sect1><sect2><para>
14136 #: ../en/ch12-mq.xml:556 14157 #: ../en/ch12-mq.xml:557
14137 msgid "" 14158 msgid ""
14138 "The <quote>standard</quote> strip count for patches is one; almost all " 14159 "The <quote>standard</quote> strip count for patches is one; almost all "
14139 "patches contain one leading path name component that needs to be stripped. " 14160 "patches contain one leading path name component that needs to be stripped. "
14140 "Mercurial's <command role=\"hg-cmd\">hg diff</command> command generates path " 14161 "Mercurial's <command role=\"hg-cmd\">hg diff</command> command generates path "
14141 "names in this form, and the <command role=\"hg-cmd\">hg import</command> " 14162 "names in this form, and the <command role=\"hg-cmd\">hg import</command> "
14142 "command and MQ expect patches to have a strip count of one." 14163 "command and MQ expect patches to have a strip count of one."
14143 msgstr "" 14164 msgstr ""
14144 14165
14145 #. type: Content of: <book><chapter><sect1><sect2><para> 14166 #. type: Content of: <book><chapter><sect1><sect2><para>
14146 #: ../en/ch12-mq.xml:564 14167 #: ../en/ch12-mq.xml:565
14147 msgid "" 14168 msgid ""
14148 "If you receive a patch from someone that you want to add to your patch queue, " 14169 "If you receive a patch from someone that you want to add to your patch queue, "
14149 "and the patch needs a strip count other than one, you cannot just <command " 14170 "and the patch needs a strip count other than one, you cannot just <command "
14150 "role=\"hg-ext-mq\">qimport</command> the patch, because <command role=\"hg-" 14171 "role=\"hg-ext-mq\">qimport</command> the patch, because <command role=\"hg-"
14151 "ext-mq\">qimport</command> does not yet have a <literal>-p</literal> option " 14172 "ext-mq\">qimport</command> does not yet have a <literal>-p</literal> option "
14158 "unnecessary; see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/" 14179 "unnecessary; see <ulink role=\"hg-bug\" url=\"http://www.selenic.com/"
14159 "mercurial/bts/issue311\">issue 311</ulink> for details." 14180 "mercurial/bts/issue311\">issue 311</ulink> for details."
14160 msgstr "" 14181 msgstr ""
14161 14182
14162 #. type: Content of: <book><chapter><sect1><sect2><title> 14183 #. type: Content of: <book><chapter><sect1><sect2><title>
14163 #: ../en/ch12-mq.xml:583 14184 #: ../en/ch12-mq.xml:584
14164 msgid "Strategies for applying a patch" 14185 msgid "Strategies for applying a patch"
14165 msgstr "应用补丁的策略" 14186 msgstr "应用补丁的策略"
14166 14187
14167 #. type: Content of: <book><chapter><sect1><sect2><para> 14188 #. type: Content of: <book><chapter><sect1><sect2><para>
14168 #: ../en/ch12-mq.xml:585 14189 #: ../en/ch12-mq.xml:586
14169 msgid "" 14190 msgid ""
14170 "When <command>patch</command> applies a hunk, it tries a handful of " 14191 "When <command>patch</command> applies a hunk, it tries a handful of "
14171 "successively less accurate strategies to try to make the hunk apply. This " 14192 "successively less accurate strategies to try to make the hunk apply. This "
14172 "falling-back technique often makes it possible to take a patch that was " 14193 "falling-back technique often makes it possible to take a patch that was "
14173 "generated against an old version of a file, and apply it against a newer " 14194 "generated against an old version of a file, and apply it against a newer "
14174 "version of that file." 14195 "version of that file."
14175 msgstr "" 14196 msgstr ""
14176 14197
14177 #. type: Content of: <book><chapter><sect1><sect2><para> 14198 #. type: Content of: <book><chapter><sect1><sect2><para>
14178 #: ../en/ch12-mq.xml:592 14199 #: ../en/ch12-mq.xml:593
14179 msgid "" 14200 msgid ""
14180 "First, <command>patch</command> tries an exact match, where the line numbers, " 14201 "First, <command>patch</command> tries an exact match, where the line numbers, "
14181 "the context, and the text to be modified must apply exactly. If it cannot " 14202 "the context, and the text to be modified must apply exactly. If it cannot "
14182 "make an exact match, it tries to find an exact match for the context, without " 14203 "make an exact match, it tries to find an exact match for the context, without "
14183 "honouring the line numbering information. If this succeeds, it prints a line " 14204 "honouring the line numbering information. If this succeeds, it prints a line "
14184 "of output saying that the hunk was applied, but at some <emphasis>offset</" 14205 "of output saying that the hunk was applied, but at some <emphasis>offset</"
14185 "emphasis> from the original line number." 14206 "emphasis> from the original line number."
14186 msgstr "" 14207 msgstr ""
14187 14208
14188 #. type: Content of: <book><chapter><sect1><sect2><para> 14209 #. type: Content of: <book><chapter><sect1><sect2><para>
14189 #: ../en/ch12-mq.xml:601 14210 #: ../en/ch12-mq.xml:602
14190 msgid "" 14211 msgid ""
14191 "If a context-only match fails, <command>patch</command> removes the first and " 14212 "If a context-only match fails, <command>patch</command> removes the first and "
14192 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-" 14213 "last lines of the context, and tries a <emphasis>reduced</emphasis> context-"
14193 "only match. If the hunk with reduced context succeeds, it prints a message " 14214 "only match. If the hunk with reduced context succeeds, it prints a message "
14194 "saying that it applied the hunk with a <emphasis>fuzz factor</emphasis> (the " 14215 "saying that it applied the hunk with a <emphasis>fuzz factor</emphasis> (the "
14195 "number after the fuzz factor indicates how many lines of context " 14216 "number after the fuzz factor indicates how many lines of context "
14196 "<command>patch</command> had to trim before the patch applied)." 14217 "<command>patch</command> had to trim before the patch applied)."
14197 msgstr "" 14218 msgstr ""
14198 14219
14199 #. type: Content of: <book><chapter><sect1><sect2><para> 14220 #. type: Content of: <book><chapter><sect1><sect2><para>
14200 #: ../en/ch12-mq.xml:610 14221 #: ../en/ch12-mq.xml:611
14201 msgid "" 14222 msgid ""
14202 "When neither of these techniques works, <command>patch</command> prints a " 14223 "When neither of these techniques works, <command>patch</command> prints a "
14203 "message saying that the hunk in question was rejected. It saves rejected " 14224 "message saying that the hunk in question was rejected. It saves rejected "
14204 "hunks (also simply called <quote>rejects</quote>) to a file with the same " 14225 "hunks (also simply called <quote>rejects</quote>) to a file with the same "
14205 "name, and an added <filename role=\"special\">.rej</filename> extension. It " 14226 "name, and an added <filename role=\"special\">.rej</filename> extension. It "
14212 "hunk, and <filename>foo</filename>, containing the changes made by the five " 14233 "hunk, and <filename>foo</filename>, containing the changes made by the five "
14213 "successful hunks." 14234 "successful hunks."
14214 msgstr "" 14235 msgstr ""
14215 14236
14216 #. type: Content of: <book><chapter><sect1><sect2><title> 14237 #. type: Content of: <book><chapter><sect1><sect2><title>
14217 #: ../en/ch12-mq.xml:628 14238 #: ../en/ch12-mq.xml:629
14218 msgid "Some quirks of patch representation" 14239 msgid "Some quirks of patch representation"
14219 msgstr "补丁的一些特性" 14240 msgstr "补丁的一些特性"
14220 14241
14221 #. type: Content of: <book><chapter><sect1><sect2><para> 14242 #. type: Content of: <book><chapter><sect1><sect2><para>
14222 #: ../en/ch12-mq.xml:630 14243 #: ../en/ch12-mq.xml:631
14223 msgid "" 14244 msgid ""
14224 "There are a few useful things to know about how <command>patch</command> " 14245 "There are a few useful things to know about how <command>patch</command> "
14225 "works with files." 14246 "works with files."
14226 msgstr "" 14247 msgstr ""
14227 14248
14228 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14249 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14229 #: ../en/ch12-mq.xml:633 14250 #: ../en/ch12-mq.xml:634
14230 msgid "" 14251 msgid ""
14231 "This should already be obvious, but <command>patch</command> cannot handle " 14252 "This should already be obvious, but <command>patch</command> cannot handle "
14232 "binary files." 14253 "binary files."
14233 msgstr "" 14254 msgstr ""
14234 14255
14235 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14256 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14236 #: ../en/ch12-mq.xml:637 14257 #: ../en/ch12-mq.xml:638
14237 msgid "" 14258 msgid ""
14238 "Neither does it care about the executable bit; it creates new files as " 14259 "Neither does it care about the executable bit; it creates new files as "
14239 "readable, but not executable." 14260 "readable, but not executable."
14240 msgstr "" 14261 msgstr ""
14241 14262
14242 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14263 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14243 #: ../en/ch12-mq.xml:641 14264 #: ../en/ch12-mq.xml:642
14244 msgid "" 14265 msgid ""
14245 "<command>patch</command> treats the removal of a file as a diff between the " 14266 "<command>patch</command> treats the removal of a file as a diff between the "
14246 "file to be removed and the empty file. So your idea of <quote>I deleted this " 14267 "file to be removed and the empty file. So your idea of <quote>I deleted this "
14247 "file</quote> looks like <quote>every line of this file was deleted</quote> in " 14268 "file</quote> looks like <quote>every line of this file was deleted</quote> in "
14248 "a patch." 14269 "a patch."
14249 msgstr "" 14270 msgstr ""
14250 14271
14251 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14272 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14252 #: ../en/ch12-mq.xml:647 14273 #: ../en/ch12-mq.xml:648
14253 msgid "" 14274 msgid ""
14254 "It treats the addition of a file as a diff between the empty file and the " 14275 "It treats the addition of a file as a diff between the empty file and the "
14255 "file to be added. So in a patch, your idea of <quote>I added this file</" 14276 "file to be added. So in a patch, your idea of <quote>I added this file</"
14256 "quote> looks like <quote>every line of this file was added</quote>." 14277 "quote> looks like <quote>every line of this file was added</quote>."
14257 msgstr "" 14278 msgstr ""
14258 14279
14259 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14280 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14260 #: ../en/ch12-mq.xml:653 14281 #: ../en/ch12-mq.xml:654
14261 msgid "" 14282 msgid ""
14262 "It treats a renamed file as the removal of the old name, and the addition of " 14283 "It treats a renamed file as the removal of the old name, and the addition of "
14263 "the new name. This means that renamed files have a big footprint in " 14284 "the new name. This means that renamed files have a big footprint in "
14264 "patches. (Note also that Mercurial does not currently try to infer when " 14285 "patches. (Note also that Mercurial does not currently try to infer when "
14265 "files have been renamed or copied in a patch.)" 14286 "files have been renamed or copied in a patch.)"
14266 msgstr "" 14287 msgstr ""
14267 14288
14268 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14289 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14269 #: ../en/ch12-mq.xml:659 14290 #: ../en/ch12-mq.xml:660
14270 msgid "" 14291 msgid ""
14271 "<command>patch</command> cannot represent empty files, so you cannot use a " 14292 "<command>patch</command> cannot represent empty files, so you cannot use a "
14272 "patch to represent the notion <quote>I added this empty file to the tree</" 14293 "patch to represent the notion <quote>I added this empty file to the tree</"
14273 "quote>." 14294 "quote>."
14274 msgstr "" 14295 msgstr ""
14275 14296
14276 #. type: Content of: <book><chapter><sect1><sect2><title> 14297 #. type: Content of: <book><chapter><sect1><sect2><title>
14277 #: ../en/ch12-mq.xml:666 14298 #: ../en/ch12-mq.xml:667
14278 msgid "Beware the fuzz" 14299 msgid "Beware the fuzz"
14279 msgstr "当心毛刺" 14300 msgstr "当心毛刺"
14280 14301
14281 #. type: Content of: <book><chapter><sect1><sect2><para> 14302 #. type: Content of: <book><chapter><sect1><sect2><para>
14282 #: ../en/ch12-mq.xml:668 14303 #: ../en/ch12-mq.xml:669
14283 msgid "" 14304 msgid ""
14284 "While applying a hunk at an offset, or with a fuzz factor, will often be " 14305 "While applying a hunk at an offset, or with a fuzz factor, will often be "
14285 "completely successful, these inexact techniques naturally leave open the " 14306 "completely successful, these inexact techniques naturally leave open the "
14286 "possibility of corrupting the patched file. The most common cases typically " 14307 "possibility of corrupting the patched file. The most common cases typically "
14287 "involve applying a patch twice, or at an incorrect location in the file. If " 14308 "involve applying a patch twice, or at an incorrect location in the file. If "
14289 "mentions an offset or fuzz factor, you should make sure that the modified " 14310 "mentions an offset or fuzz factor, you should make sure that the modified "
14290 "files are correct afterwards." 14311 "files are correct afterwards."
14291 msgstr "" 14312 msgstr ""
14292 14313
14293 #. type: Content of: <book><chapter><sect1><sect2><para> 14314 #. type: Content of: <book><chapter><sect1><sect2><para>
14294 #: ../en/ch12-mq.xml:678 14315 #: ../en/ch12-mq.xml:679
14295 msgid "" 14316 msgid ""
14296 "It's often a good idea to refresh a patch that has applied with an offset or " 14317 "It's often a good idea to refresh a patch that has applied with an offset or "
14297 "fuzz factor; refreshing the patch generates new context information that will " 14318 "fuzz factor; refreshing the patch generates new context information that will "
14298 "make it apply cleanly. I say <quote>often,</quote> not <quote>always,</" 14319 "make it apply cleanly. I say <quote>often,</quote> not <quote>always,</"
14299 "quote> because sometimes refreshing a patch will make it fail to apply " 14320 "quote> because sometimes refreshing a patch will make it fail to apply "
14302 "a source tree, it's acceptable to have a patch apply with some fuzz, provided " 14323 "a source tree, it's acceptable to have a patch apply with some fuzz, provided "
14303 "you've verified the results of the patching process in such cases." 14324 "you've verified the results of the patching process in such cases."
14304 msgstr "" 14325 msgstr ""
14305 14326
14306 #. type: Content of: <book><chapter><sect1><sect2><title> 14327 #. type: Content of: <book><chapter><sect1><sect2><title>
14307 #: ../en/ch12-mq.xml:691 14328 #: ../en/ch12-mq.xml:692
14308 msgid "Handling rejection" 14329 msgid "Handling rejection"
14309 msgstr "处理拒绝" 14330 msgstr "处理拒绝"
14310 14331
14311 #. type: Content of: <book><chapter><sect1><sect2><para> 14332 #. type: Content of: <book><chapter><sect1><sect2><para>
14312 #: ../en/ch12-mq.xml:693 14333 #: ../en/ch12-mq.xml:694
14313 msgid "" 14334 msgid ""
14314 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it " 14335 "If <command role=\"hg-ext-mq\">qpush</command> fails to apply a patch, it "
14315 "will print an error message and exit. If it has left <filename role=\"special" 14336 "will print an error message and exit. If it has left <filename role=\"special"
14316 "\">.rej</filename> files behind, it is usually best to fix up the rejected " 14337 "\">.rej</filename> files behind, it is usually best to fix up the rejected "
14317 "hunks before you push more patches or do any further work." 14338 "hunks before you push more patches or do any further work."
14318 msgstr "" 14339 msgstr ""
14319 14340
14320 #. type: Content of: <book><chapter><sect1><sect2><para> 14341 #. type: Content of: <book><chapter><sect1><sect2><para>
14321 #: ../en/ch12-mq.xml:699 14342 #: ../en/ch12-mq.xml:700
14322 msgid "" 14343 msgid ""
14323 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does " 14344 "If your patch <emphasis>used to</emphasis> apply cleanly, and no longer does "
14324 "because you've changed the underlying code that your patches are based on, " 14345 "because you've changed the underlying code that your patches are based on, "
14325 "Mercurial Queues can help; see section <xref linkend=\"sec.mq.merge\"/> for " 14346 "Mercurial Queues can help; see section <xref linkend=\"sec.mq.merge\"/> for "
14326 "details." 14347 "details."
14327 msgstr "" 14348 msgstr ""
14328 14349
14329 #. type: Content of: <book><chapter><sect1><sect2><para> 14350 #. type: Content of: <book><chapter><sect1><sect2><para>
14330 #: ../en/ch12-mq.xml:705 14351 #: ../en/ch12-mq.xml:706
14331 msgid "" 14352 msgid ""
14332 "Unfortunately, there aren't any great techniques for dealing with rejected " 14353 "Unfortunately, there aren't any great techniques for dealing with rejected "
14333 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</" 14354 "hunks. Most often, you'll need to view the <filename role=\"special\">.rej</"
14334 "filename> file and edit the target file, applying the rejected hunks by hand." 14355 "filename> file and edit the target file, applying the rejected hunks by hand."
14335 msgstr "" 14356 msgstr ""
14336 14357
14337 #. type: Content of: <book><chapter><sect1><sect2><para> 14358 #. type: Content of: <book><chapter><sect1><sect2><para>
14338 #: ../en/ch12-mq.xml:710 14359 #: ../en/ch12-mq.xml:711
14339 msgid "" 14360 msgid ""
14340 "If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a " 14361 "If you're feeling adventurous, Neil Brown, a Linux kernel hacker, wrote a "
14341 "tool called <command>wiggle</command> <citation>web:wiggle</citation>, which " 14362 "tool called <command>wiggle</command> <citation>web:wiggle</citation>, which "
14342 "is more vigorous than <command>patch</command> in its attempts to make a " 14363 "is more vigorous than <command>patch</command> in its attempts to make a "
14343 "patch apply." 14364 "patch apply."
14344 msgstr "" 14365 msgstr ""
14345 14366
14346 #. type: Content of: <book><chapter><sect1><sect2><para> 14367 #. type: Content of: <book><chapter><sect1><sect2><para>
14347 #: ../en/ch12-mq.xml:716 14368 #: ../en/ch12-mq.xml:717
14348 msgid "" 14369 msgid ""
14349 "Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), " 14370 "Another Linux kernel hacker, Chris Mason (the author of Mercurial Queues), "
14350 "wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</" 14371 "wrote a similar tool called <command>mpatch</command> <citation>web:mpatch</"
14351 "citation>, which takes a simple approach to automating the application of " 14372 "citation>, which takes a simple approach to automating the application of "
14352 "hunks rejected by <command>patch</command>. The <command>mpatch</command> " 14373 "hunks rejected by <command>patch</command>. The <command>mpatch</command> "
14353 "command can help with four common reasons that a hunk may be rejected:" 14374 "command can help with four common reasons that a hunk may be rejected:"
14354 msgstr "" 14375 msgstr ""
14355 14376
14356 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14377 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14357 #: ../en/ch12-mq.xml:725 14378 #: ../en/ch12-mq.xml:726
14358 msgid "The context in the middle of a hunk has changed." 14379 msgid "The context in the middle of a hunk has changed."
14359 msgstr "" 14380 msgstr ""
14360 14381
14361 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14382 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14362 #: ../en/ch12-mq.xml:728 14383 #: ../en/ch12-mq.xml:729
14363 msgid "A hunk is missing some context at the beginning or end." 14384 msgid "A hunk is missing some context at the beginning or end."
14364 msgstr "" 14385 msgstr ""
14365 14386
14366 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14387 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14367 #: ../en/ch12-mq.xml:731 14388 #: ../en/ch12-mq.xml:732
14368 msgid "" 14389 msgid ""
14369 "A large hunk might apply better&emdash;either entirely or in part&emdash;if " 14390 "A large hunk might apply better&emdash;either entirely or in part&emdash;if "
14370 "it was broken up into smaller hunks." 14391 "it was broken up into smaller hunks."
14371 msgstr "" 14392 msgstr ""
14372 14393
14373 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 14394 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
14374 #: ../en/ch12-mq.xml:735 14395 #: ../en/ch12-mq.xml:736
14375 msgid "" 14396 msgid ""
14376 "A hunk removes lines with slightly different content than those currently " 14397 "A hunk removes lines with slightly different content than those currently "
14377 "present in the file." 14398 "present in the file."
14378 msgstr "" 14399 msgstr ""
14379 14400
14380 #. type: Content of: <book><chapter><sect1><sect2><para> 14401 #. type: Content of: <book><chapter><sect1><sect2><para>
14381 #: ../en/ch12-mq.xml:739 14402 #: ../en/ch12-mq.xml:740
14382 msgid "" 14403 msgid ""
14383 "If you use <command>wiggle</command> or <command>mpatch</command>, you should " 14404 "If you use <command>wiggle</command> or <command>mpatch</command>, you should "
14384 "be doubly careful to check your results when you're done. In fact, " 14405 "be doubly careful to check your results when you're done. In fact, "
14385 "<command>mpatch</command> enforces this method of double-checking the tool's " 14406 "<command>mpatch</command> enforces this method of double-checking the tool's "
14386 "output, by automatically dropping you into a merge program when it has done " 14407 "output, by automatically dropping you into a merge program when it has done "
14387 "its job, so that you can verify its work and finish off any remaining merges." 14408 "its job, so that you can verify its work and finish off any remaining merges."
14388 msgstr "" 14409 msgstr ""
14389 14410
14390 #. type: Content of: <book><chapter><sect1><title> 14411 #. type: Content of: <book><chapter><sect1><title>
14391 #: ../en/ch12-mq.xml:751 14412 #: ../en/ch12-mq.xml:752
14392 msgid "Getting the best performance out of MQ" 14413 msgid "Getting the best performance out of MQ"
14393 msgstr "MQ 的性能" 14414 msgstr "MQ 的性能"
14394 14415
14395 #. type: Content of: <book><chapter><sect1><para> 14416 #. type: Content of: <book><chapter><sect1><para>
14396 #: ../en/ch12-mq.xml:753 14417 #: ../en/ch12-mq.xml:754
14397 msgid "" 14418 msgid ""
14398 "MQ is very efficient at handling a large number of patches. I ran some " 14419 "MQ is very efficient at handling a large number of patches. I ran some "
14399 "performance experiments in mid-2006 for a talk that I gave at the 2006 " 14420 "performance experiments in mid-2006 for a talk that I gave at the 2006 "
14400 "EuroPython conference <citation>web:europython</citation>. I used as my data " 14421 "EuroPython conference <citation>web:europython</citation>. I used as my data "
14401 "set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I " 14422 "set the Linux 2.6.17-mm1 patch series, which consists of 1,738 patches. I "
14402 "applied these on top of a Linux kernel repository containing all 27,472 " 14423 "applied these on top of a Linux kernel repository containing all 27,472 "
14403 "revisions between Linux 2.6.12-rc2 and Linux 2.6.17." 14424 "revisions between Linux 2.6.12-rc2 and Linux 2.6.17."
14404 msgstr "" 14425 msgstr ""
14405 14426
14406 #. type: Content of: <book><chapter><sect1><para> 14427 #. type: Content of: <book><chapter><sect1><para>
14407 #: ../en/ch12-mq.xml:762 14428 #: ../en/ch12-mq.xml:763
14408 msgid "" 14429 msgid ""
14409 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush " 14430 "On my old, slow laptop, I was able to <command role=\"hg-cmd\">hg qpush "
14410 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 " 14431 "<option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</option></command> all 1,738 "
14411 "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role=" 14432 "patches in 3.5 minutes, and <command role=\"hg-cmd\">hg qpop <option role="
14412 "\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. " 14433 "\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> them all in 30 seconds. "
14414 "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest " 14435 "could <command role=\"hg-ext-mq\">qrefresh</command> one of the biggest "
14415 "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds." 14436 "patches (which made 22,779 lines of changes to 287 files) in 6.6 seconds."
14416 msgstr "" 14437 msgstr ""
14417 14438
14418 #. type: Content of: <book><chapter><sect1><para> 14439 #. type: Content of: <book><chapter><sect1><para>
14419 #: ../en/ch12-mq.xml:773 14440 #: ../en/ch12-mq.xml:774
14420 msgid "" 14441 msgid ""
14421 "Clearly, MQ is well suited to working in large trees, but there are a few " 14442 "Clearly, MQ is well suited to working in large trees, but there are a few "
14422 "tricks you can use to get the best performance of it." 14443 "tricks you can use to get the best performance of it."
14423 msgstr "" 14444 msgstr ""
14424 14445
14425 #. type: Content of: <book><chapter><sect1><para> 14446 #. type: Content of: <book><chapter><sect1><para>
14426 #: ../en/ch12-mq.xml:777 14447 #: ../en/ch12-mq.xml:778
14427 msgid "" 14448 msgid ""
14428 "First of all, try to <quote>batch</quote> operations together. Every time " 14449 "First of all, try to <quote>batch</quote> operations together. Every time "
14429 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-" 14450 "you run <command role=\"hg-ext-mq\">qpush</command> or <command role=\"hg-ext-"
14430 "mq\">qpop</command>, these commands scan the working directory once to make " 14451 "mq\">qpop</command>, these commands scan the working directory once to make "
14431 "sure you haven't made some changes and then forgotten to run <command role=" 14452 "sure you haven't made some changes and then forgotten to run <command role="
14433 "takes is unnoticeable. However, on a medium-sized tree (containing tens of " 14454 "takes is unnoticeable. However, on a medium-sized tree (containing tens of "
14434 "thousands of files), it can take a second or more." 14455 "thousands of files), it can take a second or more."
14435 msgstr "" 14456 msgstr ""
14436 14457
14437 #. type: Content of: <book><chapter><sect1><para> 14458 #. type: Content of: <book><chapter><sect1><para>
14438 #: ../en/ch12-mq.xml:788 14459 #: ../en/ch12-mq.xml:789
14439 msgid "" 14460 msgid ""
14440 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq" 14461 "The <command role=\"hg-ext-mq\">qpush</command> and <command role=\"hg-ext-mq"
14441 "\">qpop</command> commands allow you to push and pop multiple patches at a " 14462 "\">qpop</command> commands allow you to push and pop multiple patches at a "
14442 "time. You can identify the <quote>destination patch</quote> that you want to " 14463 "time. You can identify the <quote>destination patch</quote> that you want to "
14443 "end up at. When you <command role=\"hg-ext-mq\">qpush</command> with a " 14464 "end up at. When you <command role=\"hg-ext-mq\">qpush</command> with a "
14445 "the applied stack. When you <command role=\"hg-ext-mq\">qpop</command> to a " 14466 "the applied stack. When you <command role=\"hg-ext-mq\">qpop</command> to a "
14446 "destination, MQ will pop patches until the destination patch is at the top." 14467 "destination, MQ will pop patches until the destination patch is at the top."
14447 msgstr "" 14468 msgstr ""
14448 14469
14449 #. type: Content of: <book><chapter><sect1><para> 14470 #. type: Content of: <book><chapter><sect1><para>
14450 #: ../en/ch12-mq.xml:798 14471 #: ../en/ch12-mq.xml:799
14451 msgid "" 14472 msgid ""
14452 "You can identify a destination patch using either the name of the patch, or " 14473 "You can identify a destination patch using either the name of the patch, or "
14453 "by number. If you use numeric addressing, patches are counted from zero; " 14474 "by number. If you use numeric addressing, patches are counted from zero; "
14454 "this means that the first patch is zero, the second is one, and so on." 14475 "this means that the first patch is zero, the second is one, and so on."
14455 msgstr "" 14476 msgstr ""
14456 14477
14457 #. type: Content of: <book><chapter><sect1><title> 14478 #. type: Content of: <book><chapter><sect1><title>
14458 #: ../en/ch12-mq.xml:805 14479 #: ../en/ch12-mq.xml:806
14459 msgid "Updating your patches when the underlying code changes" 14480 msgid "Updating your patches when the underlying code changes"
14460 msgstr "当基础代码改变时,更新补丁的方法" 14481 msgstr "当基础代码改变时,更新补丁的方法"
14461 14482
14462 #. type: Content of: <book><chapter><sect1><para> 14483 #. type: Content of: <book><chapter><sect1><para>
14463 #: ../en/ch12-mq.xml:808 14484 #: ../en/ch12-mq.xml:809
14464 msgid "" 14485 msgid ""
14465 "It's common to have a stack of patches on top of an underlying repository " 14486 "It's common to have a stack of patches on top of an underlying repository "
14466 "that you don't modify directly. If you're working on changes to third-party " 14487 "that you don't modify directly. If you're working on changes to third-party "
14467 "code, or on a feature that is taking longer to develop than the rate of " 14488 "code, or on a feature that is taking longer to develop than the rate of "
14468 "change of the code beneath, you will often need to sync up with the " 14489 "change of the code beneath, you will often need to sync up with the "
14469 "underlying code, and fix up any hunks in your patches that no longer apply. " 14490 "underlying code, and fix up any hunks in your patches that no longer apply. "
14470 "This is called <emphasis>rebasing</emphasis> your patch series." 14491 "This is called <emphasis>rebasing</emphasis> your patch series."
14471 msgstr "" 14492 msgstr ""
14472 14493
14473 #. type: Content of: <book><chapter><sect1><para> 14494 #. type: Content of: <book><chapter><sect1><para>
14474 #: ../en/ch12-mq.xml:817 14495 #: ../en/ch12-mq.xml:818
14475 msgid "" 14496 msgid ""
14476 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option " 14497 "The simplest way to do this is to <command role=\"hg-cmd\">hg qpop <option "
14477 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then " 14498 "role=\"hg-ext-mq-cmd-qpop-opt\">hg -a</option></command> your patches, then "
14478 "<command role=\"hg-cmd\">hg pull</command> changes into the underlying " 14499 "<command role=\"hg-cmd\">hg pull</command> changes into the underlying "
14479 "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-" 14500 "repository, and finally <command role=\"hg-cmd\">hg qpush <option role=\"hg-"
14483 "\">qrefresh</command> the affected patch, and continue pushing until you have " 14504 "\">qrefresh</command> the affected patch, and continue pushing until you have "
14484 "fixed your entire stack." 14505 "fixed your entire stack."
14485 msgstr "" 14506 msgstr ""
14486 14507
14487 #. type: Content of: <book><chapter><sect1><para> 14508 #. type: Content of: <book><chapter><sect1><para>
14488 #: ../en/ch12-mq.xml:829 14509 #: ../en/ch12-mq.xml:830
14489 msgid "" 14510 msgid ""
14490 "This approach is easy to use and works well if you don't expect changes to " 14511 "This approach is easy to use and works well if you don't expect changes to "
14491 "the underlying code to affect how well your patches apply. If your patch " 14512 "the underlying code to affect how well your patches apply. If your patch "
14492 "stack touches code that is modified frequently or invasively in the " 14513 "stack touches code that is modified frequently or invasively in the "
14493 "underlying repository, however, fixing up rejected hunks by hand quickly " 14514 "underlying repository, however, fixing up rejected hunks by hand quickly "
14494 "becomes tiresome." 14515 "becomes tiresome."
14495 msgstr "" 14516 msgstr ""
14496 14517
14497 #. type: Content of: <book><chapter><sect1><para> 14518 #. type: Content of: <book><chapter><sect1><para>
14498 #: ../en/ch12-mq.xml:836 14519 #: ../en/ch12-mq.xml:837
14499 msgid "" 14520 msgid ""
14500 "It's possible to partially automate the rebasing process. If your patches " 14521 "It's possible to partially automate the rebasing process. If your patches "
14501 "apply cleanly against some revision of the underlying repo, MQ can use this " 14522 "apply cleanly against some revision of the underlying repo, MQ can use this "
14502 "information to help you to resolve conflicts between your patches and a " 14523 "information to help you to resolve conflicts between your patches and a "
14503 "different revision." 14524 "different revision."
14504 msgstr "" 14525 msgstr ""
14505 14526
14506 #. type: Content of: <book><chapter><sect1><para> 14527 #. type: Content of: <book><chapter><sect1><para>
14507 #: ../en/ch12-mq.xml:842 14528 #: ../en/ch12-mq.xml:843
14508 msgid "The process is a little involved." 14529 msgid "The process is a little involved."
14509 msgstr "" 14530 msgstr ""
14510 14531
14511 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14532 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14512 #: ../en/ch12-mq.xml:844 14533 #: ../en/ch12-mq.xml:845
14513 msgid "" 14534 msgid ""
14514 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches " 14535 "To begin, <command role=\"hg-cmd\">hg qpush -a</command> all of your patches "
14515 "on top of the revision where you know that they apply cleanly." 14536 "on top of the revision where you know that they apply cleanly."
14516 msgstr "" 14537 msgstr ""
14517 14538
14518 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14539 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14519 #: ../en/ch12-mq.xml:848 14540 #: ../en/ch12-mq.xml:849
14520 msgid "" 14541 msgid ""
14521 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg " 14542 "Save a backup copy of your patch directory using <command role=\"hg-cmd\">hg "
14522 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role=" 14543 "qsave <option role=\"hg-ext-mq-cmd-qsave-opt\">hg -e</option> <option role="
14523 "\"hg-ext-mq-cmd-qsave-opt\">hg -c</option></command>. This prints the name " 14544 "\"hg-ext-mq-cmd-qsave-opt\">hg -c</option></command>. This prints the name "
14524 "of the directory that it has saved the patches in. It will save the patches " 14545 "of the directory that it has saved the patches in. It will save the patches "
14529 "\"special\">series</filename> and <filename role=\"special\">status</" 14550 "\"special\">series</filename> and <filename role=\"special\">status</"
14530 "filename> files." 14551 "filename> files."
14531 msgstr "" 14552 msgstr ""
14532 14553
14533 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14554 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14534 #: ../en/ch12-mq.xml:862 14555 #: ../en/ch12-mq.xml:863
14535 msgid "" 14556 msgid ""
14536 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the " 14557 "Use <command role=\"hg-cmd\">hg pull</command> to bring new changes into the "
14537 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</" 14558 "underlying repository. (Don't run <command role=\"hg-cmd\">hg pull -u</"
14538 "command>; see below for why.)" 14559 "command>; see below for why.)"
14539 msgstr "" 14560 msgstr ""
14540 14561
14541 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14562 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14542 #: ../en/ch12-mq.xml:867 14563 #: ../en/ch12-mq.xml:868
14543 msgid "" 14564 msgid ""
14544 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update " 14565 "Update to the new tip revision, using <command role=\"hg-cmd\">hg update "
14545 "<option role=\"hg-opt-update\">-C</option></command> to override the patches " 14566 "<option role=\"hg-opt-update\">-C</option></command> to override the patches "
14546 "you have pushed." 14567 "you have pushed."
14547 msgstr "" 14568 msgstr ""
14548 14569
14549 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para> 14570 #. type: Content of: <book><chapter><sect1><orderedlist><listitem><para>
14550 #: ../en/ch12-mq.xml:872 14571 #: ../en/ch12-mq.xml:873
14551 msgid "" 14572 msgid ""
14552 "Merge all patches using \\hgcmdargs{qpush}{<option role=\"hg-ext-mq-cmd-qpush-" 14573 "Merge all patches using \\hgcmdargs{qpush}{<option role=\"hg-ext-mq-cmd-qpush-"
14553 "opt\">hg -m</option> <option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</" 14574 "opt\">hg -m</option> <option role=\"hg-ext-mq-cmd-qpush-opt\">hg -a</"
14554 "option>}. The <option role=\"hg-ext-mq-cmd-qpush-opt\">hg -m</option> option " 14575 "option>}. The <option role=\"hg-ext-mq-cmd-qpush-opt\">hg -m</option> option "
14555 "to <command role=\"hg-ext-mq\">qpush</command> tells MQ to perform a three-" 14576 "to <command role=\"hg-ext-mq\">qpush</command> tells MQ to perform a three-"
14556 "way merge if the patch fails to apply." 14577 "way merge if the patch fails to apply."
14557 msgstr "" 14578 msgstr ""
14558 14579
14559 #. type: Content of: <book><chapter><sect1><para> 14580 #. type: Content of: <book><chapter><sect1><para>
14560 #: ../en/ch12-mq.xml:882 14581 #: ../en/ch12-mq.xml:883
14561 msgid "" 14582 msgid ""
14562 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-" 14583 "During the <command role=\"hg-cmd\">hg qpush <option role=\"hg-ext-mq-cmd-"
14563 "qpush-opt\">hg -m</option></command>, each patch in the <filename role=" 14584 "qpush-opt\">hg -m</option></command>, each patch in the <filename role="
14564 "\"special\">series</filename> file is applied normally. If a patch applies " 14585 "\"special\">series</filename> file is applied normally. If a patch applies "
14565 "with fuzz or rejects, MQ looks at the queue you <command role=\"hg-ext-mq" 14586 "with fuzz or rejects, MQ looks at the queue you <command role=\"hg-ext-mq"
14567 "changeset. This merge uses Mercurial's normal merge machinery, so it may pop " 14588 "changeset. This merge uses Mercurial's normal merge machinery, so it may pop "
14568 "up a GUI merge tool to help you to resolve problems." 14589 "up a GUI merge tool to help you to resolve problems."
14569 msgstr "" 14590 msgstr ""
14570 14591
14571 #. type: Content of: <book><chapter><sect1><para> 14592 #. type: Content of: <book><chapter><sect1><para>
14572 #: ../en/ch12-mq.xml:892 14593 #: ../en/ch12-mq.xml:893
14573 msgid "" 14594 msgid ""
14574 "When you finish resolving the effects of a patch, MQ refreshes your patch " 14595 "When you finish resolving the effects of a patch, MQ refreshes your patch "
14575 "based on the result of the merge." 14596 "based on the result of the merge."
14576 msgstr "" 14597 msgstr ""
14577 14598
14578 #. type: Content of: <book><chapter><sect1><para> 14599 #. type: Content of: <book><chapter><sect1><para>
14579 #: ../en/ch12-mq.xml:895 14600 #: ../en/ch12-mq.xml:896
14580 msgid "" 14601 msgid ""
14581 "At the end of this process, your repository will have one extra head from the " 14602 "At the end of this process, your repository will have one extra head from the "
14582 "old patch queue, and a copy of the old patch queue will be in <filename role=" 14603 "old patch queue, and a copy of the old patch queue will be in <filename role="
14583 "\"special\" class=\"directory\">.hg/patches.N</filename>. You can remove the " 14604 "\"special\" class=\"directory\">.hg/patches.N</filename>. You can remove the "
14584 "extra head using <command role=\"hg-cmd\">hg qpop -a -n patches.N</command> " 14605 "extra head using <command role=\"hg-cmd\">hg qpop -a -n patches.N</command> "
14586 "role=\"special\" class=\"directory\">.hg/patches.N</filename> once you are " 14607 "role=\"special\" class=\"directory\">.hg/patches.N</filename> once you are "
14587 "sure that you no longer need it as a backup." 14608 "sure that you no longer need it as a backup."
14588 msgstr "" 14609 msgstr ""
14589 14610
14590 #. type: Content of: <book><chapter><sect1><title> 14611 #. type: Content of: <book><chapter><sect1><title>
14591 #: ../en/ch12-mq.xml:907 14612 #: ../en/ch12-mq.xml:908
14592 msgid "Identifying patches" 14613 msgid "Identifying patches"
14593 msgstr "标识补丁" 14614 msgstr "标识补丁"
14594 14615
14595 #. type: Content of: <book><chapter><sect1><para> 14616 #. type: Content of: <book><chapter><sect1><para>
14596 #: ../en/ch12-mq.xml:909 14617 #: ../en/ch12-mq.xml:910
14597 msgid "" 14618 msgid ""
14598 "MQ commands that work with patches let you refer to a patch either by using " 14619 "MQ commands that work with patches let you refer to a patch either by using "
14599 "its name or by a number. By name is obvious enough; pass the name " 14620 "its name or by a number. By name is obvious enough; pass the name "
14600 "<filename>foo.patch</filename> to <command role=\"hg-ext-mq\">qpush</" 14621 "<filename>foo.patch</filename> to <command role=\"hg-ext-mq\">qpush</"
14601 "command>, for example, and it will push patches until <filename>foo.patch</" 14622 "command>, for example, and it will push patches until <filename>foo.patch</"
14602 "filename> is applied." 14623 "filename> is applied."
14603 msgstr "" 14624 msgstr ""
14604 14625
14605 #. type: Content of: <book><chapter><sect1><para> 14626 #. type: Content of: <book><chapter><sect1><para>
14606 #: ../en/ch12-mq.xml:916 14627 #: ../en/ch12-mq.xml:917
14607 msgid "" 14628 msgid ""
14608 "As a shortcut, you can refer to a patch using both a name and a numeric " 14629 "As a shortcut, you can refer to a patch using both a name and a numeric "
14609 "offset; <literal>foo.patch-2</literal> means <quote>two patches before " 14630 "offset; <literal>foo.patch-2</literal> means <quote>two patches before "
14610 "<literal>foo.patch</literal></quote>, while <literal>bar.patch+4</literal> " 14631 "<literal>foo.patch</literal></quote>, while <literal>bar.patch+4</literal> "
14611 "means <quote>four patches after <literal>bar.patch</literal></quote>." 14632 "means <quote>four patches after <literal>bar.patch</literal></quote>."
14612 msgstr "" 14633 msgstr ""
14613 14634
14614 #. type: Content of: <book><chapter><sect1><para> 14635 #. type: Content of: <book><chapter><sect1><para>
14615 #: ../en/ch12-mq.xml:922 14636 #: ../en/ch12-mq.xml:923
14616 msgid "" 14637 msgid ""
14617 "Referring to a patch by index isn't much different. The first patch printed " 14638 "Referring to a patch by index isn't much different. The first patch printed "
14618 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero " 14639 "in the output of <command role=\"hg-ext-mq\">qseries</command> is patch zero "
14619 "(yes, it's one of those start-at-zero counting systems); the second is patch " 14640 "(yes, it's one of those start-at-zero counting systems); the second is patch "
14620 "one; and so on." 14641 "one; and so on."
14621 msgstr "" 14642 msgstr ""
14622 14643
14623 #. type: Content of: <book><chapter><sect1><para> 14644 #. type: Content of: <book><chapter><sect1><para>
14624 #: ../en/ch12-mq.xml:928 14645 #: ../en/ch12-mq.xml:929
14625 msgid "" 14646 msgid ""
14626 "MQ also makes it easy to work with patches when you are using normal " 14647 "MQ also makes it easy to work with patches when you are using normal "
14627 "Mercurial commands. Every command that accepts a changeset ID will also " 14648 "Mercurial commands. Every command that accepts a changeset ID will also "
14628 "accept the name of an applied patch. MQ augments the tags normally in the " 14649 "accept the name of an applied patch. MQ augments the tags normally in the "
14629 "repository with an eponymous one for each applied patch. In addition, the " 14650 "repository with an eponymous one for each applied patch. In addition, the "
14632 "literal>}<literal>qtip</literal> identify the <quote>bottom-most</quote> and " 14653 "literal>}<literal>qtip</literal> identify the <quote>bottom-most</quote> and "
14633 "topmost applied patches, respectively." 14654 "topmost applied patches, respectively."
14634 msgstr "" 14655 msgstr ""
14635 14656
14636 #. type: Content of: <book><chapter><sect1><para> 14657 #. type: Content of: <book><chapter><sect1><para>
14637 #: ../en/ch12-mq.xml:940 14658 #: ../en/ch12-mq.xml:941
14638 msgid "" 14659 msgid ""
14639 "These additions to Mercurial's normal tagging capabilities make dealing with " 14660 "These additions to Mercurial's normal tagging capabilities make dealing with "
14640 "patches even more of a breeze." 14661 "patches even more of a breeze."
14641 msgstr "" 14662 msgstr ""
14642 14663
14643 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14664 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14644 #: ../en/ch12-mq.xml:943 14665 #: ../en/ch12-mq.xml:944
14645 msgid "Want to patchbomb a mailing list with your latest series of changes?" 14666 msgid "Want to patchbomb a mailing list with your latest series of changes?"
14646 msgstr "" 14667 msgstr ""
14647 14668
14648 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14669 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14649 #: ../en/ch12-mq.xml:947 14670 #: ../en/ch12-mq.xml:948
14650 msgid "" 14671 msgid ""
14651 "(Don't know what <quote>patchbombing</quote> is? See section <xref linkend=" 14672 "(Don't know what <quote>patchbombing</quote> is? See section <xref linkend="
14652 "\"sec.hgext.patchbomb\"/>.)" 14673 "\"sec.hgext.patchbomb\"/>.)"
14653 msgstr "" 14674 msgstr ""
14654 14675
14655 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14676 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14656 #: ../en/ch12-mq.xml:950 14677 #: ../en/ch12-mq.xml:951
14657 msgid "" 14678 msgid ""
14658 "Need to see all of the patches since <literal>foo.patch</literal> that have " 14679 "Need to see all of the patches since <literal>foo.patch</literal> that have "
14659 "touched files in a subdirectory of your tree?" 14680 "touched files in a subdirectory of your tree?"
14660 msgstr "" 14681 msgstr ""
14661 14682
14662 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><programlisting><emphasis> 14683 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><programlisting><emphasis>
14663 #: ../en/ch12-mq.xml:954 14684 #: ../en/ch12-mq.xml:955
14664 msgid "subdir" 14685 msgid "subdir"
14665 msgstr "" 14686 msgstr ""
14666 14687
14667 #. type: Content of: <book><chapter><sect1><para> 14688 #. type: Content of: <book><chapter><sect1><para>
14668 #: ../en/ch12-mq.xml:959 14689 #: ../en/ch12-mq.xml:960
14669 msgid "" 14690 msgid ""
14670 "Because MQ makes the names of patches available to the rest of Mercurial " 14691 "Because MQ makes the names of patches available to the rest of Mercurial "
14671 "through its normal internal tag machinery, you don't need to type in the " 14692 "through its normal internal tag machinery, you don't need to type in the "
14672 "entire name of a patch when you want to identify it by name." 14693 "entire name of a patch when you want to identify it by name."
14673 msgstr "" 14694 msgstr ""
14674 14695
14675 #. type: Content of: <book><chapter><sect1><para> 14696 #. type: Content of: <book><chapter><sect1><para>
14676 #: ../en/ch12-mq.xml:964 14697 #: ../en/ch12-mq.xml:965
14677 msgid "" 14698 msgid ""
14678 "Another nice consequence of representing patch names as tags is that when you " 14699 "Another nice consequence of representing patch names as tags is that when you "
14679 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a " 14700 "run the <command role=\"hg-cmd\">hg log</command> command, it will display a "
14680 "patch's name as a tag, simply as part of its normal output. This makes it " 14701 "patch's name as a tag, simply as part of its normal output. This makes it "
14681 "easy to visually distinguish applied patches from underlying <quote>normal</" 14702 "easy to visually distinguish applied patches from underlying <quote>normal</"
14682 "quote> revisions. The following example shows a few normal Mercurial " 14703 "quote> revisions. The following example shows a few normal Mercurial "
14683 "commands in use with applied patches." 14704 "commands in use with applied patches."
14684 msgstr "" 14705 msgstr ""
14685 14706
14686 #. type: Content of: <book><chapter><sect1><title> 14707 #. type: Content of: <book><chapter><sect1><title>
14687 #: ../en/ch12-mq.xml:977 14708 #: ../en/ch12-mq.xml:978
14688 msgid "Useful things to know about" 14709 msgid "Useful things to know about"
14689 msgstr "其它需要了解的东西" 14710 msgstr "其它需要了解的东西"
14690 14711
14691 #. type: Content of: <book><chapter><sect1><para> 14712 #. type: Content of: <book><chapter><sect1><para>
14692 #: ../en/ch12-mq.xml:979 14713 #: ../en/ch12-mq.xml:980
14693 msgid "" 14714 msgid ""
14694 "There are a number of aspects of MQ usage that don't fit tidily into sections " 14715 "There are a number of aspects of MQ usage that don't fit tidily into sections "
14695 "of their own, but that are good to know. Here they are, in one place." 14716 "of their own, but that are good to know. Here they are, in one place."
14696 msgstr "" 14717 msgstr ""
14697 14718
14698 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14719 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14699 #: ../en/ch12-mq.xml:984 14720 #: ../en/ch12-mq.xml:985
14700 msgid "" 14721 msgid ""
14701 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and " 14722 "Normally, when you <command role=\"hg-ext-mq\">qpop</command> a patch and "
14702 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that " 14723 "<command role=\"hg-ext-mq\">qpush</command> it again, the changeset that "
14703 "represents the patch after the pop/push will have a <emphasis>different " 14724 "represents the patch after the pop/push will have a <emphasis>different "
14704 "identity</emphasis> than the changeset that represented the hash beforehand. " 14725 "identity</emphasis> than the changeset that represented the hash beforehand. "
14705 "See section <xref linkend=\"sec.mqref.cmd.qpush\"/> for information as to why " 14726 "See section <xref linkend=\"sec.mqref.cmd.qpush\"/> for information as to why "
14706 "this is." 14727 "this is."
14707 msgstr "" 14728 msgstr ""
14708 14729
14709 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para> 14730 #. type: Content of: <book><chapter><sect1><itemizedlist><listitem><para>
14710 #: ../en/ch12-mq.xml:993 14731 #: ../en/ch12-mq.xml:994
14711 msgid "" 14732 msgid ""
14712 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes " 14733 "It's not a good idea to <command role=\"hg-cmd\">hg merge</command> changes "
14713 "from another branch with a patch changeset, at least if you want to maintain " 14734 "from another branch with a patch changeset, at least if you want to maintain "
14714 "the <quote>patchiness</quote> of that changeset and changesets below it on " 14735 "the <quote>patchiness</quote> of that changeset and changesets below it on "
14715 "the patch stack. If you try to do this, it will appear to succeed, but MQ " 14736 "the patch stack. If you try to do this, it will appear to succeed, but MQ "
14716 "will become confused." 14737 "will become confused."
14717 msgstr "" 14738 msgstr ""
14718 14739
14719 #. type: Content of: <book><chapter><sect1><title> 14740 #. type: Content of: <book><chapter><sect1><title>
14720 #: ../en/ch12-mq.xml:1004 14741 #: ../en/ch12-mq.xml:1005
14721 msgid "Managing patches in a repository" 14742 msgid "Managing patches in a repository"
14722 msgstr "在版本库管理补丁" 14743 msgstr "在版本库管理补丁"
14723 14744
14724 #. type: Content of: <book><chapter><sect1><para> 14745 #. type: Content of: <book><chapter><sect1><para>
14725 #: ../en/ch12-mq.xml:1006 14746 #: ../en/ch12-mq.xml:1007
14726 msgid "" 14747 msgid ""
14727 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</" 14748 "Because MQ's <filename role=\"special\" class=\"directory\">.hg/patches</"
14728 "filename> directory resides outside a Mercurial repository's working " 14749 "filename> directory resides outside a Mercurial repository's working "
14729 "directory, the <quote>underlying</quote> Mercurial repository knows nothing " 14750 "directory, the <quote>underlying</quote> Mercurial repository knows nothing "
14730 "about the management or presence of patches." 14751 "about the management or presence of patches."
14731 msgstr "" 14752 msgstr ""
14732 14753
14733 #. type: Content of: <book><chapter><sect1><para> 14754 #. type: Content of: <book><chapter><sect1><para>
14734 #: ../en/ch12-mq.xml:1012 14755 #: ../en/ch12-mq.xml:1013
14735 msgid "" 14756 msgid ""
14736 "This presents the interesting possibility of managing the contents of the " 14757 "This presents the interesting possibility of managing the contents of the "
14737 "patch directory as a Mercurial repository in its own right. This can be a " 14758 "patch directory as a Mercurial repository in its own right. This can be a "
14738 "useful way to work. For example, you can work on a patch for a while, " 14759 "useful way to work. For example, you can work on a patch for a while, "
14739 "<command role=\"hg-ext-mq\">qrefresh</command> it, then <command role=\"hg-cmd" 14760 "<command role=\"hg-ext-mq\">qrefresh</command> it, then <command role=\"hg-cmd"
14740 "\">hg commit</command> the current state of the patch. This lets you " 14761 "\">hg commit</command> the current state of the patch. This lets you "
14741 "<quote>roll back</quote> to that version of the patch later on." 14762 "<quote>roll back</quote> to that version of the patch later on."
14742 msgstr "" 14763 msgstr ""
14743 14764
14744 #. type: Content of: <book><chapter><sect1><para> 14765 #. type: Content of: <book><chapter><sect1><para>
14745 #: ../en/ch12-mq.xml:1021 14766 #: ../en/ch12-mq.xml:1022
14746 msgid "" 14767 msgid ""
14747 "You can then share different versions of the same patch stack among multiple " 14768 "You can then share different versions of the same patch stack among multiple "
14748 "underlying repositories. I use this when I am developing a Linux kernel " 14769 "underlying repositories. I use this when I am developing a Linux kernel "
14749 "feature. I have a pristine copy of my kernel sources for each of several CPU " 14770 "feature. I have a pristine copy of my kernel sources for each of several CPU "
14750 "architectures, and a cloned repository under each that contains the patches I " 14771 "architectures, and a cloned repository under each that contains the patches I "
14752 "push my current patches to the patch repository associated with that kernel " 14773 "push my current patches to the patch repository associated with that kernel "
14753 "tree, pop and push all of my patches, and build and test that kernel." 14774 "tree, pop and push all of my patches, and build and test that kernel."
14754 msgstr "" 14775 msgstr ""
14755 14776
14756 #. type: Content of: <book><chapter><sect1><para> 14777 #. type: Content of: <book><chapter><sect1><para>
14757 #: ../en/ch12-mq.xml:1031 14778 #: ../en/ch12-mq.xml:1032
14758 msgid "" 14779 msgid ""
14759 "Managing patches in a repository makes it possible for multiple developers to " 14780 "Managing patches in a repository makes it possible for multiple developers to "
14760 "work on the same patch series without colliding with each other, all on top " 14781 "work on the same patch series without colliding with each other, all on top "
14761 "of an underlying source base that they may or may not control." 14782 "of an underlying source base that they may or may not control."
14762 msgstr "" 14783 msgstr ""
14763 14784
14764 #. type: Content of: <book><chapter><sect1><sect2><title> 14785 #. type: Content of: <book><chapter><sect1><sect2><title>
14765 #: ../en/ch12-mq.xml:1037 14786 #: ../en/ch12-mq.xml:1038
14766 msgid "MQ support for patch repositories" 14787 msgid "MQ support for patch repositories"
14767 msgstr "MQ 支持补丁版本库" 14788 msgstr "MQ 支持补丁版本库"
14768 14789
14769 #. type: Content of: <book><chapter><sect1><sect2><para> 14790 #. type: Content of: <book><chapter><sect1><sect2><para>
14770 #: ../en/ch12-mq.xml:1039 14791 #: ../en/ch12-mq.xml:1040
14771 msgid "" 14792 msgid ""
14772 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">." 14793 "MQ helps you to work with the <filename role=\"special\" class=\"directory\">."
14773 "hg/patches</filename> directory as a repository; when you prepare a " 14794 "hg/patches</filename> directory as a repository; when you prepare a "
14774 "repository for working with patches using <command role=\"hg-ext-mq\">qinit</" 14795 "repository for working with patches using <command role=\"hg-ext-mq\">qinit</"
14775 "command>, you can pass the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 14796 "command>, you can pass the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
14776 "option> option to create the <filename role=\"special\" class=\"directory\">." 14797 "option> option to create the <filename role=\"special\" class=\"directory\">."
14777 "hg/patches</filename> directory as a Mercurial repository." 14798 "hg/patches</filename> directory as a Mercurial repository."
14778 msgstr "" 14799 msgstr ""
14779 14800
14780 #. type: Content of: <book><chapter><sect1><sect2><note><para> 14801 #. type: Content of: <book><chapter><sect1><sect2><note><para>
14781 #: ../en/ch12-mq.xml:1049 14802 #: ../en/ch12-mq.xml:1050
14782 msgid "" 14803 msgid ""
14783 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</" 14804 "If you forget to use the <option role=\"hg-ext-mq-cmd-qinit-opt\">hg -c</"
14784 "option> option, you can simply go into the <filename role=\"special\" class=" 14805 "option> option, you can simply go into the <filename role=\"special\" class="
14785 "\"directory\">.hg/patches</filename> directory at any time and run <command " 14806 "\"directory\">.hg/patches</filename> directory at any time and run <command "
14786 "role=\"hg-cmd\">hg init</command>. Don't forget to add an entry for the " 14807 "role=\"hg-cmd\">hg init</command>. Don't forget to add an entry for the "
14787 "<filename role=\"special\">status</filename> file to the <filename role=" 14808 "<filename role=\"special\">status</filename> file to the <filename role="
14788 "\"special\">.hgignore</filename> file, though" 14809 "\"special\">.hgignore</filename> file, though"
14789 msgstr "" 14810 msgstr ""
14790 14811
14791 #. type: Content of: <book><chapter><sect1><sect2><note><para> 14812 #. type: Content of: <book><chapter><sect1><sect2><note><para>
14792 #: ../en/ch12-mq.xml:1058 14813 #: ../en/ch12-mq.xml:1059
14793 msgid "" 14814 msgid ""
14794 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt" 14815 "(<command role=\"hg-cmd\">hg qinit <option role=\"hg-ext-mq-cmd-qinit-opt"
14795 "\">hg -c</option></command> does this for you automatically); you " 14816 "\">hg -c</option></command> does this for you automatically); you "
14796 "<emphasis>really</emphasis> don't want to manage the <filename role=\"special" 14817 "<emphasis>really</emphasis> don't want to manage the <filename role=\"special"
14797 "\">status</filename> file." 14818 "\">status</filename> file."
14798 msgstr "" 14819 msgstr ""
14799 14820
14800 #. type: Content of: <book><chapter><sect1><sect2><para> 14821 #. type: Content of: <book><chapter><sect1><sect2><para>
14801 #: ../en/ch12-mq.xml:1065 14822 #: ../en/ch12-mq.xml:1066
14802 msgid "" 14823 msgid ""
14803 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/" 14824 "As a convenience, if MQ notices that the <filename class=\"directory\">.hg/"
14804 "patches</filename> directory is a repository, it will automatically <command " 14825 "patches</filename> directory is a repository, it will automatically <command "
14805 "role=\"hg-cmd\">hg add</command> every patch that you create and import." 14826 "role=\"hg-cmd\">hg add</command> every patch that you create and import."
14806 msgstr "" 14827 msgstr ""
14807 14828
14808 #. type: Content of: <book><chapter><sect1><sect2><para> 14829 #. type: Content of: <book><chapter><sect1><sect2><para>
14809 #: ../en/ch12-mq.xml:1070 14830 #: ../en/ch12-mq.xml:1071
14810 msgid "" 14831 msgid ""
14811 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</" 14832 "MQ provides a shortcut command, <command role=\"hg-ext-mq\">qcommit</"
14812 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the " 14833 "command>, that runs <command role=\"hg-cmd\">hg commit</command> in the "
14813 "<filename role=\"special\" class=\"directory\">.hg/patches</filename> " 14834 "<filename role=\"special\" class=\"directory\">.hg/patches</filename> "
14814 "directory. This saves some bothersome typing." 14835 "directory. This saves some bothersome typing."
14815 msgstr "" 14836 msgstr ""
14816 14837
14817 #. type: Content of: <book><chapter><sect1><sect2><para> 14838 #. type: Content of: <book><chapter><sect1><sect2><para>
14818 #: ../en/ch12-mq.xml:1076 14839 #: ../en/ch12-mq.xml:1077
14819 msgid "" 14840 msgid ""
14820 "Finally, as a convenience to manage the patch directory, you can define the " 14841 "Finally, as a convenience to manage the patch directory, you can define the "
14821 "alias <command>mq</command> on Unix systems. For example, on Linux systems " 14842 "alias <command>mq</command> on Unix systems. For example, on Linux systems "
14822 "using the <command>bash</command> shell, you can include the following " 14843 "using the <command>bash</command> shell, you can include the following "
14823 "snippet in your <filename role=\"home\">~/.bashrc</filename>." 14844 "snippet in your <filename role=\"home\">~/.bashrc</filename>."
14824 msgstr "" 14845 msgstr ""
14825 14846
14826 #. type: Content of: <book><chapter><sect1><sect2><para> 14847 #. type: Content of: <book><chapter><sect1><sect2><para>
14827 #: ../en/ch12-mq.xml:1086 14848 #: ../en/ch12-mq.xml:1087
14828 msgid "" 14849 msgid ""
14829 "You can then issue commands of the form <command>mq pull</command> from the " 14850 "You can then issue commands of the form <command>mq pull</command> from the "
14830 "main repository." 14851 "main repository."
14831 msgstr "" 14852 msgstr ""
14832 14853
14833 #. type: Content of: <book><chapter><sect1><sect2><title> 14854 #. type: Content of: <book><chapter><sect1><sect2><title>
14834 #: ../en/ch12-mq.xml:1091 14855 #: ../en/ch12-mq.xml:1092
14835 msgid "A few things to watch out for" 14856 msgid "A few things to watch out for"
14836 msgstr "需要注意的事情" 14857 msgstr "需要注意的事情"
14837 14858
14838 #. type: Content of: <book><chapter><sect1><sect2><para> 14859 #. type: Content of: <book><chapter><sect1><sect2><para>
14839 #: ../en/ch12-mq.xml:1093 14860 #: ../en/ch12-mq.xml:1094
14840 msgid "" 14861 msgid ""
14841 "MQ's support for working with a repository full of patches is limited in a " 14862 "MQ's support for working with a repository full of patches is limited in a "
14842 "few small respects." 14863 "few small respects."
14843 msgstr "" 14864 msgstr ""
14844 14865
14845 #. type: Content of: <book><chapter><sect1><sect2><para> 14866 #. type: Content of: <book><chapter><sect1><sect2><para>
14846 #: ../en/ch12-mq.xml:1096 14867 #: ../en/ch12-mq.xml:1097
14847 msgid "" 14868 msgid ""
14848 "MQ cannot automatically detect changes that you make to the patch directory. " 14869 "MQ cannot automatically detect changes that you make to the patch directory. "
14849 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command " 14870 "If you <command role=\"hg-cmd\">hg pull</command>, manually edit, or <command "
14850 "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role=" 14871 "role=\"hg-cmd\">hg update</command> changes to patches or the <filename role="
14851 "\"special\">series</filename> file, you will have to <command role=\"hg-cmd" 14872 "\"special\">series</filename> file, you will have to <command role=\"hg-cmd"
14855 "changes show up there. If you forget to do this, you can confuse MQ's idea " 14876 "changes show up there. If you forget to do this, you can confuse MQ's idea "
14856 "of which patches are applied." 14877 "of which patches are applied."
14857 msgstr "" 14878 msgstr ""
14858 14879
14859 #. type: Content of: <book><chapter><sect1><title> 14880 #. type: Content of: <book><chapter><sect1><title>
14860 #: ../en/ch12-mq.xml:1112 14881 #: ../en/ch12-mq.xml:1113
14861 msgid "Third party tools for working with patches" 14882 msgid "Third party tools for working with patches"
14862 msgstr "操作补丁的第三方工具" 14883 msgstr "操作补丁的第三方工具"
14863 14884
14864 #. type: Content of: <book><chapter><sect1><para> 14885 #. type: Content of: <book><chapter><sect1><para>
14865 #: ../en/ch12-mq.xml:1114 14886 #: ../en/ch12-mq.xml:1115
14866 msgid "" 14887 msgid ""
14867 "Once you've been working with patches for a while, you'll find yourself " 14888 "Once you've been working with patches for a while, you'll find yourself "
14868 "hungry for tools that will help you to understand and manipulate the patches " 14889 "hungry for tools that will help you to understand and manipulate the patches "
14869 "you're dealing with." 14890 "you're dealing with."
14870 msgstr "" 14891 msgstr ""
14871 14892
14872 #. type: Content of: <book><chapter><sect1><para> 14893 #. type: Content of: <book><chapter><sect1><para>
14873 #: ../en/ch12-mq.xml:1118 14894 #: ../en/ch12-mq.xml:1119
14874 msgid "" 14895 msgid ""
14875 "The <command>diffstat</command> command <citation>web:diffstat</citation> " 14896 "The <command>diffstat</command> command <citation>web:diffstat</citation> "
14876 "generates a histogram of the modifications made to each file in a patch. It " 14897 "generates a histogram of the modifications made to each file in a patch. It "
14877 "provides a good way to <quote>get a sense of</quote> a patch&emdash;which " 14898 "provides a good way to <quote>get a sense of</quote> a patch&emdash;which "
14878 "files it affects, and how much change it introduces to each file and as a " 14899 "files it affects, and how much change it introduces to each file and as a "
14881 "as otherwise it will try to do clever things with prefixes of file names that " 14902 "as otherwise it will try to do clever things with prefixes of file names that "
14882 "inevitably confuse at least me.)" 14903 "inevitably confuse at least me.)"
14883 msgstr "" 14904 msgstr ""
14884 14905
14885 #. type: Content of: <book><chapter><sect1><para> 14906 #. type: Content of: <book><chapter><sect1><para>
14886 #: ../en/ch12-mq.xml:1132 14907 #: ../en/ch12-mq.xml:1133
14887 msgid "" 14908 msgid ""
14888 "The <literal role=\"package\">patchutils</literal> package <citation>web:" 14909 "The <literal role=\"package\">patchutils</literal> package <citation>web:"
14889 "patchutils</citation> is invaluable. It provides a set of small utilities " 14910 "patchutils</citation> is invaluable. It provides a set of small utilities "
14890 "that follow the <quote>Unix philosophy;</quote> each does one useful thing " 14911 "that follow the <quote>Unix philosophy;</quote> each does one useful thing "
14891 "with a patch. The <literal role=\"package\">patchutils</literal> command I " 14912 "with a patch. The <literal role=\"package\">patchutils</literal> command I "
14896 "match a particular glob pattern. See section <xref linkend=\"mq-collab.tips." 14917 "match a particular glob pattern. See section <xref linkend=\"mq-collab.tips."
14897 "interdiff\"/> for another example." 14918 "interdiff\"/> for another example."
14898 msgstr "" 14919 msgstr ""
14899 14920
14900 #. type: Content of: <book><chapter><sect1><title> 14921 #. type: Content of: <book><chapter><sect1><title>
14901 #: ../en/ch12-mq.xml:1148 14922 #: ../en/ch12-mq.xml:1149
14902 msgid "Good ways to work with patches" 14923 msgid "Good ways to work with patches"
14903 msgstr "操作补丁的好习惯" 14924 msgstr "操作补丁的好习惯"
14904 14925
14905 #. type: Content of: <book><chapter><sect1><para> 14926 #. type: Content of: <book><chapter><sect1><para>
14906 #: ../en/ch12-mq.xml:1150 14927 #: ../en/ch12-mq.xml:1151
14907 msgid "" 14928 msgid ""
14908 "Whether you are working on a patch series to submit to a free software or " 14929 "Whether you are working on a patch series to submit to a free software or "
14909 "open source project, or a series that you intend to treat as a sequence of " 14930 "open source project, or a series that you intend to treat as a sequence of "
14910 "regular changesets when you're done, you can use some simple techniques to " 14931 "regular changesets when you're done, you can use some simple techniques to "
14911 "keep your work well organised." 14932 "keep your work well organised."
14912 msgstr "" 14933 msgstr ""
14913 14934
14914 #. type: Content of: <book><chapter><sect1><para> 14935 #. type: Content of: <book><chapter><sect1><para>
14915 #: ../en/ch12-mq.xml:1156 14936 #: ../en/ch12-mq.xml:1157
14916 msgid "" 14937 msgid ""
14917 "Give your patches descriptive names. A good name for a patch might be " 14938 "Give your patches descriptive names. A good name for a patch might be "
14918 "<filename>rework-device-alloc.patch</filename>, because it will immediately " 14939 "<filename>rework-device-alloc.patch</filename>, because it will immediately "
14919 "give you a hint what the purpose of the patch is. Long names shouldn't be a " 14940 "give you a hint what the purpose of the patch is. Long names shouldn't be a "
14920 "problem; you won't be typing the names often, but you <emphasis>will</" 14941 "problem; you won't be typing the names often, but you <emphasis>will</"
14924 "with, or if you are juggling a number of different tasks and your patches " 14945 "with, or if you are juggling a number of different tasks and your patches "
14925 "only get a fraction of your attention." 14946 "only get a fraction of your attention."
14926 msgstr "" 14947 msgstr ""
14927 14948
14928 #. type: Content of: <book><chapter><sect1><para> 14949 #. type: Content of: <book><chapter><sect1><para>
14929 #: ../en/ch12-mq.xml:1168 14950 #: ../en/ch12-mq.xml:1169
14930 msgid "" 14951 msgid ""
14931 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq" 14952 "Be aware of what patch you're working on. Use the <command role=\"hg-ext-mq"
14932 "\">qtop</command> command and skim over the text of your patches " 14953 "\">qtop</command> command and skim over the text of your patches "
14933 "frequently&emdash;for example, using <command role=\"hg-cmd\">hg tip <option " 14954 "frequently&emdash;for example, using <command role=\"hg-cmd\">hg tip <option "
14934 "role=\"hg-opt-tip\">-p</option></command>)&emdash;to be sure of where you " 14955 "role=\"hg-opt-tip\">-p</option></command>)&emdash;to be sure of where you "
14937 "tricky to migrate changes into the right patch after making them in the wrong " 14958 "tricky to migrate changes into the right patch after making them in the wrong "
14938 "one." 14959 "one."
14939 msgstr "" 14960 msgstr ""
14940 14961
14941 #. type: Content of: <book><chapter><sect1><para> 14962 #. type: Content of: <book><chapter><sect1><para>
14942 #: ../en/ch12-mq.xml:1178 14963 #: ../en/ch12-mq.xml:1179
14943 msgid "" 14964 msgid ""
14944 "For this reason, it is very much worth investing a little time to learn how " 14965 "For this reason, it is very much worth investing a little time to learn how "
14945 "to use some of the third-party tools I described in section <xref linkend=" 14966 "to use some of the third-party tools I described in section <xref linkend="
14946 "\"sec.mq.tools\"/>, particularly <command>diffstat</command> and " 14967 "\"sec.mq.tools\"/>, particularly <command>diffstat</command> and "
14947 "<command>filterdiff</command>. The former will give you a quick idea of what " 14968 "<command>filterdiff</command>. The former will give you a quick idea of what "
14948 "changes your patch is making, while the latter makes it easy to splice hunks " 14969 "changes your patch is making, while the latter makes it easy to splice hunks "
14949 "selectively out of one patch and into another." 14970 "selectively out of one patch and into another."
14950 msgstr "" 14971 msgstr ""
14951 14972
14952 #. type: Content of: <book><chapter><sect1><title> 14973 #. type: Content of: <book><chapter><sect1><title>
14953 #: ../en/ch12-mq.xml:1189 14974 #: ../en/ch12-mq.xml:1190
14954 msgid "MQ cookbook" 14975 msgid "MQ cookbook"
14955 msgstr "MQ 手册" 14976 msgstr "MQ 手册"
14956 14977
14957 #. type: Content of: <book><chapter><sect1><sect2><title> 14978 #. type: Content of: <book><chapter><sect1><sect2><title>
14958 #: ../en/ch12-mq.xml:1192 14979 #: ../en/ch12-mq.xml:1193
14959 msgid "Manage <quote>trivial</quote> patches" 14980 msgid "Manage <quote>trivial</quote> patches"
14960 msgstr "管理<quote>琐碎的</quote>补丁" 14981 msgstr "管理<quote>琐碎的</quote>补丁"
14961 14982
14962 #. type: Content of: <book><chapter><sect1><sect2><para> 14983 #. type: Content of: <book><chapter><sect1><sect2><para>
14963 #: ../en/ch12-mq.xml:1194 14984 #: ../en/ch12-mq.xml:1195
14964 msgid "" 14985 msgid ""
14965 "Because the overhead of dropping files into a new Mercurial repository is so " 14986 "Because the overhead of dropping files into a new Mercurial repository is so "
14966 "low, it makes a lot of sense to manage patches this way even if you simply " 14987 "low, it makes a lot of sense to manage patches this way even if you simply "
14967 "want to make a few changes to a source tarball that you downloaded." 14988 "want to make a few changes to a source tarball that you downloaded."
14968 msgstr "" 14989 msgstr ""
14969 14990
14970 # 14991 #
14971 #. type: Content of: <book><chapter><sect1><sect2><para> 14992 #. type: Content of: <book><chapter><sect1><sect2><para>
14972 #: ../en/ch12-mq.xml:1199 14993 #: ../en/ch12-mq.xml:1200
14973 msgid "" 14994 msgid ""
14974 "Begin by downloading and unpacking the source tarball, and turning it into a " 14995 "Begin by downloading and unpacking the source tarball, and turning it into a "
14975 "Mercurial repository." 14996 "Mercurial repository."
14976 msgstr "" 14997 msgstr ""
14977 14998
14978 #. type: Content of: <book><chapter><sect1><sect2><para> 14999 #. type: Content of: <book><chapter><sect1><sect2><para>
14979 #: ../en/ch12-mq.xml:1204 15000 #: ../en/ch12-mq.xml:1205
14980 msgid "Continue by creating a patch stack and making your changes." 15001 msgid "Continue by creating a patch stack and making your changes."
14981 msgstr "" 15002 msgstr ""
14982 15003
14983 #. type: Content of: <book><chapter><sect1><sect2><para> 15004 #. type: Content of: <book><chapter><sect1><sect2><para>
14984 #: ../en/ch12-mq.xml:1209 15005 #: ../en/ch12-mq.xml:1210
14985 msgid "" 15006 msgid ""
14986 "Let's say a few weeks or months pass, and your package author releases a new " 15007 "Let's say a few weeks or months pass, and your package author releases a new "
14987 "version. First, bring their changes into the repository." 15008 "version. First, bring their changes into the repository."
14988 msgstr "" 15009 msgstr ""
14989 15010
14990 #. type: Content of: <book><chapter><sect1><sect2><para> 15011 #. type: Content of: <book><chapter><sect1><sect2><para>
14991 #: ../en/ch12-mq.xml:1215 15012 #: ../en/ch12-mq.xml:1216
14992 msgid "" 15013 msgid ""
14993 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above " 15014 "The pipeline starting with <command role=\"hg-cmd\">hg locate</command> above "
14994 "deletes all files in the working directory, so that <command role=\"hg-cmd" 15015 "deletes all files in the working directory, so that <command role=\"hg-cmd"
14995 "\">hg commit</command>'s <option role=\"hg-opt-commit\">--addremove</option> " 15016 "\">hg commit</command>'s <option role=\"hg-opt-commit\">--addremove</option> "
14996 "option can actually tell which files have really been removed in the newer " 15017 "option can actually tell which files have really been removed in the newer "
14997 "version of the source." 15018 "version of the source."
14998 msgstr "" 15019 msgstr ""
14999 15020
15000 #. type: Content of: <book><chapter><sect1><sect2><para> 15021 #. type: Content of: <book><chapter><sect1><sect2><para>
15001 #: ../en/ch12-mq.xml:1223 15022 #: ../en/ch12-mq.xml:1224
15002 msgid "Finally, you can apply your patches on top of the new tree." 15023 msgid "Finally, you can apply your patches on top of the new tree."
15003 msgstr "" 15024 msgstr ""
15004 15025
15005 #. type: Content of: <book><chapter><sect1><sect2><title> 15026 #. type: Content of: <book><chapter><sect1><sect2><title>
15006 #: ../en/ch12-mq.xml:1230 15027 #: ../en/ch12-mq.xml:1231
15007 msgid "Combining entire patches" 15028 msgid "Combining entire patches"
15008 msgstr "组合全部的补丁" 15029 msgstr "组合全部的补丁"
15009 15030
15010 #. type: Content of: <book><chapter><sect1><sect2><para> 15031 #. type: Content of: <book><chapter><sect1><sect2><para>
15011 #: ../en/ch12-mq.xml:1232 15032 #: ../en/ch12-mq.xml:1233
15012 msgid "" 15033 msgid ""
15013 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets " 15034 "MQ provides a command, <command role=\"hg-ext-mq\">qfold</command> that lets "
15014 "you combine entire patches. This <quote>folds</quote> the patches you name, " 15035 "you combine entire patches. This <quote>folds</quote> the patches you name, "
15015 "in the order you name them, into the topmost applied patch, and concatenates " 15036 "in the order you name them, into the topmost applied patch, and concatenates "
15016 "their descriptions onto the end of its description. The patches that you " 15037 "their descriptions onto the end of its description. The patches that you "
15017 "fold must be unapplied before you fold them." 15038 "fold must be unapplied before you fold them."
15018 msgstr "" 15039 msgstr ""
15019 15040
15020 #. type: Content of: <book><chapter><sect1><sect2><para> 15041 #. type: Content of: <book><chapter><sect1><sect2><para>
15021 #: ../en/ch12-mq.xml:1240 15042 #: ../en/ch12-mq.xml:1241
15022 msgid "" 15043 msgid ""
15023 "The order in which you fold patches matters. If your topmost applied patch " 15044 "The order in which you fold patches matters. If your topmost applied patch "
15024 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</" 15045 "is <literal>foo</literal>, and you <command role=\"hg-ext-mq\">qfold</"
15025 "command> <literal>bar</literal> and <literal>quux</literal> into it, you will " 15046 "command> <literal>bar</literal> and <literal>quux</literal> into it, you will "
15026 "end up with a patch that has the same effect as if you applied first " 15047 "end up with a patch that has the same effect as if you applied first "
15027 "<literal>foo</literal>, then <literal>bar</literal>, followed by " 15048 "<literal>foo</literal>, then <literal>bar</literal>, followed by "
15028 "<literal>quux</literal>." 15049 "<literal>quux</literal>."
15029 msgstr "" 15050 msgstr ""
15030 15051
15031 #. type: Content of: <book><chapter><sect1><sect2><title> 15052 #. type: Content of: <book><chapter><sect1><sect2><title>
15032 #: ../en/ch12-mq.xml:1251 15053 #: ../en/ch12-mq.xml:1252
15033 msgid "Merging part of one patch into another" 15054 msgid "Merging part of one patch into another"
15034 msgstr "合并补丁的部分内容到其它补丁" 15055 msgstr "合并补丁的部分内容到其它补丁"
15035 15056
15036 #. type: Content of: <book><chapter><sect1><sect2><para> 15057 #. type: Content of: <book><chapter><sect1><sect2><para>
15037 #: ../en/ch12-mq.xml:1253 15058 #: ../en/ch12-mq.xml:1254
15038 msgid "" 15059 msgid ""
15039 "Merging <emphasis>part</emphasis> of one patch into another is more difficult " 15060 "Merging <emphasis>part</emphasis> of one patch into another is more difficult "
15040 "than combining entire patches." 15061 "than combining entire patches."
15041 msgstr "" 15062 msgstr ""
15042 15063
15043 #. type: Content of: <book><chapter><sect1><sect2><para> 15064 #. type: Content of: <book><chapter><sect1><sect2><para>
15044 #: ../en/ch12-mq.xml:1257 15065 #: ../en/ch12-mq.xml:1258
15045 msgid "" 15066 msgid ""
15046 "If you want to move changes to entire files, you can use <command>filterdiff</" 15067 "If you want to move changes to entire files, you can use <command>filterdiff</"
15047 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role=" 15068 "command>'s <option role=\"cmd-opt-filterdiff\">-i</option> and <option role="
15048 "\"cmd-opt-filterdiff\">-x</option> options to choose the modifications to " 15069 "\"cmd-opt-filterdiff\">-x</option> options to choose the modifications to "
15049 "snip out of one patch, concatenating its output onto the end of the patch you " 15070 "snip out of one patch, concatenating its output onto the end of the patch you "
15053 "the other patch), and you can simply <command role=\"hg-ext-mq\">qrefresh</" 15074 "the other patch), and you can simply <command role=\"hg-ext-mq\">qrefresh</"
15054 "command> the patch to drop the duplicate hunks." 15075 "command> the patch to drop the duplicate hunks."
15055 msgstr "" 15076 msgstr ""
15056 15077
15057 #. type: Content of: <book><chapter><sect1><sect2><para> 15078 #. type: Content of: <book><chapter><sect1><sect2><para>
15058 #: ../en/ch12-mq.xml:1270 15079 #: ../en/ch12-mq.xml:1271
15059 msgid "" 15080 msgid ""
15060 "If you have a patch that has multiple hunks modifying a file, and you only " 15081 "If you have a patch that has multiple hunks modifying a file, and you only "
15061 "want to move a few of those hunks, the job becomes more messy, but you can " 15082 "want to move a few of those hunks, the job becomes more messy, but you can "
15062 "still partly automate it. Use <command>lsdiff -nvv</command> to print some " 15083 "still partly automate it. Use <command>lsdiff -nvv</command> to print some "
15063 "metadata about the patch." 15084 "metadata about the patch."
15064 msgstr "" 15085 msgstr ""
15065 15086
15066 #. type: Content of: <book><chapter><sect1><sect2><para> 15087 #. type: Content of: <book><chapter><sect1><sect2><para>
15067 #: ../en/ch12-mq.xml:1278 15088 #: ../en/ch12-mq.xml:1279
15068 msgid "This command prints three different kinds of number:" 15089 msgid "This command prints three different kinds of number:"
15069 msgstr "" 15090 msgstr ""
15070 15091
15071 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15092 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15072 #: ../en/ch12-mq.xml:1281 15093 #: ../en/ch12-mq.xml:1282
15073 msgid "" 15094 msgid ""
15074 "(in the first column) a <emphasis>file number</emphasis> to identify each " 15095 "(in the first column) a <emphasis>file number</emphasis> to identify each "
15075 "file modified in the patch;" 15096 "file modified in the patch;"
15076 msgstr "" 15097 msgstr ""
15077 15098
15078 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15099 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15079 #: ../en/ch12-mq.xml:1285 15100 #: ../en/ch12-mq.xml:1286
15080 msgid "" 15101 msgid ""
15081 "(on the next line, indented) the line number within a modified file where a " 15102 "(on the next line, indented) the line number within a modified file where a "
15082 "hunk starts; and" 15103 "hunk starts; and"
15083 msgstr "" 15104 msgstr ""
15084 15105
15085 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para> 15106 #. type: Content of: <book><chapter><sect1><sect2><itemizedlist><listitem><para>
15086 #: ../en/ch12-mq.xml:1288 15107 #: ../en/ch12-mq.xml:1289
15087 msgid "" 15108 msgid ""
15088 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk." 15109 "(on the same line) a <emphasis>hunk number</emphasis> to identify that hunk."
15089 msgstr "" 15110 msgstr ""
15090 15111
15091 #. type: Content of: <book><chapter><sect1><sect2><para> 15112 #. type: Content of: <book><chapter><sect1><sect2><para>
15092 #: ../en/ch12-mq.xml:1292 15113 #: ../en/ch12-mq.xml:1293
15093 msgid "" 15114 msgid ""
15094 "You'll have to use some visual inspection, and reading of the patch, to " 15115 "You'll have to use some visual inspection, and reading of the patch, to "
15095 "identify the file and hunk numbers you'll want, but you can then pass them to " 15116 "identify the file and hunk numbers you'll want, but you can then pass them to "
15096 "to <command>filterdiff</command>'s <option role=\"cmd-opt-filterdiff\">--" 15117 "to <command>filterdiff</command>'s <option role=\"cmd-opt-filterdiff\">--"
15097 "files</option> and <option role=\"cmd-opt-filterdiff\">--hunks</option> " 15118 "files</option> and <option role=\"cmd-opt-filterdiff\">--hunks</option> "
15098 "options, to select exactly the file and hunk you want to extract." 15119 "options, to select exactly the file and hunk you want to extract."
15099 msgstr "" 15120 msgstr ""
15100 15121
15101 #. type: Content of: <book><chapter><sect1><sect2><para> 15122 #. type: Content of: <book><chapter><sect1><sect2><para>
15102 #: ../en/ch12-mq.xml:1300 15123 #: ../en/ch12-mq.xml:1301
15103 msgid "" 15124 msgid ""
15104 "Once you have this hunk, you can concatenate it onto the end of your " 15125 "Once you have this hunk, you can concatenate it onto the end of your "
15105 "destination patch and continue with the remainder of section <xref linkend=" 15126 "destination patch and continue with the remainder of section <xref linkend="
15106 "\"sec.mq.combine\"/>." 15127 "\"sec.mq.combine\"/>."
15107 msgstr "" 15128 msgstr ""
15108 15129
15109 #. type: Content of: <book><chapter><sect1><title> 15130 #. type: Content of: <book><chapter><sect1><title>
15110 #: ../en/ch12-mq.xml:1307 15131 #: ../en/ch12-mq.xml:1308
15111 msgid "Differences between quilt and MQ" 15132 msgid "Differences between quilt and MQ"
15112 msgstr "MQ 与 quilt 的区别" 15133 msgstr "MQ 与 quilt 的区别"
15113 15134
15114 #. type: Content of: <book><chapter><sect1><para> 15135 #. type: Content of: <book><chapter><sect1><para>
15115 #: ../en/ch12-mq.xml:1309 15136 #: ../en/ch12-mq.xml:1310
15116 msgid "" 15137 msgid ""
15117 "If you are already familiar with quilt, MQ provides a similar command set. " 15138 "If you are already familiar with quilt, MQ provides a similar command set. "
15118 "There are a few differences in the way that it works." 15139 "There are a few differences in the way that it works."
15119 msgstr "" 15140 msgstr ""
15120 15141
15121 #. type: Content of: <book><chapter><sect1><para> 15142 #. type: Content of: <book><chapter><sect1><para>
15122 #: ../en/ch12-mq.xml:1313 15143 #: ../en/ch12-mq.xml:1314
15123 msgid "" 15144 msgid ""
15124 "You will already have noticed that most quilt commands have MQ counterparts " 15145 "You will already have noticed that most quilt commands have MQ counterparts "
15125 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions " 15146 "that simply begin with a <quote><literal>q</literal></quote>. The exceptions "
15126 "are quilt's <literal>add</literal> and <literal>remove</literal> commands, " 15147 "are quilt's <literal>add</literal> and <literal>remove</literal> commands, "
15127 "the counterparts for which are the normal Mercurial <command role=\"hg-cmd" 15148 "the counterparts for which are the normal Mercurial <command role=\"hg-cmd"
15763 "\">extensions</literal> section of your <filename role=\"special\"> /.hgrc</" 15784 "\">extensions</literal> section of your <filename role=\"special\"> /.hgrc</"
15764 "filename>." 15785 "filename>."
15765 msgstr "" 15786 msgstr ""
15766 15787
15767 # 15788 #
15768 #. &example.hg-interdiff; 15789 #. &example.hg-interdiff;
15769 #. type: Content of: <book><chapter><sect1><sect2><para> 15790 #. type: Content of: <book><chapter><sect1><sect2><para>
15770 #: ../en/ch13-mq-collab.xml:465 15791 #: ../en/ch13-mq-collab.xml:465
15771 msgid "" 15792 msgid ""
15772 "The <command>interdiff</command> command expects to be passed the names of " 15793 "The <command>interdiff</command> command expects to be passed the names of "
15773 "two files, but the <literal role=\"hg-ext\">extdiff</literal> extension " 15794 "two files, but the <literal role=\"hg-ext\">extdiff</literal> extension "