Show More
@@ -0,0 +1,128 b'' | |||||
|
1 | Subrepositories let you nest external repositories or projects into a | |||
|
2 | parent Mercurial repository, and make commands operate on them as a | |||
|
3 | group. External Mercurial and Subversion projects are currently | |||
|
4 | supported. | |||
|
5 | ||||
|
6 | Subrepositories are made of three components: | |||
|
7 | ||||
|
8 | 1. Nested repository checkouts. They can appear anywhere in the | |||
|
9 | parent working directory, and are Mercurial clones or Subversion | |||
|
10 | checkouts. | |||
|
11 | ||||
|
12 | 2. Nested repository references. They are defined in ``.hgsub`` and | |||
|
13 | tell where the subrepository checkouts come from. Mercurial | |||
|
14 | subrepositories are referenced like: | |||
|
15 | ||||
|
16 | path/to/nested = https://example.com/nested/repo/path | |||
|
17 | ||||
|
18 | where ``path/to/nested`` is the checkout location relatively to the | |||
|
19 | parent Mercurial root, and ``https://example.com/nested/repo/path`` | |||
|
20 | is the source repository path. The source can also reference a | |||
|
21 | filesystem path. Subversion repositories are defined with: | |||
|
22 | ||||
|
23 | path/to/nested = [svn]https://example.com/nested/trunk/path | |||
|
24 | ||||
|
25 | Note that ``.hgsub`` does not exist by default in Mercurial | |||
|
26 | repositories, you have to create and add it to the parent | |||
|
27 | repository before using subrepositories. | |||
|
28 | ||||
|
29 | 3. Nested repository states. They are defined in ``.hgsubstate`` and | |||
|
30 | capture whatever information is required to restore the | |||
|
31 | subrepositories to the state they were committed in a parent | |||
|
32 | repository changeset. Mercurial automatically record the nested | |||
|
33 | repositories states when committing in the parent repository. | |||
|
34 | ||||
|
35 | .. note:: | |||
|
36 | The ``.hgsubstate`` file should not be edited manually. | |||
|
37 | ||||
|
38 | ||||
|
39 | Adding a Subrepository | |||
|
40 | ---------------------- | |||
|
41 | ||||
|
42 | If ``.hgsub`` does not exist, create it and add it to the parent | |||
|
43 | repository. Clone or checkout the external projects where you want it | |||
|
44 | to live in the parent repository. Edit ``.hgsub`` and add the | |||
|
45 | subrepository entry as described above. At this point, the | |||
|
46 | subrepository is tracked and the next commit will record its state in | |||
|
47 | ``.hgsubstate`` and bind it to the committed changeset. | |||
|
48 | ||||
|
49 | Synchronizing a Subrepository | |||
|
50 | ----------------------------- | |||
|
51 | ||||
|
52 | Subrepos do not automatically track the latest changeset of their | |||
|
53 | sources. Instead, they are updated to the changeset that corresponds | |||
|
54 | with the changeset checked out in the top-level changeset. This is so | |||
|
55 | developers always get a consistent set of compatible code and | |||
|
56 | libraries when they update. | |||
|
57 | ||||
|
58 | Thus, updating subrepos is a manual process. Simply check out target | |||
|
59 | subrepo at the desired revision, test in the top-level repo, then | |||
|
60 | commit in the parent repository to record the new combination. | |||
|
61 | ||||
|
62 | Deleting a Subrepository | |||
|
63 | ------------------------ | |||
|
64 | ||||
|
65 | To remove a subrepo from the parent repository, delete its reference | |||
|
66 | from ``.hgsub``. Then, the subrepo tree will show up as a set of | |||
|
67 | unknown files in :hg:`status`, and you can delete the files. | |||
|
68 | ||||
|
69 | Interaction with Mercurial Commands | |||
|
70 | ----------------------------------- | |||
|
71 | ||||
|
72 | :add: add does not recurse in subrepos unless -S/--subrepos is | |||
|
73 | specified. Subversion subrepositories are currently silently | |||
|
74 | ignored. | |||
|
75 | ||||
|
76 | :archive: archive does not recurse in subrepositories unless | |||
|
77 | -S/--subrepos is specified. | |||
|
78 | ||||
|
79 | :commit: commit creates a consistent snapshot of the state of the | |||
|
80 | entire project and its subrepositories. It does this by first | |||
|
81 | attempting to commit all modified subrepositories, then recording | |||
|
82 | their state and finally committing it in the parent repository. | |||
|
83 | ||||
|
84 | :diff: diff does not recurse in subrepos unless -S/--subrepos is | |||
|
85 | specified. Changes are displayed as usual, on the subrepositories | |||
|
86 | elements. Subversion subrepositories are currently silently | |||
|
87 | ignored. | |||
|
88 | ||||
|
89 | :incoming: incoming does not recurse in subrepos unless -S/--subrepos | |||
|
90 | is specified. Subversion subrepositories are currently silently | |||
|
91 | ignored. | |||
|
92 | ||||
|
93 | :outgoing: outgoing does not recurse in subrepos unless -S/--subrepos | |||
|
94 | is specified. Subversion subrepositories are currently silently | |||
|
95 | ignored. | |||
|
96 | ||||
|
97 | :pull: pull is not recursive since it is not clear what to pull prior | |||
|
98 | to running :hg:`update`. Listing and retrieving all | |||
|
99 | subrepositories changes referenced by the parent repository pulled | |||
|
100 | changesets is expensive at best, impossible in the Subversion | |||
|
101 | case. | |||
|
102 | ||||
|
103 | :push: Mercurial will automatically push all subrepositories first | |||
|
104 | when the parent repository is being pushed. This ensures new | |||
|
105 | subrepository changes are available when referenced by top-level | |||
|
106 | repositories. | |||
|
107 | ||||
|
108 | :status: status does not recurse into subrepositories unless | |||
|
109 | -S/--subrepos is specified. Subrepository changes are displayed as | |||
|
110 | regular Mercurial changes on the subrepository | |||
|
111 | elements. Subversion subrepositories are currently silently | |||
|
112 | ignored. | |||
|
113 | ||||
|
114 | :update: update restores the subrepos in the state they were | |||
|
115 | originally committed in target changeset. If the recorded | |||
|
116 | changeset is not available in the current subrepository, Mercurial | |||
|
117 | will pull it in first before updating. This means that updating | |||
|
118 | can require network access when using subrepositories. | |||
|
119 | ||||
|
120 | Remapping Subrepositories Sources | |||
|
121 | --------------------------------- | |||
|
122 | ||||
|
123 | A subrepository source location may change during a project life, | |||
|
124 | invalidating references stored in the parent repository history. To | |||
|
125 | fix this, rewriting rules can be defined in parent repository ``hgrc`` | |||
|
126 | file or in Mercurial configuration. See the ``[subpaths]`` section in | |||
|
127 | hgrc(5) for more details. | |||
|
128 |
@@ -1,116 +1,117 b'' | |||||
1 | # help.py - help data for mercurial |
|
1 | # help.py - help data for mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from i18n import gettext, _ |
|
8 | from i18n import gettext, _ | |
9 | import sys, os |
|
9 | import sys, os | |
10 | import extensions |
|
10 | import extensions | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | def moduledoc(file): |
|
13 | def moduledoc(file): | |
14 | '''return the top-level python documentation for the given file |
|
14 | '''return the top-level python documentation for the given file | |
15 |
|
15 | |||
16 | Loosely inspired by pydoc.source_synopsis(), but rewritten to |
|
16 | Loosely inspired by pydoc.source_synopsis(), but rewritten to | |
17 | handle triple quotes and to return the whole text instead of just |
|
17 | handle triple quotes and to return the whole text instead of just | |
18 | the synopsis''' |
|
18 | the synopsis''' | |
19 | result = [] |
|
19 | result = [] | |
20 |
|
20 | |||
21 | line = file.readline() |
|
21 | line = file.readline() | |
22 | while line[:1] == '#' or not line.strip(): |
|
22 | while line[:1] == '#' or not line.strip(): | |
23 | line = file.readline() |
|
23 | line = file.readline() | |
24 | if not line: |
|
24 | if not line: | |
25 | break |
|
25 | break | |
26 |
|
26 | |||
27 | start = line[:3] |
|
27 | start = line[:3] | |
28 | if start == '"""' or start == "'''": |
|
28 | if start == '"""' or start == "'''": | |
29 | line = line[3:] |
|
29 | line = line[3:] | |
30 | while line: |
|
30 | while line: | |
31 | if line.rstrip().endswith(start): |
|
31 | if line.rstrip().endswith(start): | |
32 | line = line.split(start)[0] |
|
32 | line = line.split(start)[0] | |
33 | if line: |
|
33 | if line: | |
34 | result.append(line) |
|
34 | result.append(line) | |
35 | break |
|
35 | break | |
36 | elif not line: |
|
36 | elif not line: | |
37 | return None # unmatched delimiter |
|
37 | return None # unmatched delimiter | |
38 | result.append(line) |
|
38 | result.append(line) | |
39 | line = file.readline() |
|
39 | line = file.readline() | |
40 | else: |
|
40 | else: | |
41 | return None |
|
41 | return None | |
42 |
|
42 | |||
43 | return ''.join(result) |
|
43 | return ''.join(result) | |
44 |
|
44 | |||
45 | def listexts(header, exts, maxlength, indent=1): |
|
45 | def listexts(header, exts, maxlength, indent=1): | |
46 | '''return a text listing of the given extensions''' |
|
46 | '''return a text listing of the given extensions''' | |
47 | if not exts: |
|
47 | if not exts: | |
48 | return '' |
|
48 | return '' | |
49 | result = '\n%s\n\n' % header |
|
49 | result = '\n%s\n\n' % header | |
50 | for name, desc in sorted(exts.iteritems()): |
|
50 | for name, desc in sorted(exts.iteritems()): | |
51 | result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2, |
|
51 | result += '%s%-*s %s\n' % (' ' * indent, maxlength + 2, | |
52 | ':%s:' % name, desc) |
|
52 | ':%s:' % name, desc) | |
53 | return result |
|
53 | return result | |
54 |
|
54 | |||
55 | def extshelp(): |
|
55 | def extshelp(): | |
56 | doc = loaddoc('extensions')() |
|
56 | doc = loaddoc('extensions')() | |
57 |
|
57 | |||
58 | exts, maxlength = extensions.enabled() |
|
58 | exts, maxlength = extensions.enabled() | |
59 | doc += listexts(_('enabled extensions:'), exts, maxlength) |
|
59 | doc += listexts(_('enabled extensions:'), exts, maxlength) | |
60 |
|
60 | |||
61 | exts, maxlength = extensions.disabled() |
|
61 | exts, maxlength = extensions.disabled() | |
62 | doc += listexts(_('disabled extensions:'), exts, maxlength) |
|
62 | doc += listexts(_('disabled extensions:'), exts, maxlength) | |
63 |
|
63 | |||
64 | return doc |
|
64 | return doc | |
65 |
|
65 | |||
66 | def loaddoc(topic): |
|
66 | def loaddoc(topic): | |
67 | """Return a delayed loader for help/topic.txt.""" |
|
67 | """Return a delayed loader for help/topic.txt.""" | |
68 |
|
68 | |||
69 | def loader(): |
|
69 | def loader(): | |
70 | if hasattr(sys, 'frozen'): |
|
70 | if hasattr(sys, 'frozen'): | |
71 | module = sys.executable |
|
71 | module = sys.executable | |
72 | else: |
|
72 | else: | |
73 | module = __file__ |
|
73 | module = __file__ | |
74 | base = os.path.dirname(module) |
|
74 | base = os.path.dirname(module) | |
75 |
|
75 | |||
76 | for dir in ('.', '..'): |
|
76 | for dir in ('.', '..'): | |
77 | docdir = os.path.join(base, dir, 'help') |
|
77 | docdir = os.path.join(base, dir, 'help') | |
78 | if os.path.isdir(docdir): |
|
78 | if os.path.isdir(docdir): | |
79 | break |
|
79 | break | |
80 |
|
80 | |||
81 | path = os.path.join(docdir, topic + ".txt") |
|
81 | path = os.path.join(docdir, topic + ".txt") | |
82 | doc = gettext(open(path).read()) |
|
82 | doc = gettext(open(path).read()) | |
83 | for rewriter in helphooks.get(topic, []): |
|
83 | for rewriter in helphooks.get(topic, []): | |
84 | doc = rewriter(topic, doc) |
|
84 | doc = rewriter(topic, doc) | |
85 | return doc |
|
85 | return doc | |
86 |
|
86 | |||
87 | return loader |
|
87 | return loader | |
88 |
|
88 | |||
89 | helptable = [ |
|
89 | helptable = [ | |
90 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), |
|
90 | (["config", "hgrc"], _("Configuration Files"), loaddoc('config')), | |
91 | (["dates"], _("Date Formats"), loaddoc('dates')), |
|
91 | (["dates"], _("Date Formats"), loaddoc('dates')), | |
92 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), |
|
92 | (["patterns"], _("File Name Patterns"), loaddoc('patterns')), | |
93 | (['environment', 'env'], _('Environment Variables'), |
|
93 | (['environment', 'env'], _('Environment Variables'), | |
94 | loaddoc('environment')), |
|
94 | loaddoc('environment')), | |
95 | (['revs', 'revisions'], _('Specifying Single Revisions'), |
|
95 | (['revs', 'revisions'], _('Specifying Single Revisions'), | |
96 | loaddoc('revisions')), |
|
96 | loaddoc('revisions')), | |
97 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
|
97 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
98 | loaddoc('multirevs')), |
|
98 | loaddoc('multirevs')), | |
99 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), |
|
99 | (['revset', 'revsets'], _("Specifying Revision Sets"), loaddoc('revsets')), | |
100 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), |
|
100 | (['diffs'], _('Diff Formats'), loaddoc('diffs')), | |
101 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), |
|
101 | (['merge-tools'], _('Merge Tools'), loaddoc('merge-tools')), | |
102 | (['templating', 'templates'], _('Template Usage'), |
|
102 | (['templating', 'templates'], _('Template Usage'), | |
103 | loaddoc('templates')), |
|
103 | loaddoc('templates')), | |
104 | (['urls'], _('URL Paths'), loaddoc('urls')), |
|
104 | (['urls'], _('URL Paths'), loaddoc('urls')), | |
105 | (["extensions"], _("Using additional features"), extshelp), |
|
105 | (["extensions"], _("Using additional features"), extshelp), | |
|
106 | (["subrepo", "subrepos"], _("Subrepositories"), loaddoc('subrepos')), | |||
106 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), |
|
107 | (["hgweb"], _("Configuring hgweb"), loaddoc('hgweb')), | |
107 | (["glossary"], _("Glossary"), loaddoc('glossary')), |
|
108 | (["glossary"], _("Glossary"), loaddoc('glossary')), | |
108 | ] |
|
109 | ] | |
109 |
|
110 | |||
110 | # Map topics to lists of callable taking the current topic help and |
|
111 | # Map topics to lists of callable taking the current topic help and | |
111 | # returning the updated version |
|
112 | # returning the updated version | |
112 | helphooks = { |
|
113 | helphooks = { | |
113 | } |
|
114 | } | |
114 |
|
115 | |||
115 | def addtopichook(topic, rewriter): |
|
116 | def addtopichook(topic, rewriter): | |
116 | helphooks.setdefault(topic, []).append(rewriter) |
|
117 | helphooks.setdefault(topic, []).append(rewriter) |
@@ -1,427 +1,429 b'' | |||||
1 | $ "$TESTDIR/hghave" no-outer-repo || exit 80 |
|
1 | $ "$TESTDIR/hghave" no-outer-repo || exit 80 | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ hg ci -A -d'1 0' -m a |
|
6 | $ hg ci -A -d'1 0' -m a | |
7 | adding a |
|
7 | adding a | |
8 |
|
8 | |||
9 | $ cd .. |
|
9 | $ cd .. | |
10 |
|
10 | |||
11 | $ hg init b |
|
11 | $ hg init b | |
12 | $ cd b |
|
12 | $ cd b | |
13 | $ echo b > b |
|
13 | $ echo b > b | |
14 | $ hg ci -A -d'1 0' -m b |
|
14 | $ hg ci -A -d'1 0' -m b | |
15 | adding b |
|
15 | adding b | |
16 |
|
16 | |||
17 | $ cd .. |
|
17 | $ cd .. | |
18 |
|
18 | |||
19 | $ hg clone a c |
|
19 | $ hg clone a c | |
20 | updating to branch default |
|
20 | updating to branch default | |
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
21 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
22 | $ cd c |
|
22 | $ cd c | |
23 | $ cat >> .hg/hgrc <<EOF |
|
23 | $ cat >> .hg/hgrc <<EOF | |
24 | > [paths] |
|
24 | > [paths] | |
25 | > relative = ../a |
|
25 | > relative = ../a | |
26 | > EOF |
|
26 | > EOF | |
27 | $ hg pull -f ../b |
|
27 | $ hg pull -f ../b | |
28 | pulling from ../b |
|
28 | pulling from ../b | |
29 | searching for changes |
|
29 | searching for changes | |
30 | warning: repository is unrelated |
|
30 | warning: repository is unrelated | |
31 | adding changesets |
|
31 | adding changesets | |
32 | adding manifests |
|
32 | adding manifests | |
33 | adding file changes |
|
33 | adding file changes | |
34 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
34 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
35 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
35 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
36 | $ hg merge |
|
36 | $ hg merge | |
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
38 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
39 |
|
39 | |||
40 | $ cd .. |
|
40 | $ cd .. | |
41 |
|
41 | |||
42 | Testing -R/--repository: |
|
42 | Testing -R/--repository: | |
43 |
|
43 | |||
44 | $ hg -R a tip |
|
44 | $ hg -R a tip | |
45 | changeset: 0:8580ff50825a |
|
45 | changeset: 0:8580ff50825a | |
46 | tag: tip |
|
46 | tag: tip | |
47 | user: test |
|
47 | user: test | |
48 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
48 | date: Thu Jan 01 00:00:01 1970 +0000 | |
49 | summary: a |
|
49 | summary: a | |
50 |
|
50 | |||
51 | $ hg --repository b tip |
|
51 | $ hg --repository b tip | |
52 | changeset: 0:b6c483daf290 |
|
52 | changeset: 0:b6c483daf290 | |
53 | tag: tip |
|
53 | tag: tip | |
54 | user: test |
|
54 | user: test | |
55 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
55 | date: Thu Jan 01 00:00:01 1970 +0000 | |
56 | summary: b |
|
56 | summary: b | |
57 |
|
57 | |||
58 |
|
58 | |||
59 | -R with a URL: |
|
59 | -R with a URL: | |
60 |
|
60 | |||
61 | $ hg -R file:a identify |
|
61 | $ hg -R file:a identify | |
62 | 8580ff50825a tip |
|
62 | 8580ff50825a tip | |
63 | $ hg -R file://localhost/`pwd`/a/ identify |
|
63 | $ hg -R file://localhost/`pwd`/a/ identify | |
64 | 8580ff50825a tip |
|
64 | 8580ff50825a tip | |
65 |
|
65 | |||
66 | -R with path aliases: |
|
66 | -R with path aliases: | |
67 |
|
67 | |||
68 | $ cd c |
|
68 | $ cd c | |
69 | $ hg -R default identify |
|
69 | $ hg -R default identify | |
70 | 8580ff50825a tip |
|
70 | 8580ff50825a tip | |
71 | $ hg -R relative identify |
|
71 | $ hg -R relative identify | |
72 | 8580ff50825a tip |
|
72 | 8580ff50825a tip | |
73 | $ echo '[paths]' >> $HGRCPATH |
|
73 | $ echo '[paths]' >> $HGRCPATH | |
74 | $ echo 'relativetohome = a' >> $HGRCPATH |
|
74 | $ echo 'relativetohome = a' >> $HGRCPATH | |
75 | $ HOME=`pwd`/../ hg -R relativetohome identify |
|
75 | $ HOME=`pwd`/../ hg -R relativetohome identify | |
76 | 8580ff50825a tip |
|
76 | 8580ff50825a tip | |
77 | $ cd .. |
|
77 | $ cd .. | |
78 |
|
78 | |||
79 | Implicit -R: |
|
79 | Implicit -R: | |
80 |
|
80 | |||
81 | $ hg ann a/a |
|
81 | $ hg ann a/a | |
82 | 0: a |
|
82 | 0: a | |
83 | $ hg ann a/a a/a |
|
83 | $ hg ann a/a a/a | |
84 | 0: a |
|
84 | 0: a | |
85 | $ hg ann a/a b/b |
|
85 | $ hg ann a/a b/b | |
86 | abort: There is no Mercurial repository here (.hg not found)! |
|
86 | abort: There is no Mercurial repository here (.hg not found)! | |
87 | [255] |
|
87 | [255] | |
88 | $ hg -R b ann a/a |
|
88 | $ hg -R b ann a/a | |
89 | abort: a/a not under root |
|
89 | abort: a/a not under root | |
90 | [255] |
|
90 | [255] | |
91 | $ hg log |
|
91 | $ hg log | |
92 | abort: There is no Mercurial repository here (.hg not found)! |
|
92 | abort: There is no Mercurial repository here (.hg not found)! | |
93 | [255] |
|
93 | [255] | |
94 |
|
94 | |||
95 | Abbreviation of long option: |
|
95 | Abbreviation of long option: | |
96 |
|
96 | |||
97 | $ hg --repo c tip |
|
97 | $ hg --repo c tip | |
98 | changeset: 1:b6c483daf290 |
|
98 | changeset: 1:b6c483daf290 | |
99 | tag: tip |
|
99 | tag: tip | |
100 | parent: -1:000000000000 |
|
100 | parent: -1:000000000000 | |
101 | user: test |
|
101 | user: test | |
102 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
102 | date: Thu Jan 01 00:00:01 1970 +0000 | |
103 | summary: b |
|
103 | summary: b | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | earlygetopt with duplicate options (36d23de02da1): |
|
106 | earlygetopt with duplicate options (36d23de02da1): | |
107 |
|
107 | |||
108 | $ hg --cwd a --cwd b --cwd c tip |
|
108 | $ hg --cwd a --cwd b --cwd c tip | |
109 | changeset: 1:b6c483daf290 |
|
109 | changeset: 1:b6c483daf290 | |
110 | tag: tip |
|
110 | tag: tip | |
111 | parent: -1:000000000000 |
|
111 | parent: -1:000000000000 | |
112 | user: test |
|
112 | user: test | |
113 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
113 | date: Thu Jan 01 00:00:01 1970 +0000 | |
114 | summary: b |
|
114 | summary: b | |
115 |
|
115 | |||
116 | $ hg --repo c --repository b -R a tip |
|
116 | $ hg --repo c --repository b -R a tip | |
117 | changeset: 0:8580ff50825a |
|
117 | changeset: 0:8580ff50825a | |
118 | tag: tip |
|
118 | tag: tip | |
119 | user: test |
|
119 | user: test | |
120 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
120 | date: Thu Jan 01 00:00:01 1970 +0000 | |
121 | summary: a |
|
121 | summary: a | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | earlygetopt short option without following space: |
|
124 | earlygetopt short option without following space: | |
125 |
|
125 | |||
126 | $ hg -q -Rb tip |
|
126 | $ hg -q -Rb tip | |
127 | 0:b6c483daf290 |
|
127 | 0:b6c483daf290 | |
128 |
|
128 | |||
129 | earlygetopt with illegal abbreviations: |
|
129 | earlygetopt with illegal abbreviations: | |
130 |
|
130 | |||
131 | $ hg --confi "foo.bar=baz" |
|
131 | $ hg --confi "foo.bar=baz" | |
132 | abort: option --config may not be abbreviated! |
|
132 | abort: option --config may not be abbreviated! | |
133 | [255] |
|
133 | [255] | |
134 | $ hg --cw a tip |
|
134 | $ hg --cw a tip | |
135 | abort: option --cwd may not be abbreviated! |
|
135 | abort: option --cwd may not be abbreviated! | |
136 | [255] |
|
136 | [255] | |
137 | $ hg --rep a tip |
|
137 | $ hg --rep a tip | |
138 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
138 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
139 | [255] |
|
139 | [255] | |
140 | $ hg --repositor a tip |
|
140 | $ hg --repositor a tip | |
141 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
141 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
142 | [255] |
|
142 | [255] | |
143 | $ hg -qR a tip |
|
143 | $ hg -qR a tip | |
144 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
144 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
145 | [255] |
|
145 | [255] | |
146 | $ hg -qRa tip |
|
146 | $ hg -qRa tip | |
147 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! |
|
147 | abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo! | |
148 | [255] |
|
148 | [255] | |
149 |
|
149 | |||
150 | Testing --cwd: |
|
150 | Testing --cwd: | |
151 |
|
151 | |||
152 | $ hg --cwd a parents |
|
152 | $ hg --cwd a parents | |
153 | changeset: 0:8580ff50825a |
|
153 | changeset: 0:8580ff50825a | |
154 | tag: tip |
|
154 | tag: tip | |
155 | user: test |
|
155 | user: test | |
156 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
156 | date: Thu Jan 01 00:00:01 1970 +0000 | |
157 | summary: a |
|
157 | summary: a | |
158 |
|
158 | |||
159 |
|
159 | |||
160 | Testing -y/--noninteractive - just be sure it is parsed: |
|
160 | Testing -y/--noninteractive - just be sure it is parsed: | |
161 |
|
161 | |||
162 | $ hg --cwd a tip -q --noninteractive |
|
162 | $ hg --cwd a tip -q --noninteractive | |
163 | 0:8580ff50825a |
|
163 | 0:8580ff50825a | |
164 | $ hg --cwd a tip -q -y |
|
164 | $ hg --cwd a tip -q -y | |
165 | 0:8580ff50825a |
|
165 | 0:8580ff50825a | |
166 |
|
166 | |||
167 | Testing -q/--quiet: |
|
167 | Testing -q/--quiet: | |
168 |
|
168 | |||
169 | $ hg -R a -q tip |
|
169 | $ hg -R a -q tip | |
170 | 0:8580ff50825a |
|
170 | 0:8580ff50825a | |
171 | $ hg -R b -q tip |
|
171 | $ hg -R b -q tip | |
172 | 0:b6c483daf290 |
|
172 | 0:b6c483daf290 | |
173 | $ hg -R c --quiet parents |
|
173 | $ hg -R c --quiet parents | |
174 | 0:8580ff50825a |
|
174 | 0:8580ff50825a | |
175 | 1:b6c483daf290 |
|
175 | 1:b6c483daf290 | |
176 |
|
176 | |||
177 | Testing -v/--verbose: |
|
177 | Testing -v/--verbose: | |
178 |
|
178 | |||
179 | $ hg --cwd c head -v |
|
179 | $ hg --cwd c head -v | |
180 | changeset: 1:b6c483daf290 |
|
180 | changeset: 1:b6c483daf290 | |
181 | tag: tip |
|
181 | tag: tip | |
182 | parent: -1:000000000000 |
|
182 | parent: -1:000000000000 | |
183 | user: test |
|
183 | user: test | |
184 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
184 | date: Thu Jan 01 00:00:01 1970 +0000 | |
185 | files: b |
|
185 | files: b | |
186 | description: |
|
186 | description: | |
187 | b |
|
187 | b | |
188 |
|
188 | |||
189 |
|
189 | |||
190 | changeset: 0:8580ff50825a |
|
190 | changeset: 0:8580ff50825a | |
191 | user: test |
|
191 | user: test | |
192 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
192 | date: Thu Jan 01 00:00:01 1970 +0000 | |
193 | files: a |
|
193 | files: a | |
194 | description: |
|
194 | description: | |
195 | a |
|
195 | a | |
196 |
|
196 | |||
197 |
|
197 | |||
198 | $ hg --cwd b tip --verbose |
|
198 | $ hg --cwd b tip --verbose | |
199 | changeset: 0:b6c483daf290 |
|
199 | changeset: 0:b6c483daf290 | |
200 | tag: tip |
|
200 | tag: tip | |
201 | user: test |
|
201 | user: test | |
202 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
202 | date: Thu Jan 01 00:00:01 1970 +0000 | |
203 | files: b |
|
203 | files: b | |
204 | description: |
|
204 | description: | |
205 | b |
|
205 | b | |
206 |
|
206 | |||
207 |
|
207 | |||
208 |
|
208 | |||
209 | Testing --config: |
|
209 | Testing --config: | |
210 |
|
210 | |||
211 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo |
|
211 | $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo | |
212 | quuxfoo |
|
212 | quuxfoo | |
213 | $ hg --cwd c --config '' tip -q |
|
213 | $ hg --cwd c --config '' tip -q | |
214 | abort: malformed --config option: '' (use --config section.name=value) |
|
214 | abort: malformed --config option: '' (use --config section.name=value) | |
215 | [255] |
|
215 | [255] | |
216 | $ hg --cwd c --config a.b tip -q |
|
216 | $ hg --cwd c --config a.b tip -q | |
217 | abort: malformed --config option: 'a.b' (use --config section.name=value) |
|
217 | abort: malformed --config option: 'a.b' (use --config section.name=value) | |
218 | [255] |
|
218 | [255] | |
219 | $ hg --cwd c --config a tip -q |
|
219 | $ hg --cwd c --config a tip -q | |
220 | abort: malformed --config option: 'a' (use --config section.name=value) |
|
220 | abort: malformed --config option: 'a' (use --config section.name=value) | |
221 | [255] |
|
221 | [255] | |
222 | $ hg --cwd c --config a.= tip -q |
|
222 | $ hg --cwd c --config a.= tip -q | |
223 | abort: malformed --config option: 'a.=' (use --config section.name=value) |
|
223 | abort: malformed --config option: 'a.=' (use --config section.name=value) | |
224 | [255] |
|
224 | [255] | |
225 | $ hg --cwd c --config .b= tip -q |
|
225 | $ hg --cwd c --config .b= tip -q | |
226 | abort: malformed --config option: '.b=' (use --config section.name=value) |
|
226 | abort: malformed --config option: '.b=' (use --config section.name=value) | |
227 | [255] |
|
227 | [255] | |
228 |
|
228 | |||
229 | Testing --debug: |
|
229 | Testing --debug: | |
230 |
|
230 | |||
231 | $ hg --cwd c log --debug |
|
231 | $ hg --cwd c log --debug | |
232 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a |
|
232 | changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a | |
233 | tag: tip |
|
233 | tag: tip | |
234 | parent: -1:0000000000000000000000000000000000000000 |
|
234 | parent: -1:0000000000000000000000000000000000000000 | |
235 | parent: -1:0000000000000000000000000000000000000000 |
|
235 | parent: -1:0000000000000000000000000000000000000000 | |
236 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 |
|
236 | manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49 | |
237 | user: test |
|
237 | user: test | |
238 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
238 | date: Thu Jan 01 00:00:01 1970 +0000 | |
239 | files+: b |
|
239 | files+: b | |
240 | extra: branch=default |
|
240 | extra: branch=default | |
241 | description: |
|
241 | description: | |
242 | b |
|
242 | b | |
243 |
|
243 | |||
244 |
|
244 | |||
245 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab |
|
245 | changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab | |
246 | parent: -1:0000000000000000000000000000000000000000 |
|
246 | parent: -1:0000000000000000000000000000000000000000 | |
247 | parent: -1:0000000000000000000000000000000000000000 |
|
247 | parent: -1:0000000000000000000000000000000000000000 | |
248 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 |
|
248 | manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 | |
249 | user: test |
|
249 | user: test | |
250 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
250 | date: Thu Jan 01 00:00:01 1970 +0000 | |
251 | files+: a |
|
251 | files+: a | |
252 | extra: branch=default |
|
252 | extra: branch=default | |
253 | description: |
|
253 | description: | |
254 | a |
|
254 | a | |
255 |
|
255 | |||
256 |
|
256 | |||
257 |
|
257 | |||
258 | Testing --traceback: |
|
258 | Testing --traceback: | |
259 |
|
259 | |||
260 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' |
|
260 | $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback' | |
261 | Traceback (most recent call last): |
|
261 | Traceback (most recent call last): | |
262 |
|
262 | |||
263 | Testing --time: |
|
263 | Testing --time: | |
264 |
|
264 | |||
265 | $ hg --cwd a --time id |
|
265 | $ hg --cwd a --time id | |
266 | 8580ff50825a tip |
|
266 | 8580ff50825a tip | |
267 | Time: real * (glob) |
|
267 | Time: real * (glob) | |
268 |
|
268 | |||
269 | Testing --version: |
|
269 | Testing --version: | |
270 |
|
270 | |||
271 | $ hg --version -q |
|
271 | $ hg --version -q | |
272 | Mercurial Distributed SCM * (glob) |
|
272 | Mercurial Distributed SCM * (glob) | |
273 |
|
273 | |||
274 | Testing -h/--help: |
|
274 | Testing -h/--help: | |
275 |
|
275 | |||
276 | $ hg -h |
|
276 | $ hg -h | |
277 | Mercurial Distributed SCM |
|
277 | Mercurial Distributed SCM | |
278 |
|
278 | |||
279 | list of commands: |
|
279 | list of commands: | |
280 |
|
280 | |||
281 | add add the specified files on the next commit |
|
281 | add add the specified files on the next commit | |
282 | addremove add all new files, delete all missing files |
|
282 | addremove add all new files, delete all missing files | |
283 | annotate show changeset information by line for each file |
|
283 | annotate show changeset information by line for each file | |
284 | archive create an unversioned archive of a repository revision |
|
284 | archive create an unversioned archive of a repository revision | |
285 | backout reverse effect of earlier changeset |
|
285 | backout reverse effect of earlier changeset | |
286 | bisect subdivision search of changesets |
|
286 | bisect subdivision search of changesets | |
287 | branch set or show the current branch name |
|
287 | branch set or show the current branch name | |
288 | branches list repository named branches |
|
288 | branches list repository named branches | |
289 | bundle create a changegroup file |
|
289 | bundle create a changegroup file | |
290 | cat output the current or given revision of files |
|
290 | cat output the current or given revision of files | |
291 | clone make a copy of an existing repository |
|
291 | clone make a copy of an existing repository | |
292 | commit commit the specified files or all outstanding changes |
|
292 | commit commit the specified files or all outstanding changes | |
293 | copy mark files as copied for the next commit |
|
293 | copy mark files as copied for the next commit | |
294 | diff diff repository (or selected files) |
|
294 | diff diff repository (or selected files) | |
295 | export dump the header and diffs for one or more changesets |
|
295 | export dump the header and diffs for one or more changesets | |
296 | forget forget the specified files on the next commit |
|
296 | forget forget the specified files on the next commit | |
297 | grep search for a pattern in specified files and revisions |
|
297 | grep search for a pattern in specified files and revisions | |
298 | heads show current repository heads or show branch heads |
|
298 | heads show current repository heads or show branch heads | |
299 | help show help for a given topic or a help overview |
|
299 | help show help for a given topic or a help overview | |
300 | identify identify the working copy or specified revision |
|
300 | identify identify the working copy or specified revision | |
301 | import import an ordered set of patches |
|
301 | import import an ordered set of patches | |
302 | incoming show new changesets found in source |
|
302 | incoming show new changesets found in source | |
303 | init create a new repository in the given directory |
|
303 | init create a new repository in the given directory | |
304 | locate locate files matching specific patterns |
|
304 | locate locate files matching specific patterns | |
305 | log show revision history of entire repository or files |
|
305 | log show revision history of entire repository or files | |
306 | manifest output the current or given revision of the project manifest |
|
306 | manifest output the current or given revision of the project manifest | |
307 | merge merge working directory with another revision |
|
307 | merge merge working directory with another revision | |
308 | outgoing show changesets not found in the destination |
|
308 | outgoing show changesets not found in the destination | |
309 | parents show the parents of the working directory or revision |
|
309 | parents show the parents of the working directory or revision | |
310 | paths show aliases for remote repositories |
|
310 | paths show aliases for remote repositories | |
311 | pull pull changes from the specified source |
|
311 | pull pull changes from the specified source | |
312 | push push changes to the specified destination |
|
312 | push push changes to the specified destination | |
313 | recover roll back an interrupted transaction |
|
313 | recover roll back an interrupted transaction | |
314 | remove remove the specified files on the next commit |
|
314 | remove remove the specified files on the next commit | |
315 | rename rename files; equivalent of copy + remove |
|
315 | rename rename files; equivalent of copy + remove | |
316 | resolve redo merges or set/view the merge status of files |
|
316 | resolve redo merges or set/view the merge status of files | |
317 | revert restore individual files or directories to an earlier state |
|
317 | revert restore individual files or directories to an earlier state | |
318 | rollback roll back the last transaction (dangerous) |
|
318 | rollback roll back the last transaction (dangerous) | |
319 | root print the root (top) of the current working directory |
|
319 | root print the root (top) of the current working directory | |
320 | serve start stand-alone webserver |
|
320 | serve start stand-alone webserver | |
321 | showconfig show combined config settings from all hgrc files |
|
321 | showconfig show combined config settings from all hgrc files | |
322 | status show changed files in the working directory |
|
322 | status show changed files in the working directory | |
323 | summary summarize working directory state |
|
323 | summary summarize working directory state | |
324 | tag add one or more tags for the current or given revision |
|
324 | tag add one or more tags for the current or given revision | |
325 | tags list repository tags |
|
325 | tags list repository tags | |
326 | tip show the tip revision |
|
326 | tip show the tip revision | |
327 | unbundle apply one or more changegroup files |
|
327 | unbundle apply one or more changegroup files | |
328 | update update working directory (or switch revisions) |
|
328 | update update working directory (or switch revisions) | |
329 | verify verify the integrity of the repository |
|
329 | verify verify the integrity of the repository | |
330 | version output version and copyright information |
|
330 | version output version and copyright information | |
331 |
|
331 | |||
332 | additional help topics: |
|
332 | additional help topics: | |
333 |
|
333 | |||
334 | config Configuration Files |
|
334 | config Configuration Files | |
335 | dates Date Formats |
|
335 | dates Date Formats | |
336 | patterns File Name Patterns |
|
336 | patterns File Name Patterns | |
337 | environment Environment Variables |
|
337 | environment Environment Variables | |
338 | revisions Specifying Single Revisions |
|
338 | revisions Specifying Single Revisions | |
339 | multirevs Specifying Multiple Revisions |
|
339 | multirevs Specifying Multiple Revisions | |
340 | revsets Specifying Revision Sets |
|
340 | revsets Specifying Revision Sets | |
341 | diffs Diff Formats |
|
341 | diffs Diff Formats | |
342 | merge-tools Merge Tools |
|
342 | merge-tools Merge Tools | |
343 | templating Template Usage |
|
343 | templating Template Usage | |
344 | urls URL Paths |
|
344 | urls URL Paths | |
345 | extensions Using additional features |
|
345 | extensions Using additional features | |
|
346 | subrepos Subrepositories | |||
346 | hgweb Configuring hgweb |
|
347 | hgweb Configuring hgweb | |
347 | glossary Glossary |
|
348 | glossary Glossary | |
348 |
|
349 | |||
349 | use "hg -v help" to show aliases and global options |
|
350 | use "hg -v help" to show aliases and global options | |
350 |
|
351 | |||
351 | $ hg --help |
|
352 | $ hg --help | |
352 | Mercurial Distributed SCM |
|
353 | Mercurial Distributed SCM | |
353 |
|
354 | |||
354 | list of commands: |
|
355 | list of commands: | |
355 |
|
356 | |||
356 | add add the specified files on the next commit |
|
357 | add add the specified files on the next commit | |
357 | addremove add all new files, delete all missing files |
|
358 | addremove add all new files, delete all missing files | |
358 | annotate show changeset information by line for each file |
|
359 | annotate show changeset information by line for each file | |
359 | archive create an unversioned archive of a repository revision |
|
360 | archive create an unversioned archive of a repository revision | |
360 | backout reverse effect of earlier changeset |
|
361 | backout reverse effect of earlier changeset | |
361 | bisect subdivision search of changesets |
|
362 | bisect subdivision search of changesets | |
362 | branch set or show the current branch name |
|
363 | branch set or show the current branch name | |
363 | branches list repository named branches |
|
364 | branches list repository named branches | |
364 | bundle create a changegroup file |
|
365 | bundle create a changegroup file | |
365 | cat output the current or given revision of files |
|
366 | cat output the current or given revision of files | |
366 | clone make a copy of an existing repository |
|
367 | clone make a copy of an existing repository | |
367 | commit commit the specified files or all outstanding changes |
|
368 | commit commit the specified files or all outstanding changes | |
368 | copy mark files as copied for the next commit |
|
369 | copy mark files as copied for the next commit | |
369 | diff diff repository (or selected files) |
|
370 | diff diff repository (or selected files) | |
370 | export dump the header and diffs for one or more changesets |
|
371 | export dump the header and diffs for one or more changesets | |
371 | forget forget the specified files on the next commit |
|
372 | forget forget the specified files on the next commit | |
372 | grep search for a pattern in specified files and revisions |
|
373 | grep search for a pattern in specified files and revisions | |
373 | heads show current repository heads or show branch heads |
|
374 | heads show current repository heads or show branch heads | |
374 | help show help for a given topic or a help overview |
|
375 | help show help for a given topic or a help overview | |
375 | identify identify the working copy or specified revision |
|
376 | identify identify the working copy or specified revision | |
376 | import import an ordered set of patches |
|
377 | import import an ordered set of patches | |
377 | incoming show new changesets found in source |
|
378 | incoming show new changesets found in source | |
378 | init create a new repository in the given directory |
|
379 | init create a new repository in the given directory | |
379 | locate locate files matching specific patterns |
|
380 | locate locate files matching specific patterns | |
380 | log show revision history of entire repository or files |
|
381 | log show revision history of entire repository or files | |
381 | manifest output the current or given revision of the project manifest |
|
382 | manifest output the current or given revision of the project manifest | |
382 | merge merge working directory with another revision |
|
383 | merge merge working directory with another revision | |
383 | outgoing show changesets not found in the destination |
|
384 | outgoing show changesets not found in the destination | |
384 | parents show the parents of the working directory or revision |
|
385 | parents show the parents of the working directory or revision | |
385 | paths show aliases for remote repositories |
|
386 | paths show aliases for remote repositories | |
386 | pull pull changes from the specified source |
|
387 | pull pull changes from the specified source | |
387 | push push changes to the specified destination |
|
388 | push push changes to the specified destination | |
388 | recover roll back an interrupted transaction |
|
389 | recover roll back an interrupted transaction | |
389 | remove remove the specified files on the next commit |
|
390 | remove remove the specified files on the next commit | |
390 | rename rename files; equivalent of copy + remove |
|
391 | rename rename files; equivalent of copy + remove | |
391 | resolve redo merges or set/view the merge status of files |
|
392 | resolve redo merges or set/view the merge status of files | |
392 | revert restore individual files or directories to an earlier state |
|
393 | revert restore individual files or directories to an earlier state | |
393 | rollback roll back the last transaction (dangerous) |
|
394 | rollback roll back the last transaction (dangerous) | |
394 | root print the root (top) of the current working directory |
|
395 | root print the root (top) of the current working directory | |
395 | serve start stand-alone webserver |
|
396 | serve start stand-alone webserver | |
396 | showconfig show combined config settings from all hgrc files |
|
397 | showconfig show combined config settings from all hgrc files | |
397 | status show changed files in the working directory |
|
398 | status show changed files in the working directory | |
398 | summary summarize working directory state |
|
399 | summary summarize working directory state | |
399 | tag add one or more tags for the current or given revision |
|
400 | tag add one or more tags for the current or given revision | |
400 | tags list repository tags |
|
401 | tags list repository tags | |
401 | tip show the tip revision |
|
402 | tip show the tip revision | |
402 | unbundle apply one or more changegroup files |
|
403 | unbundle apply one or more changegroup files | |
403 | update update working directory (or switch revisions) |
|
404 | update update working directory (or switch revisions) | |
404 | verify verify the integrity of the repository |
|
405 | verify verify the integrity of the repository | |
405 | version output version and copyright information |
|
406 | version output version and copyright information | |
406 |
|
407 | |||
407 | additional help topics: |
|
408 | additional help topics: | |
408 |
|
409 | |||
409 | config Configuration Files |
|
410 | config Configuration Files | |
410 | dates Date Formats |
|
411 | dates Date Formats | |
411 | patterns File Name Patterns |
|
412 | patterns File Name Patterns | |
412 | environment Environment Variables |
|
413 | environment Environment Variables | |
413 | revisions Specifying Single Revisions |
|
414 | revisions Specifying Single Revisions | |
414 | multirevs Specifying Multiple Revisions |
|
415 | multirevs Specifying Multiple Revisions | |
415 | revsets Specifying Revision Sets |
|
416 | revsets Specifying Revision Sets | |
416 | diffs Diff Formats |
|
417 | diffs Diff Formats | |
417 | merge-tools Merge Tools |
|
418 | merge-tools Merge Tools | |
418 | templating Template Usage |
|
419 | templating Template Usage | |
419 | urls URL Paths |
|
420 | urls URL Paths | |
420 | extensions Using additional features |
|
421 | extensions Using additional features | |
|
422 | subrepos Subrepositories | |||
421 | hgweb Configuring hgweb |
|
423 | hgweb Configuring hgweb | |
422 | glossary Glossary |
|
424 | glossary Glossary | |
423 |
|
425 | |||
424 | use "hg -v help" to show aliases and global options |
|
426 | use "hg -v help" to show aliases and global options | |
425 |
|
427 | |||
426 | Not tested: --debugger |
|
428 | Not tested: --debugger | |
427 |
|
429 |
@@ -1,785 +1,788 b'' | |||||
1 | Short help: |
|
1 | Short help: | |
2 |
|
2 | |||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM | |
5 |
|
5 | |||
6 | basic commands: |
|
6 | basic commands: | |
7 |
|
7 | |||
8 | add add the specified files on the next commit |
|
8 | add add the specified files on the next commit | |
9 | annotate show changeset information by line for each file |
|
9 | annotate show changeset information by line for each file | |
10 | clone make a copy of an existing repository |
|
10 | clone make a copy of an existing repository | |
11 | commit commit the specified files or all outstanding changes |
|
11 | commit commit the specified files or all outstanding changes | |
12 | diff diff repository (or selected files) |
|
12 | diff diff repository (or selected files) | |
13 | export dump the header and diffs for one or more changesets |
|
13 | export dump the header and diffs for one or more changesets | |
14 | forget forget the specified files on the next commit |
|
14 | forget forget the specified files on the next commit | |
15 | init create a new repository in the given directory |
|
15 | init create a new repository in the given directory | |
16 | log show revision history of entire repository or files |
|
16 | log show revision history of entire repository or files | |
17 | merge merge working directory with another revision |
|
17 | merge merge working directory with another revision | |
18 | pull pull changes from the specified source |
|
18 | pull pull changes from the specified source | |
19 | push push changes to the specified destination |
|
19 | push push changes to the specified destination | |
20 | remove remove the specified files on the next commit |
|
20 | remove remove the specified files on the next commit | |
21 | serve start stand-alone webserver |
|
21 | serve start stand-alone webserver | |
22 | status show changed files in the working directory |
|
22 | status show changed files in the working directory | |
23 | summary summarize working directory state |
|
23 | summary summarize working directory state | |
24 | update update working directory (or switch revisions) |
|
24 | update update working directory (or switch revisions) | |
25 |
|
25 | |||
26 | use "hg help" for the full list of commands or "hg -v" for details |
|
26 | use "hg help" for the full list of commands or "hg -v" for details | |
27 |
|
27 | |||
28 | $ hg -q |
|
28 | $ hg -q | |
29 | add add the specified files on the next commit |
|
29 | add add the specified files on the next commit | |
30 | annotate show changeset information by line for each file |
|
30 | annotate show changeset information by line for each file | |
31 | clone make a copy of an existing repository |
|
31 | clone make a copy of an existing repository | |
32 | commit commit the specified files or all outstanding changes |
|
32 | commit commit the specified files or all outstanding changes | |
33 | diff diff repository (or selected files) |
|
33 | diff diff repository (or selected files) | |
34 | export dump the header and diffs for one or more changesets |
|
34 | export dump the header and diffs for one or more changesets | |
35 | forget forget the specified files on the next commit |
|
35 | forget forget the specified files on the next commit | |
36 | init create a new repository in the given directory |
|
36 | init create a new repository in the given directory | |
37 | log show revision history of entire repository or files |
|
37 | log show revision history of entire repository or files | |
38 | merge merge working directory with another revision |
|
38 | merge merge working directory with another revision | |
39 | pull pull changes from the specified source |
|
39 | pull pull changes from the specified source | |
40 | push push changes to the specified destination |
|
40 | push push changes to the specified destination | |
41 | remove remove the specified files on the next commit |
|
41 | remove remove the specified files on the next commit | |
42 | serve start stand-alone webserver |
|
42 | serve start stand-alone webserver | |
43 | status show changed files in the working directory |
|
43 | status show changed files in the working directory | |
44 | summary summarize working directory state |
|
44 | summary summarize working directory state | |
45 | update update working directory (or switch revisions) |
|
45 | update update working directory (or switch revisions) | |
46 |
|
46 | |||
47 | $ hg help |
|
47 | $ hg help | |
48 | Mercurial Distributed SCM |
|
48 | Mercurial Distributed SCM | |
49 |
|
49 | |||
50 | list of commands: |
|
50 | list of commands: | |
51 |
|
51 | |||
52 | add add the specified files on the next commit |
|
52 | add add the specified files on the next commit | |
53 | addremove add all new files, delete all missing files |
|
53 | addremove add all new files, delete all missing files | |
54 | annotate show changeset information by line for each file |
|
54 | annotate show changeset information by line for each file | |
55 | archive create an unversioned archive of a repository revision |
|
55 | archive create an unversioned archive of a repository revision | |
56 | backout reverse effect of earlier changeset |
|
56 | backout reverse effect of earlier changeset | |
57 | bisect subdivision search of changesets |
|
57 | bisect subdivision search of changesets | |
58 | branch set or show the current branch name |
|
58 | branch set or show the current branch name | |
59 | branches list repository named branches |
|
59 | branches list repository named branches | |
60 | bundle create a changegroup file |
|
60 | bundle create a changegroup file | |
61 | cat output the current or given revision of files |
|
61 | cat output the current or given revision of files | |
62 | clone make a copy of an existing repository |
|
62 | clone make a copy of an existing repository | |
63 | commit commit the specified files or all outstanding changes |
|
63 | commit commit the specified files or all outstanding changes | |
64 | copy mark files as copied for the next commit |
|
64 | copy mark files as copied for the next commit | |
65 | diff diff repository (or selected files) |
|
65 | diff diff repository (or selected files) | |
66 | export dump the header and diffs for one or more changesets |
|
66 | export dump the header and diffs for one or more changesets | |
67 | forget forget the specified files on the next commit |
|
67 | forget forget the specified files on the next commit | |
68 | grep search for a pattern in specified files and revisions |
|
68 | grep search for a pattern in specified files and revisions | |
69 | heads show current repository heads or show branch heads |
|
69 | heads show current repository heads or show branch heads | |
70 | help show help for a given topic or a help overview |
|
70 | help show help for a given topic or a help overview | |
71 | identify identify the working copy or specified revision |
|
71 | identify identify the working copy or specified revision | |
72 | import import an ordered set of patches |
|
72 | import import an ordered set of patches | |
73 | incoming show new changesets found in source |
|
73 | incoming show new changesets found in source | |
74 | init create a new repository in the given directory |
|
74 | init create a new repository in the given directory | |
75 | locate locate files matching specific patterns |
|
75 | locate locate files matching specific patterns | |
76 | log show revision history of entire repository or files |
|
76 | log show revision history of entire repository or files | |
77 | manifest output the current or given revision of the project manifest |
|
77 | manifest output the current or given revision of the project manifest | |
78 | merge merge working directory with another revision |
|
78 | merge merge working directory with another revision | |
79 | outgoing show changesets not found in the destination |
|
79 | outgoing show changesets not found in the destination | |
80 | parents show the parents of the working directory or revision |
|
80 | parents show the parents of the working directory or revision | |
81 | paths show aliases for remote repositories |
|
81 | paths show aliases for remote repositories | |
82 | pull pull changes from the specified source |
|
82 | pull pull changes from the specified source | |
83 | push push changes to the specified destination |
|
83 | push push changes to the specified destination | |
84 | recover roll back an interrupted transaction |
|
84 | recover roll back an interrupted transaction | |
85 | remove remove the specified files on the next commit |
|
85 | remove remove the specified files on the next commit | |
86 | rename rename files; equivalent of copy + remove |
|
86 | rename rename files; equivalent of copy + remove | |
87 | resolve redo merges or set/view the merge status of files |
|
87 | resolve redo merges or set/view the merge status of files | |
88 | revert restore individual files or directories to an earlier state |
|
88 | revert restore individual files or directories to an earlier state | |
89 | rollback roll back the last transaction (dangerous) |
|
89 | rollback roll back the last transaction (dangerous) | |
90 | root print the root (top) of the current working directory |
|
90 | root print the root (top) of the current working directory | |
91 | serve start stand-alone webserver |
|
91 | serve start stand-alone webserver | |
92 | showconfig show combined config settings from all hgrc files |
|
92 | showconfig show combined config settings from all hgrc files | |
93 | status show changed files in the working directory |
|
93 | status show changed files in the working directory | |
94 | summary summarize working directory state |
|
94 | summary summarize working directory state | |
95 | tag add one or more tags for the current or given revision |
|
95 | tag add one or more tags for the current or given revision | |
96 | tags list repository tags |
|
96 | tags list repository tags | |
97 | tip show the tip revision |
|
97 | tip show the tip revision | |
98 | unbundle apply one or more changegroup files |
|
98 | unbundle apply one or more changegroup files | |
99 | update update working directory (or switch revisions) |
|
99 | update update working directory (or switch revisions) | |
100 | verify verify the integrity of the repository |
|
100 | verify verify the integrity of the repository | |
101 | version output version and copyright information |
|
101 | version output version and copyright information | |
102 |
|
102 | |||
103 | additional help topics: |
|
103 | additional help topics: | |
104 |
|
104 | |||
105 | config Configuration Files |
|
105 | config Configuration Files | |
106 | dates Date Formats |
|
106 | dates Date Formats | |
107 | patterns File Name Patterns |
|
107 | patterns File Name Patterns | |
108 | environment Environment Variables |
|
108 | environment Environment Variables | |
109 | revisions Specifying Single Revisions |
|
109 | revisions Specifying Single Revisions | |
110 | multirevs Specifying Multiple Revisions |
|
110 | multirevs Specifying Multiple Revisions | |
111 | revsets Specifying Revision Sets |
|
111 | revsets Specifying Revision Sets | |
112 | diffs Diff Formats |
|
112 | diffs Diff Formats | |
113 | merge-tools Merge Tools |
|
113 | merge-tools Merge Tools | |
114 | templating Template Usage |
|
114 | templating Template Usage | |
115 | urls URL Paths |
|
115 | urls URL Paths | |
116 | extensions Using additional features |
|
116 | extensions Using additional features | |
|
117 | subrepos Subrepositories | |||
117 | hgweb Configuring hgweb |
|
118 | hgweb Configuring hgweb | |
118 | glossary Glossary |
|
119 | glossary Glossary | |
119 |
|
120 | |||
120 | use "hg -v help" to show aliases and global options |
|
121 | use "hg -v help" to show aliases and global options | |
121 |
|
122 | |||
122 | $ hg -q help |
|
123 | $ hg -q help | |
123 | add add the specified files on the next commit |
|
124 | add add the specified files on the next commit | |
124 | addremove add all new files, delete all missing files |
|
125 | addremove add all new files, delete all missing files | |
125 | annotate show changeset information by line for each file |
|
126 | annotate show changeset information by line for each file | |
126 | archive create an unversioned archive of a repository revision |
|
127 | archive create an unversioned archive of a repository revision | |
127 | backout reverse effect of earlier changeset |
|
128 | backout reverse effect of earlier changeset | |
128 | bisect subdivision search of changesets |
|
129 | bisect subdivision search of changesets | |
129 | branch set or show the current branch name |
|
130 | branch set or show the current branch name | |
130 | branches list repository named branches |
|
131 | branches list repository named branches | |
131 | bundle create a changegroup file |
|
132 | bundle create a changegroup file | |
132 | cat output the current or given revision of files |
|
133 | cat output the current or given revision of files | |
133 | clone make a copy of an existing repository |
|
134 | clone make a copy of an existing repository | |
134 | commit commit the specified files or all outstanding changes |
|
135 | commit commit the specified files or all outstanding changes | |
135 | copy mark files as copied for the next commit |
|
136 | copy mark files as copied for the next commit | |
136 | diff diff repository (or selected files) |
|
137 | diff diff repository (or selected files) | |
137 | export dump the header and diffs for one or more changesets |
|
138 | export dump the header and diffs for one or more changesets | |
138 | forget forget the specified files on the next commit |
|
139 | forget forget the specified files on the next commit | |
139 | grep search for a pattern in specified files and revisions |
|
140 | grep search for a pattern in specified files and revisions | |
140 | heads show current repository heads or show branch heads |
|
141 | heads show current repository heads or show branch heads | |
141 | help show help for a given topic or a help overview |
|
142 | help show help for a given topic or a help overview | |
142 | identify identify the working copy or specified revision |
|
143 | identify identify the working copy or specified revision | |
143 | import import an ordered set of patches |
|
144 | import import an ordered set of patches | |
144 | incoming show new changesets found in source |
|
145 | incoming show new changesets found in source | |
145 | init create a new repository in the given directory |
|
146 | init create a new repository in the given directory | |
146 | locate locate files matching specific patterns |
|
147 | locate locate files matching specific patterns | |
147 | log show revision history of entire repository or files |
|
148 | log show revision history of entire repository or files | |
148 | manifest output the current or given revision of the project manifest |
|
149 | manifest output the current or given revision of the project manifest | |
149 | merge merge working directory with another revision |
|
150 | merge merge working directory with another revision | |
150 | outgoing show changesets not found in the destination |
|
151 | outgoing show changesets not found in the destination | |
151 | parents show the parents of the working directory or revision |
|
152 | parents show the parents of the working directory or revision | |
152 | paths show aliases for remote repositories |
|
153 | paths show aliases for remote repositories | |
153 | pull pull changes from the specified source |
|
154 | pull pull changes from the specified source | |
154 | push push changes to the specified destination |
|
155 | push push changes to the specified destination | |
155 | recover roll back an interrupted transaction |
|
156 | recover roll back an interrupted transaction | |
156 | remove remove the specified files on the next commit |
|
157 | remove remove the specified files on the next commit | |
157 | rename rename files; equivalent of copy + remove |
|
158 | rename rename files; equivalent of copy + remove | |
158 | resolve redo merges or set/view the merge status of files |
|
159 | resolve redo merges or set/view the merge status of files | |
159 | revert restore individual files or directories to an earlier state |
|
160 | revert restore individual files or directories to an earlier state | |
160 | rollback roll back the last transaction (dangerous) |
|
161 | rollback roll back the last transaction (dangerous) | |
161 | root print the root (top) of the current working directory |
|
162 | root print the root (top) of the current working directory | |
162 | serve start stand-alone webserver |
|
163 | serve start stand-alone webserver | |
163 | showconfig show combined config settings from all hgrc files |
|
164 | showconfig show combined config settings from all hgrc files | |
164 | status show changed files in the working directory |
|
165 | status show changed files in the working directory | |
165 | summary summarize working directory state |
|
166 | summary summarize working directory state | |
166 | tag add one or more tags for the current or given revision |
|
167 | tag add one or more tags for the current or given revision | |
167 | tags list repository tags |
|
168 | tags list repository tags | |
168 | tip show the tip revision |
|
169 | tip show the tip revision | |
169 | unbundle apply one or more changegroup files |
|
170 | unbundle apply one or more changegroup files | |
170 | update update working directory (or switch revisions) |
|
171 | update update working directory (or switch revisions) | |
171 | verify verify the integrity of the repository |
|
172 | verify verify the integrity of the repository | |
172 | version output version and copyright information |
|
173 | version output version and copyright information | |
173 |
|
174 | |||
174 | additional help topics: |
|
175 | additional help topics: | |
175 |
|
176 | |||
176 | config Configuration Files |
|
177 | config Configuration Files | |
177 | dates Date Formats |
|
178 | dates Date Formats | |
178 | patterns File Name Patterns |
|
179 | patterns File Name Patterns | |
179 | environment Environment Variables |
|
180 | environment Environment Variables | |
180 | revisions Specifying Single Revisions |
|
181 | revisions Specifying Single Revisions | |
181 | multirevs Specifying Multiple Revisions |
|
182 | multirevs Specifying Multiple Revisions | |
182 | revsets Specifying Revision Sets |
|
183 | revsets Specifying Revision Sets | |
183 | diffs Diff Formats |
|
184 | diffs Diff Formats | |
184 | merge-tools Merge Tools |
|
185 | merge-tools Merge Tools | |
185 | templating Template Usage |
|
186 | templating Template Usage | |
186 | urls URL Paths |
|
187 | urls URL Paths | |
187 | extensions Using additional features |
|
188 | extensions Using additional features | |
|
189 | subrepos Subrepositories | |||
188 | hgweb Configuring hgweb |
|
190 | hgweb Configuring hgweb | |
189 | glossary Glossary |
|
191 | glossary Glossary | |
190 |
|
192 | |||
191 | Test short command list with verbose option |
|
193 | Test short command list with verbose option | |
192 |
|
194 | |||
193 | $ hg -v help shortlist |
|
195 | $ hg -v help shortlist | |
194 | Mercurial Distributed SCM (version *) (glob) |
|
196 | Mercurial Distributed SCM (version *) (glob) | |
195 |
|
197 | |||
196 | Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others |
|
198 | Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others | |
197 | This is free software; see the source for copying conditions. There is NO |
|
199 | This is free software; see the source for copying conditions. There is NO | |
198 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
200 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
199 |
|
201 | |||
200 | basic commands: |
|
202 | basic commands: | |
201 |
|
203 | |||
202 | add: |
|
204 | add: | |
203 | add the specified files on the next commit |
|
205 | add the specified files on the next commit | |
204 | annotate, blame: |
|
206 | annotate, blame: | |
205 | show changeset information by line for each file |
|
207 | show changeset information by line for each file | |
206 | clone: |
|
208 | clone: | |
207 | make a copy of an existing repository |
|
209 | make a copy of an existing repository | |
208 | commit, ci: |
|
210 | commit, ci: | |
209 | commit the specified files or all outstanding changes |
|
211 | commit the specified files or all outstanding changes | |
210 | diff: |
|
212 | diff: | |
211 | diff repository (or selected files) |
|
213 | diff repository (or selected files) | |
212 | export: |
|
214 | export: | |
213 | dump the header and diffs for one or more changesets |
|
215 | dump the header and diffs for one or more changesets | |
214 | forget: |
|
216 | forget: | |
215 | forget the specified files on the next commit |
|
217 | forget the specified files on the next commit | |
216 | init: |
|
218 | init: | |
217 | create a new repository in the given directory |
|
219 | create a new repository in the given directory | |
218 | log, history: |
|
220 | log, history: | |
219 | show revision history of entire repository or files |
|
221 | show revision history of entire repository or files | |
220 | merge: |
|
222 | merge: | |
221 | merge working directory with another revision |
|
223 | merge working directory with another revision | |
222 | pull: |
|
224 | pull: | |
223 | pull changes from the specified source |
|
225 | pull changes from the specified source | |
224 | push: |
|
226 | push: | |
225 | push changes to the specified destination |
|
227 | push changes to the specified destination | |
226 | remove, rm: |
|
228 | remove, rm: | |
227 | remove the specified files on the next commit |
|
229 | remove the specified files on the next commit | |
228 | serve: |
|
230 | serve: | |
229 | start stand-alone webserver |
|
231 | start stand-alone webserver | |
230 | status, st: |
|
232 | status, st: | |
231 | show changed files in the working directory |
|
233 | show changed files in the working directory | |
232 | summary, sum: |
|
234 | summary, sum: | |
233 | summarize working directory state |
|
235 | summarize working directory state | |
234 | update, up, checkout, co: |
|
236 | update, up, checkout, co: | |
235 | update working directory (or switch revisions) |
|
237 | update working directory (or switch revisions) | |
236 |
|
238 | |||
237 | global options: |
|
239 | global options: | |
238 | -R --repository REPO repository root directory or name of overlay bundle |
|
240 | -R --repository REPO repository root directory or name of overlay bundle | |
239 | file |
|
241 | file | |
240 | --cwd DIR change working directory |
|
242 | --cwd DIR change working directory | |
241 | -y --noninteractive do not prompt, assume 'yes' for any required answers |
|
243 | -y --noninteractive do not prompt, assume 'yes' for any required answers | |
242 | -q --quiet suppress output |
|
244 | -q --quiet suppress output | |
243 | -v --verbose enable additional output |
|
245 | -v --verbose enable additional output | |
244 | --config CONFIG [+] set/override config option (use 'section.name=value') |
|
246 | --config CONFIG [+] set/override config option (use 'section.name=value') | |
245 | --debug enable debugging output |
|
247 | --debug enable debugging output | |
246 | --debugger start debugger |
|
248 | --debugger start debugger | |
247 | --encoding ENCODE set the charset encoding (default: ascii) |
|
249 | --encoding ENCODE set the charset encoding (default: ascii) | |
248 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
250 | --encodingmode MODE set the charset encoding mode (default: strict) | |
249 | --traceback always print a traceback on exception |
|
251 | --traceback always print a traceback on exception | |
250 | --time time how long the command takes |
|
252 | --time time how long the command takes | |
251 | --profile print command execution profile |
|
253 | --profile print command execution profile | |
252 | --version output version information and exit |
|
254 | --version output version information and exit | |
253 | -h --help display help and exit |
|
255 | -h --help display help and exit | |
254 |
|
256 | |||
255 | [+] marked option can be specified multiple times |
|
257 | [+] marked option can be specified multiple times | |
256 |
|
258 | |||
257 | use "hg help" for the full list of commands |
|
259 | use "hg help" for the full list of commands | |
258 |
|
260 | |||
259 | $ hg add -h |
|
261 | $ hg add -h | |
260 | hg add [OPTION]... [FILE]... |
|
262 | hg add [OPTION]... [FILE]... | |
261 |
|
263 | |||
262 | add the specified files on the next commit |
|
264 | add the specified files on the next commit | |
263 |
|
265 | |||
264 | Schedule files to be version controlled and added to the repository. |
|
266 | Schedule files to be version controlled and added to the repository. | |
265 |
|
267 | |||
266 | The files will be added to the repository at the next commit. To undo an |
|
268 | The files will be added to the repository at the next commit. To undo an | |
267 | add before that, see "hg forget". |
|
269 | add before that, see "hg forget". | |
268 |
|
270 | |||
269 | If no names are given, add all files to the repository. |
|
271 | If no names are given, add all files to the repository. | |
270 |
|
272 | |||
271 | Returns 0 if all files are successfully added. |
|
273 | Returns 0 if all files are successfully added. | |
272 |
|
274 | |||
273 | use "hg -v help add" to show verbose help |
|
275 | use "hg -v help add" to show verbose help | |
274 |
|
276 | |||
275 | options: |
|
277 | options: | |
276 |
|
278 | |||
277 | -I --include PATTERN [+] include names matching the given patterns |
|
279 | -I --include PATTERN [+] include names matching the given patterns | |
278 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
280 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
279 | -S --subrepos recurse into subrepositories |
|
281 | -S --subrepos recurse into subrepositories | |
280 | -n --dry-run do not perform actions, just print output |
|
282 | -n --dry-run do not perform actions, just print output | |
281 |
|
283 | |||
282 | [+] marked option can be specified multiple times |
|
284 | [+] marked option can be specified multiple times | |
283 |
|
285 | |||
284 | use "hg -v help add" to show global options |
|
286 | use "hg -v help add" to show global options | |
285 |
|
287 | |||
286 | Verbose help for add |
|
288 | Verbose help for add | |
287 |
|
289 | |||
288 | $ hg add -hv |
|
290 | $ hg add -hv | |
289 | hg add [OPTION]... [FILE]... |
|
291 | hg add [OPTION]... [FILE]... | |
290 |
|
292 | |||
291 | add the specified files on the next commit |
|
293 | add the specified files on the next commit | |
292 |
|
294 | |||
293 | Schedule files to be version controlled and added to the repository. |
|
295 | Schedule files to be version controlled and added to the repository. | |
294 |
|
296 | |||
295 | The files will be added to the repository at the next commit. To undo an |
|
297 | The files will be added to the repository at the next commit. To undo an | |
296 | add before that, see "hg forget". |
|
298 | add before that, see "hg forget". | |
297 |
|
299 | |||
298 | If no names are given, add all files to the repository. |
|
300 | If no names are given, add all files to the repository. | |
299 |
|
301 | |||
300 | An example showing how new (unknown) files are added automatically by "hg |
|
302 | An example showing how new (unknown) files are added automatically by "hg | |
301 | add": |
|
303 | add": | |
302 |
|
304 | |||
303 | $ ls |
|
305 | $ ls | |
304 | foo.c |
|
306 | foo.c | |
305 | $ hg status |
|
307 | $ hg status | |
306 | ? foo.c |
|
308 | ? foo.c | |
307 | $ hg add |
|
309 | $ hg add | |
308 | adding foo.c |
|
310 | adding foo.c | |
309 | $ hg status |
|
311 | $ hg status | |
310 | A foo.c |
|
312 | A foo.c | |
311 |
|
313 | |||
312 | Returns 0 if all files are successfully added. |
|
314 | Returns 0 if all files are successfully added. | |
313 |
|
315 | |||
314 | options: |
|
316 | options: | |
315 |
|
317 | |||
316 | -I --include PATTERN [+] include names matching the given patterns |
|
318 | -I --include PATTERN [+] include names matching the given patterns | |
317 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
319 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
318 | -S --subrepos recurse into subrepositories |
|
320 | -S --subrepos recurse into subrepositories | |
319 | -n --dry-run do not perform actions, just print output |
|
321 | -n --dry-run do not perform actions, just print output | |
320 |
|
322 | |||
321 | global options: |
|
323 | global options: | |
322 | -R --repository REPO repository root directory or name of overlay bundle |
|
324 | -R --repository REPO repository root directory or name of overlay bundle | |
323 | file |
|
325 | file | |
324 | --cwd DIR change working directory |
|
326 | --cwd DIR change working directory | |
325 | -y --noninteractive do not prompt, assume 'yes' for any required |
|
327 | -y --noninteractive do not prompt, assume 'yes' for any required | |
326 | answers |
|
328 | answers | |
327 | -q --quiet suppress output |
|
329 | -q --quiet suppress output | |
328 | -v --verbose enable additional output |
|
330 | -v --verbose enable additional output | |
329 | --config CONFIG [+] set/override config option (use |
|
331 | --config CONFIG [+] set/override config option (use | |
330 | 'section.name=value') |
|
332 | 'section.name=value') | |
331 | --debug enable debugging output |
|
333 | --debug enable debugging output | |
332 | --debugger start debugger |
|
334 | --debugger start debugger | |
333 | --encoding ENCODE set the charset encoding (default: ascii) |
|
335 | --encoding ENCODE set the charset encoding (default: ascii) | |
334 | --encodingmode MODE set the charset encoding mode (default: strict) |
|
336 | --encodingmode MODE set the charset encoding mode (default: strict) | |
335 | --traceback always print a traceback on exception |
|
337 | --traceback always print a traceback on exception | |
336 | --time time how long the command takes |
|
338 | --time time how long the command takes | |
337 | --profile print command execution profile |
|
339 | --profile print command execution profile | |
338 | --version output version information and exit |
|
340 | --version output version information and exit | |
339 | -h --help display help and exit |
|
341 | -h --help display help and exit | |
340 |
|
342 | |||
341 | [+] marked option can be specified multiple times |
|
343 | [+] marked option can be specified multiple times | |
342 |
|
344 | |||
343 | Test help option with version option |
|
345 | Test help option with version option | |
344 |
|
346 | |||
345 | $ hg add -h --version |
|
347 | $ hg add -h --version | |
346 | Mercurial Distributed SCM (version *) (glob) |
|
348 | Mercurial Distributed SCM (version *) (glob) | |
347 |
|
349 | |||
348 | Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others |
|
350 | Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others | |
349 | This is free software; see the source for copying conditions. There is NO |
|
351 | This is free software; see the source for copying conditions. There is NO | |
350 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
352 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
351 |
|
353 | |||
352 | hg add [OPTION]... [FILE]... |
|
354 | hg add [OPTION]... [FILE]... | |
353 |
|
355 | |||
354 | add the specified files on the next commit |
|
356 | add the specified files on the next commit | |
355 |
|
357 | |||
356 | Schedule files to be version controlled and added to the repository. |
|
358 | Schedule files to be version controlled and added to the repository. | |
357 |
|
359 | |||
358 | The files will be added to the repository at the next commit. To undo an |
|
360 | The files will be added to the repository at the next commit. To undo an | |
359 | add before that, see "hg forget". |
|
361 | add before that, see "hg forget". | |
360 |
|
362 | |||
361 | If no names are given, add all files to the repository. |
|
363 | If no names are given, add all files to the repository. | |
362 |
|
364 | |||
363 | Returns 0 if all files are successfully added. |
|
365 | Returns 0 if all files are successfully added. | |
364 |
|
366 | |||
365 | use "hg -v help add" to show verbose help |
|
367 | use "hg -v help add" to show verbose help | |
366 |
|
368 | |||
367 | options: |
|
369 | options: | |
368 |
|
370 | |||
369 | -I --include PATTERN [+] include names matching the given patterns |
|
371 | -I --include PATTERN [+] include names matching the given patterns | |
370 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
372 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
371 | -S --subrepos recurse into subrepositories |
|
373 | -S --subrepos recurse into subrepositories | |
372 | -n --dry-run do not perform actions, just print output |
|
374 | -n --dry-run do not perform actions, just print output | |
373 |
|
375 | |||
374 | [+] marked option can be specified multiple times |
|
376 | [+] marked option can be specified multiple times | |
375 |
|
377 | |||
376 | use "hg -v help add" to show global options |
|
378 | use "hg -v help add" to show global options | |
377 |
|
379 | |||
378 | $ hg add --skjdfks |
|
380 | $ hg add --skjdfks | |
379 | hg add: option --skjdfks not recognized |
|
381 | hg add: option --skjdfks not recognized | |
380 | hg add [OPTION]... [FILE]... |
|
382 | hg add [OPTION]... [FILE]... | |
381 |
|
383 | |||
382 | add the specified files on the next commit |
|
384 | add the specified files on the next commit | |
383 |
|
385 | |||
384 | Schedule files to be version controlled and added to the repository. |
|
386 | Schedule files to be version controlled and added to the repository. | |
385 |
|
387 | |||
386 | The files will be added to the repository at the next commit. To undo an |
|
388 | The files will be added to the repository at the next commit. To undo an | |
387 | add before that, see "hg forget". |
|
389 | add before that, see "hg forget". | |
388 |
|
390 | |||
389 | If no names are given, add all files to the repository. |
|
391 | If no names are given, add all files to the repository. | |
390 |
|
392 | |||
391 | Returns 0 if all files are successfully added. |
|
393 | Returns 0 if all files are successfully added. | |
392 |
|
394 | |||
393 | use "hg -v help add" to show verbose help |
|
395 | use "hg -v help add" to show verbose help | |
394 |
|
396 | |||
395 | options: |
|
397 | options: | |
396 |
|
398 | |||
397 | -I --include PATTERN [+] include names matching the given patterns |
|
399 | -I --include PATTERN [+] include names matching the given patterns | |
398 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
400 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
399 | -S --subrepos recurse into subrepositories |
|
401 | -S --subrepos recurse into subrepositories | |
400 | -n --dry-run do not perform actions, just print output |
|
402 | -n --dry-run do not perform actions, just print output | |
401 |
|
403 | |||
402 | [+] marked option can be specified multiple times |
|
404 | [+] marked option can be specified multiple times | |
403 |
|
405 | |||
404 | use "hg -v help add" to show global options |
|
406 | use "hg -v help add" to show global options | |
405 | [255] |
|
407 | [255] | |
406 |
|
408 | |||
407 | Test ambiguous command help |
|
409 | Test ambiguous command help | |
408 |
|
410 | |||
409 | $ hg help ad |
|
411 | $ hg help ad | |
410 | list of commands: |
|
412 | list of commands: | |
411 |
|
413 | |||
412 | add add the specified files on the next commit |
|
414 | add add the specified files on the next commit | |
413 | addremove add all new files, delete all missing files |
|
415 | addremove add all new files, delete all missing files | |
414 |
|
416 | |||
415 | use "hg -v help ad" to show aliases and global options |
|
417 | use "hg -v help ad" to show aliases and global options | |
416 |
|
418 | |||
417 | Test command without options |
|
419 | Test command without options | |
418 |
|
420 | |||
419 | $ hg help verify |
|
421 | $ hg help verify | |
420 | hg verify |
|
422 | hg verify | |
421 |
|
423 | |||
422 | verify the integrity of the repository |
|
424 | verify the integrity of the repository | |
423 |
|
425 | |||
424 | Verify the integrity of the current repository. |
|
426 | Verify the integrity of the current repository. | |
425 |
|
427 | |||
426 | This will perform an extensive check of the repository's integrity, |
|
428 | This will perform an extensive check of the repository's integrity, | |
427 | validating the hashes and checksums of each entry in the changelog, |
|
429 | validating the hashes and checksums of each entry in the changelog, | |
428 | manifest, and tracked files, as well as the integrity of their crosslinks |
|
430 | manifest, and tracked files, as well as the integrity of their crosslinks | |
429 | and indices. |
|
431 | and indices. | |
430 |
|
432 | |||
431 | Returns 0 on success, 1 if errors are encountered. |
|
433 | Returns 0 on success, 1 if errors are encountered. | |
432 |
|
434 | |||
433 | use "hg -v help verify" to show global options |
|
435 | use "hg -v help verify" to show global options | |
434 |
|
436 | |||
435 | $ hg help diff |
|
437 | $ hg help diff | |
436 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... |
|
438 | hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]... | |
437 |
|
439 | |||
438 | diff repository (or selected files) |
|
440 | diff repository (or selected files) | |
439 |
|
441 | |||
440 | Show differences between revisions for the specified files. |
|
442 | Show differences between revisions for the specified files. | |
441 |
|
443 | |||
442 | Differences between files are shown using the unified diff format. |
|
444 | Differences between files are shown using the unified diff format. | |
443 |
|
445 | |||
444 | Note: |
|
446 | Note: | |
445 | diff may generate unexpected results for merges, as it will default to |
|
447 | diff may generate unexpected results for merges, as it will default to | |
446 | comparing against the working directory's first parent changeset if no |
|
448 | comparing against the working directory's first parent changeset if no | |
447 | revisions are specified. |
|
449 | revisions are specified. | |
448 |
|
450 | |||
449 | When two revision arguments are given, then changes are shown between |
|
451 | When two revision arguments are given, then changes are shown between | |
450 | those revisions. If only one revision is specified then that revision is |
|
452 | those revisions. If only one revision is specified then that revision is | |
451 | compared to the working directory, and, when no revisions are specified, |
|
453 | compared to the working directory, and, when no revisions are specified, | |
452 | the working directory files are compared to its parent. |
|
454 | the working directory files are compared to its parent. | |
453 |
|
455 | |||
454 | Alternatively you can specify -c/--change with a revision to see the |
|
456 | Alternatively you can specify -c/--change with a revision to see the | |
455 | changes in that changeset relative to its first parent. |
|
457 | changes in that changeset relative to its first parent. | |
456 |
|
458 | |||
457 | Without the -a/--text option, diff will avoid generating diffs of files it |
|
459 | Without the -a/--text option, diff will avoid generating diffs of files it | |
458 | detects as binary. With -a, diff will generate a diff anyway, probably |
|
460 | detects as binary. With -a, diff will generate a diff anyway, probably | |
459 | with undesirable results. |
|
461 | with undesirable results. | |
460 |
|
462 | |||
461 | Use the -g/--git option to generate diffs in the git extended diff format. |
|
463 | Use the -g/--git option to generate diffs in the git extended diff format. | |
462 | For more information, read "hg help diffs". |
|
464 | For more information, read "hg help diffs". | |
463 |
|
465 | |||
464 | Returns 0 on success. |
|
466 | Returns 0 on success. | |
465 |
|
467 | |||
466 | options: |
|
468 | options: | |
467 |
|
469 | |||
468 | -r --rev REV [+] revision |
|
470 | -r --rev REV [+] revision | |
469 | -c --change REV change made by revision |
|
471 | -c --change REV change made by revision | |
470 | -a --text treat all files as text |
|
472 | -a --text treat all files as text | |
471 | -g --git use git extended diff format |
|
473 | -g --git use git extended diff format | |
472 | --nodates omit dates from diff headers |
|
474 | --nodates omit dates from diff headers | |
473 | -p --show-function show which function each change is in |
|
475 | -p --show-function show which function each change is in | |
474 | --reverse produce a diff that undoes the changes |
|
476 | --reverse produce a diff that undoes the changes | |
475 | -w --ignore-all-space ignore white space when comparing lines |
|
477 | -w --ignore-all-space ignore white space when comparing lines | |
476 | -b --ignore-space-change ignore changes in the amount of white space |
|
478 | -b --ignore-space-change ignore changes in the amount of white space | |
477 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
479 | -B --ignore-blank-lines ignore changes whose lines are all blank | |
478 | -U --unified NUM number of lines of context to show |
|
480 | -U --unified NUM number of lines of context to show | |
479 | --stat output diffstat-style summary of changes |
|
481 | --stat output diffstat-style summary of changes | |
480 | -I --include PATTERN [+] include names matching the given patterns |
|
482 | -I --include PATTERN [+] include names matching the given patterns | |
481 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
483 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
482 | -S --subrepos recurse into subrepositories |
|
484 | -S --subrepos recurse into subrepositories | |
483 |
|
485 | |||
484 | [+] marked option can be specified multiple times |
|
486 | [+] marked option can be specified multiple times | |
485 |
|
487 | |||
486 | use "hg -v help diff" to show global options |
|
488 | use "hg -v help diff" to show global options | |
487 |
|
489 | |||
488 | $ hg help status |
|
490 | $ hg help status | |
489 | hg status [OPTION]... [FILE]... |
|
491 | hg status [OPTION]... [FILE]... | |
490 |
|
492 | |||
491 | aliases: st |
|
493 | aliases: st | |
492 |
|
494 | |||
493 | show changed files in the working directory |
|
495 | show changed files in the working directory | |
494 |
|
496 | |||
495 | Show status of files in the repository. If names are given, only files |
|
497 | Show status of files in the repository. If names are given, only files | |
496 | that match are shown. Files that are clean or ignored or the source of a |
|
498 | that match are shown. Files that are clean or ignored or the source of a | |
497 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, |
|
499 | copy/move operation, are not listed unless -c/--clean, -i/--ignored, | |
498 | -C/--copies or -A/--all are given. Unless options described with "show |
|
500 | -C/--copies or -A/--all are given. Unless options described with "show | |
499 | only ..." are given, the options -mardu are used. |
|
501 | only ..." are given, the options -mardu are used. | |
500 |
|
502 | |||
501 | Option -q/--quiet hides untracked (unknown and ignored) files unless |
|
503 | Option -q/--quiet hides untracked (unknown and ignored) files unless | |
502 | explicitly requested with -u/--unknown or -i/--ignored. |
|
504 | explicitly requested with -u/--unknown or -i/--ignored. | |
503 |
|
505 | |||
504 | Note: |
|
506 | Note: | |
505 | status may appear to disagree with diff if permissions have changed or |
|
507 | status may appear to disagree with diff if permissions have changed or | |
506 | a merge has occurred. The standard diff format does not report |
|
508 | a merge has occurred. The standard diff format does not report | |
507 | permission changes and diff only reports changes relative to one merge |
|
509 | permission changes and diff only reports changes relative to one merge | |
508 | parent. |
|
510 | parent. | |
509 |
|
511 | |||
510 | If one revision is given, it is used as the base revision. If two |
|
512 | If one revision is given, it is used as the base revision. If two | |
511 | revisions are given, the differences between them are shown. The --change |
|
513 | revisions are given, the differences between them are shown. The --change | |
512 | option can also be used as a shortcut to list the changed files of a |
|
514 | option can also be used as a shortcut to list the changed files of a | |
513 | revision from its first parent. |
|
515 | revision from its first parent. | |
514 |
|
516 | |||
515 | The codes used to show the status of files are: |
|
517 | The codes used to show the status of files are: | |
516 |
|
518 | |||
517 | M = modified |
|
519 | M = modified | |
518 | A = added |
|
520 | A = added | |
519 | R = removed |
|
521 | R = removed | |
520 | C = clean |
|
522 | C = clean | |
521 | ! = missing (deleted by non-hg command, but still tracked) |
|
523 | ! = missing (deleted by non-hg command, but still tracked) | |
522 | ? = not tracked |
|
524 | ? = not tracked | |
523 | I = ignored |
|
525 | I = ignored | |
524 | = origin of the previous file listed as A (added) |
|
526 | = origin of the previous file listed as A (added) | |
525 |
|
527 | |||
526 | Returns 0 on success. |
|
528 | Returns 0 on success. | |
527 |
|
529 | |||
528 | options: |
|
530 | options: | |
529 |
|
531 | |||
530 | -A --all show status of all files |
|
532 | -A --all show status of all files | |
531 | -m --modified show only modified files |
|
533 | -m --modified show only modified files | |
532 | -a --added show only added files |
|
534 | -a --added show only added files | |
533 | -r --removed show only removed files |
|
535 | -r --removed show only removed files | |
534 | -d --deleted show only deleted (but tracked) files |
|
536 | -d --deleted show only deleted (but tracked) files | |
535 | -c --clean show only files without changes |
|
537 | -c --clean show only files without changes | |
536 | -u --unknown show only unknown (not tracked) files |
|
538 | -u --unknown show only unknown (not tracked) files | |
537 | -i --ignored show only ignored files |
|
539 | -i --ignored show only ignored files | |
538 | -n --no-status hide status prefix |
|
540 | -n --no-status hide status prefix | |
539 | -C --copies show source of copied files |
|
541 | -C --copies show source of copied files | |
540 | -0 --print0 end filenames with NUL, for use with xargs |
|
542 | -0 --print0 end filenames with NUL, for use with xargs | |
541 | --rev REV [+] show difference from revision |
|
543 | --rev REV [+] show difference from revision | |
542 | --change REV list the changed files of a revision |
|
544 | --change REV list the changed files of a revision | |
543 | -I --include PATTERN [+] include names matching the given patterns |
|
545 | -I --include PATTERN [+] include names matching the given patterns | |
544 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
546 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
545 | -S --subrepos recurse into subrepositories |
|
547 | -S --subrepos recurse into subrepositories | |
546 |
|
548 | |||
547 | [+] marked option can be specified multiple times |
|
549 | [+] marked option can be specified multiple times | |
548 |
|
550 | |||
549 | use "hg -v help status" to show global options |
|
551 | use "hg -v help status" to show global options | |
550 |
|
552 | |||
551 | $ hg -q help status |
|
553 | $ hg -q help status | |
552 | hg status [OPTION]... [FILE]... |
|
554 | hg status [OPTION]... [FILE]... | |
553 |
|
555 | |||
554 | show changed files in the working directory |
|
556 | show changed files in the working directory | |
555 |
|
557 | |||
556 | $ hg help foo |
|
558 | $ hg help foo | |
557 | hg: unknown command 'foo' |
|
559 | hg: unknown command 'foo' | |
558 | Mercurial Distributed SCM |
|
560 | Mercurial Distributed SCM | |
559 |
|
561 | |||
560 | basic commands: |
|
562 | basic commands: | |
561 |
|
563 | |||
562 | add add the specified files on the next commit |
|
564 | add add the specified files on the next commit | |
563 | annotate show changeset information by line for each file |
|
565 | annotate show changeset information by line for each file | |
564 | clone make a copy of an existing repository |
|
566 | clone make a copy of an existing repository | |
565 | commit commit the specified files or all outstanding changes |
|
567 | commit commit the specified files or all outstanding changes | |
566 | diff diff repository (or selected files) |
|
568 | diff diff repository (or selected files) | |
567 | export dump the header and diffs for one or more changesets |
|
569 | export dump the header and diffs for one or more changesets | |
568 | forget forget the specified files on the next commit |
|
570 | forget forget the specified files on the next commit | |
569 | init create a new repository in the given directory |
|
571 | init create a new repository in the given directory | |
570 | log show revision history of entire repository or files |
|
572 | log show revision history of entire repository or files | |
571 | merge merge working directory with another revision |
|
573 | merge merge working directory with another revision | |
572 | pull pull changes from the specified source |
|
574 | pull pull changes from the specified source | |
573 | push push changes to the specified destination |
|
575 | push push changes to the specified destination | |
574 | remove remove the specified files on the next commit |
|
576 | remove remove the specified files on the next commit | |
575 | serve start stand-alone webserver |
|
577 | serve start stand-alone webserver | |
576 | status show changed files in the working directory |
|
578 | status show changed files in the working directory | |
577 | summary summarize working directory state |
|
579 | summary summarize working directory state | |
578 | update update working directory (or switch revisions) |
|
580 | update update working directory (or switch revisions) | |
579 |
|
581 | |||
580 | use "hg help" for the full list of commands or "hg -v" for details |
|
582 | use "hg help" for the full list of commands or "hg -v" for details | |
581 | [255] |
|
583 | [255] | |
582 |
|
584 | |||
583 | $ hg skjdfks |
|
585 | $ hg skjdfks | |
584 | hg: unknown command 'skjdfks' |
|
586 | hg: unknown command 'skjdfks' | |
585 | Mercurial Distributed SCM |
|
587 | Mercurial Distributed SCM | |
586 |
|
588 | |||
587 | basic commands: |
|
589 | basic commands: | |
588 |
|
590 | |||
589 | add add the specified files on the next commit |
|
591 | add add the specified files on the next commit | |
590 | annotate show changeset information by line for each file |
|
592 | annotate show changeset information by line for each file | |
591 | clone make a copy of an existing repository |
|
593 | clone make a copy of an existing repository | |
592 | commit commit the specified files or all outstanding changes |
|
594 | commit commit the specified files or all outstanding changes | |
593 | diff diff repository (or selected files) |
|
595 | diff diff repository (or selected files) | |
594 | export dump the header and diffs for one or more changesets |
|
596 | export dump the header and diffs for one or more changesets | |
595 | forget forget the specified files on the next commit |
|
597 | forget forget the specified files on the next commit | |
596 | init create a new repository in the given directory |
|
598 | init create a new repository in the given directory | |
597 | log show revision history of entire repository or files |
|
599 | log show revision history of entire repository or files | |
598 | merge merge working directory with another revision |
|
600 | merge merge working directory with another revision | |
599 | pull pull changes from the specified source |
|
601 | pull pull changes from the specified source | |
600 | push push changes to the specified destination |
|
602 | push push changes to the specified destination | |
601 | remove remove the specified files on the next commit |
|
603 | remove remove the specified files on the next commit | |
602 | serve start stand-alone webserver |
|
604 | serve start stand-alone webserver | |
603 | status show changed files in the working directory |
|
605 | status show changed files in the working directory | |
604 | summary summarize working directory state |
|
606 | summary summarize working directory state | |
605 | update update working directory (or switch revisions) |
|
607 | update update working directory (or switch revisions) | |
606 |
|
608 | |||
607 | use "hg help" for the full list of commands or "hg -v" for details |
|
609 | use "hg help" for the full list of commands or "hg -v" for details | |
608 | [255] |
|
610 | [255] | |
609 |
|
611 | |||
610 | $ cat > helpext.py <<EOF |
|
612 | $ cat > helpext.py <<EOF | |
611 | > import os |
|
613 | > import os | |
612 | > from mercurial import commands |
|
614 | > from mercurial import commands | |
613 | > |
|
615 | > | |
614 | > def nohelp(ui, *args, **kwargs): |
|
616 | > def nohelp(ui, *args, **kwargs): | |
615 | > pass |
|
617 | > pass | |
616 | > |
|
618 | > | |
617 | > cmdtable = { |
|
619 | > cmdtable = { | |
618 | > "nohelp": (nohelp, [], "hg nohelp"), |
|
620 | > "nohelp": (nohelp, [], "hg nohelp"), | |
619 | > } |
|
621 | > } | |
620 | > |
|
622 | > | |
621 | > commands.norepo += ' nohelp' |
|
623 | > commands.norepo += ' nohelp' | |
622 | > EOF |
|
624 | > EOF | |
623 | $ echo '[extensions]' >> $HGRCPATH |
|
625 | $ echo '[extensions]' >> $HGRCPATH | |
624 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
|
626 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH | |
625 |
|
627 | |||
626 | Test command with no help text |
|
628 | Test command with no help text | |
627 |
|
629 | |||
628 | $ hg help nohelp |
|
630 | $ hg help nohelp | |
629 | hg nohelp |
|
631 | hg nohelp | |
630 |
|
632 | |||
631 | (no help text available) |
|
633 | (no help text available) | |
632 |
|
634 | |||
633 | use "hg -v help nohelp" to show global options |
|
635 | use "hg -v help nohelp" to show global options | |
634 |
|
636 | |||
635 | Test that default list of commands omits extension commands |
|
637 | Test that default list of commands omits extension commands | |
636 |
|
638 | |||
637 | $ hg help |
|
639 | $ hg help | |
638 | Mercurial Distributed SCM |
|
640 | Mercurial Distributed SCM | |
639 |
|
641 | |||
640 | list of commands: |
|
642 | list of commands: | |
641 |
|
643 | |||
642 | add add the specified files on the next commit |
|
644 | add add the specified files on the next commit | |
643 | addremove add all new files, delete all missing files |
|
645 | addremove add all new files, delete all missing files | |
644 | annotate show changeset information by line for each file |
|
646 | annotate show changeset information by line for each file | |
645 | archive create an unversioned archive of a repository revision |
|
647 | archive create an unversioned archive of a repository revision | |
646 | backout reverse effect of earlier changeset |
|
648 | backout reverse effect of earlier changeset | |
647 | bisect subdivision search of changesets |
|
649 | bisect subdivision search of changesets | |
648 | branch set or show the current branch name |
|
650 | branch set or show the current branch name | |
649 | branches list repository named branches |
|
651 | branches list repository named branches | |
650 | bundle create a changegroup file |
|
652 | bundle create a changegroup file | |
651 | cat output the current or given revision of files |
|
653 | cat output the current or given revision of files | |
652 | clone make a copy of an existing repository |
|
654 | clone make a copy of an existing repository | |
653 | commit commit the specified files or all outstanding changes |
|
655 | commit commit the specified files or all outstanding changes | |
654 | copy mark files as copied for the next commit |
|
656 | copy mark files as copied for the next commit | |
655 | diff diff repository (or selected files) |
|
657 | diff diff repository (or selected files) | |
656 | export dump the header and diffs for one or more changesets |
|
658 | export dump the header and diffs for one or more changesets | |
657 | forget forget the specified files on the next commit |
|
659 | forget forget the specified files on the next commit | |
658 | grep search for a pattern in specified files and revisions |
|
660 | grep search for a pattern in specified files and revisions | |
659 | heads show current repository heads or show branch heads |
|
661 | heads show current repository heads or show branch heads | |
660 | help show help for a given topic or a help overview |
|
662 | help show help for a given topic or a help overview | |
661 | identify identify the working copy or specified revision |
|
663 | identify identify the working copy or specified revision | |
662 | import import an ordered set of patches |
|
664 | import import an ordered set of patches | |
663 | incoming show new changesets found in source |
|
665 | incoming show new changesets found in source | |
664 | init create a new repository in the given directory |
|
666 | init create a new repository in the given directory | |
665 | locate locate files matching specific patterns |
|
667 | locate locate files matching specific patterns | |
666 | log show revision history of entire repository or files |
|
668 | log show revision history of entire repository or files | |
667 | manifest output the current or given revision of the project manifest |
|
669 | manifest output the current or given revision of the project manifest | |
668 | merge merge working directory with another revision |
|
670 | merge merge working directory with another revision | |
669 | outgoing show changesets not found in the destination |
|
671 | outgoing show changesets not found in the destination | |
670 | parents show the parents of the working directory or revision |
|
672 | parents show the parents of the working directory or revision | |
671 | paths show aliases for remote repositories |
|
673 | paths show aliases for remote repositories | |
672 | pull pull changes from the specified source |
|
674 | pull pull changes from the specified source | |
673 | push push changes to the specified destination |
|
675 | push push changes to the specified destination | |
674 | recover roll back an interrupted transaction |
|
676 | recover roll back an interrupted transaction | |
675 | remove remove the specified files on the next commit |
|
677 | remove remove the specified files on the next commit | |
676 | rename rename files; equivalent of copy + remove |
|
678 | rename rename files; equivalent of copy + remove | |
677 | resolve redo merges or set/view the merge status of files |
|
679 | resolve redo merges or set/view the merge status of files | |
678 | revert restore individual files or directories to an earlier state |
|
680 | revert restore individual files or directories to an earlier state | |
679 | rollback roll back the last transaction (dangerous) |
|
681 | rollback roll back the last transaction (dangerous) | |
680 | root print the root (top) of the current working directory |
|
682 | root print the root (top) of the current working directory | |
681 | serve start stand-alone webserver |
|
683 | serve start stand-alone webserver | |
682 | showconfig show combined config settings from all hgrc files |
|
684 | showconfig show combined config settings from all hgrc files | |
683 | status show changed files in the working directory |
|
685 | status show changed files in the working directory | |
684 | summary summarize working directory state |
|
686 | summary summarize working directory state | |
685 | tag add one or more tags for the current or given revision |
|
687 | tag add one or more tags for the current or given revision | |
686 | tags list repository tags |
|
688 | tags list repository tags | |
687 | tip show the tip revision |
|
689 | tip show the tip revision | |
688 | unbundle apply one or more changegroup files |
|
690 | unbundle apply one or more changegroup files | |
689 | update update working directory (or switch revisions) |
|
691 | update update working directory (or switch revisions) | |
690 | verify verify the integrity of the repository |
|
692 | verify verify the integrity of the repository | |
691 | version output version and copyright information |
|
693 | version output version and copyright information | |
692 |
|
694 | |||
693 | enabled extensions: |
|
695 | enabled extensions: | |
694 |
|
696 | |||
695 | helpext (no help text available) |
|
697 | helpext (no help text available) | |
696 |
|
698 | |||
697 | additional help topics: |
|
699 | additional help topics: | |
698 |
|
700 | |||
699 | config Configuration Files |
|
701 | config Configuration Files | |
700 | dates Date Formats |
|
702 | dates Date Formats | |
701 | patterns File Name Patterns |
|
703 | patterns File Name Patterns | |
702 | environment Environment Variables |
|
704 | environment Environment Variables | |
703 | revisions Specifying Single Revisions |
|
705 | revisions Specifying Single Revisions | |
704 | multirevs Specifying Multiple Revisions |
|
706 | multirevs Specifying Multiple Revisions | |
705 | revsets Specifying Revision Sets |
|
707 | revsets Specifying Revision Sets | |
706 | diffs Diff Formats |
|
708 | diffs Diff Formats | |
707 | merge-tools Merge Tools |
|
709 | merge-tools Merge Tools | |
708 | templating Template Usage |
|
710 | templating Template Usage | |
709 | urls URL Paths |
|
711 | urls URL Paths | |
710 | extensions Using additional features |
|
712 | extensions Using additional features | |
|
713 | subrepos Subrepositories | |||
711 | hgweb Configuring hgweb |
|
714 | hgweb Configuring hgweb | |
712 | glossary Glossary |
|
715 | glossary Glossary | |
713 |
|
716 | |||
714 | use "hg -v help" to show aliases and global options |
|
717 | use "hg -v help" to show aliases and global options | |
715 |
|
718 | |||
716 | Test list of commands with command with no help text |
|
719 | Test list of commands with command with no help text | |
717 |
|
720 | |||
718 | $ hg help helpext |
|
721 | $ hg help helpext | |
719 | helpext extension - no help text available |
|
722 | helpext extension - no help text available | |
720 |
|
723 | |||
721 | list of commands: |
|
724 | list of commands: | |
722 |
|
725 | |||
723 | nohelp (no help text available) |
|
726 | nohelp (no help text available) | |
724 |
|
727 | |||
725 | use "hg -v help helpext" to show aliases and global options |
|
728 | use "hg -v help helpext" to show aliases and global options | |
726 |
|
729 | |||
727 | Test a help topic |
|
730 | Test a help topic | |
728 |
|
731 | |||
729 | $ hg help revs |
|
732 | $ hg help revs | |
730 | Specifying Single Revisions |
|
733 | Specifying Single Revisions | |
731 |
|
734 | |||
732 | Mercurial supports several ways to specify individual revisions. |
|
735 | Mercurial supports several ways to specify individual revisions. | |
733 |
|
736 | |||
734 | A plain integer is treated as a revision number. Negative integers are |
|
737 | A plain integer is treated as a revision number. Negative integers are | |
735 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 |
|
738 | treated as sequential offsets from the tip, with -1 denoting the tip, -2 | |
736 | denoting the revision prior to the tip, and so forth. |
|
739 | denoting the revision prior to the tip, and so forth. | |
737 |
|
740 | |||
738 | A 40-digit hexadecimal string is treated as a unique revision identifier. |
|
741 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
739 |
|
742 | |||
740 | A hexadecimal string less than 40 characters long is treated as a unique |
|
743 | A hexadecimal string less than 40 characters long is treated as a unique | |
741 | revision identifier and is referred to as a short-form identifier. A |
|
744 | revision identifier and is referred to as a short-form identifier. A | |
742 | short-form identifier is only valid if it is the prefix of exactly one |
|
745 | short-form identifier is only valid if it is the prefix of exactly one | |
743 | full-length identifier. |
|
746 | full-length identifier. | |
744 |
|
747 | |||
745 | Any other string is treated as a tag or branch name. A tag name is a |
|
748 | Any other string is treated as a tag or branch name. A tag name is a | |
746 | symbolic name associated with a revision identifier. A branch name denotes |
|
749 | symbolic name associated with a revision identifier. A branch name denotes | |
747 | the tipmost revision of that branch. Tag and branch names must not contain |
|
750 | the tipmost revision of that branch. Tag and branch names must not contain | |
748 | the ":" character. |
|
751 | the ":" character. | |
749 |
|
752 | |||
750 | The reserved name "tip" is a special tag that always identifies the most |
|
753 | The reserved name "tip" is a special tag that always identifies the most | |
751 | recent revision. |
|
754 | recent revision. | |
752 |
|
755 | |||
753 | The reserved name "null" indicates the null revision. This is the revision |
|
756 | The reserved name "null" indicates the null revision. This is the revision | |
754 | of an empty repository, and the parent of revision 0. |
|
757 | of an empty repository, and the parent of revision 0. | |
755 |
|
758 | |||
756 | The reserved name "." indicates the working directory parent. If no |
|
759 | The reserved name "." indicates the working directory parent. If no | |
757 | working directory is checked out, it is equivalent to null. If an |
|
760 | working directory is checked out, it is equivalent to null. If an | |
758 | uncommitted merge is in progress, "." is the revision of the first parent. |
|
761 | uncommitted merge is in progress, "." is the revision of the first parent. | |
759 |
|
762 | |||
760 | Test help hooks |
|
763 | Test help hooks | |
761 |
|
764 | |||
762 | $ cat > helphook1.py <<EOF |
|
765 | $ cat > helphook1.py <<EOF | |
763 | > from mercurial import help |
|
766 | > from mercurial import help | |
764 | > |
|
767 | > | |
765 | > def rewrite(topic, doc): |
|
768 | > def rewrite(topic, doc): | |
766 | > return doc + '\nhelphook1\n' |
|
769 | > return doc + '\nhelphook1\n' | |
767 | > |
|
770 | > | |
768 | > def extsetup(ui): |
|
771 | > def extsetup(ui): | |
769 | > help.addtopichook('revsets', rewrite) |
|
772 | > help.addtopichook('revsets', rewrite) | |
770 | > EOF |
|
773 | > EOF | |
771 | $ cat > helphook2.py <<EOF |
|
774 | $ cat > helphook2.py <<EOF | |
772 | > from mercurial import help |
|
775 | > from mercurial import help | |
773 | > |
|
776 | > | |
774 | > def rewrite(topic, doc): |
|
777 | > def rewrite(topic, doc): | |
775 | > return doc + '\nhelphook2\n' |
|
778 | > return doc + '\nhelphook2\n' | |
776 | > |
|
779 | > | |
777 | > def extsetup(ui): |
|
780 | > def extsetup(ui): | |
778 | > help.addtopichook('revsets', rewrite) |
|
781 | > help.addtopichook('revsets', rewrite) | |
779 | > EOF |
|
782 | > EOF | |
780 | $ echo '[extensions]' >> $HGRCPATH |
|
783 | $ echo '[extensions]' >> $HGRCPATH | |
781 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH |
|
784 | $ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH | |
782 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH |
|
785 | $ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH | |
783 | $ hg help revsets | grep helphook |
|
786 | $ hg help revsets | grep helphook | |
784 | helphook1 |
|
787 | helphook1 | |
785 | helphook2 |
|
788 | helphook2 |
General Comments 0
You need to be logged in to leave comments.
Login now