Show More
@@ -1,242 +1,245 | |||||
1 | from __future__ import absolute_import |
|
1 | from __future__ import absolute_import | |
2 |
|
2 | |||
3 | from .i18n import _ |
|
3 | from .i18n import _ | |
4 | from . import ( |
|
4 | from . import ( | |
5 | pycompat, |
|
5 | pycompat, | |
6 | registrar, |
|
6 | registrar, | |
7 | templatekw, |
|
7 | templatekw, | |
8 | util, |
|
8 | util, | |
9 | ) |
|
9 | ) | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | def tolist(val): |
|
12 | def tolist(val): | |
13 | """ |
|
13 | """ | |
14 | a convenience method to return an empty list instead of None |
|
14 | a convenience method to return an empty list instead of None | |
15 | """ |
|
15 | """ | |
16 | if val is None: |
|
16 | if val is None: | |
17 | return [] |
|
17 | return [] | |
18 | else: |
|
18 | else: | |
19 | return [val] |
|
19 | return [val] | |
20 |
|
20 | |||
21 |
|
21 | |||
22 | class namespaces(object): |
|
22 | class namespaces(object): | |
23 | """provides an interface to register and operate on multiple namespaces. See |
|
23 | """provides an interface to register and operate on multiple namespaces. See | |
24 | the namespace class below for details on the namespace object. |
|
24 | the namespace class below for details on the namespace object. | |
25 |
|
25 | |||
26 | """ |
|
26 | """ | |
27 |
|
27 | |||
28 | _names_version = 0 |
|
28 | _names_version = 0 | |
29 |
|
29 | |||
30 | def __init__(self): |
|
30 | def __init__(self): | |
31 | self._names = util.sortdict() |
|
31 | self._names = util.sortdict() | |
32 | columns = templatekw.getlogcolumns() |
|
32 | columns = templatekw.getlogcolumns() | |
33 |
|
33 | |||
34 | # we need current mercurial named objects (bookmarks, tags, and |
|
34 | # we need current mercurial named objects (bookmarks, tags, and | |
35 | # branches) to be initialized somewhere, so that place is here |
|
35 | # branches) to be initialized somewhere, so that place is here | |
36 | bmknames = lambda repo: repo._bookmarks.keys() |
|
36 | bmknames = lambda repo: repo._bookmarks.keys() | |
37 | bmknamemap = lambda repo, name: tolist(repo._bookmarks.get(name)) |
|
37 | bmknamemap = lambda repo, name: tolist(repo._bookmarks.get(name)) | |
38 | bmknodemap = lambda repo, node: repo.nodebookmarks(node) |
|
38 | bmknodemap = lambda repo, node: repo.nodebookmarks(node) | |
39 | n = namespace( |
|
39 | n = namespace( | |
40 | b"bookmarks", |
|
40 | b"bookmarks", | |
41 | templatename=b"bookmark", |
|
41 | templatename=b"bookmark", | |
42 | logfmt=columns[b'bookmark'], |
|
42 | logfmt=columns[b'bookmark'], | |
43 | listnames=bmknames, |
|
43 | listnames=bmknames, | |
44 | namemap=bmknamemap, |
|
44 | namemap=bmknamemap, | |
45 | nodemap=bmknodemap, |
|
45 | nodemap=bmknodemap, | |
46 | builtin=True, |
|
46 | builtin=True, | |
47 | ) |
|
47 | ) | |
48 | self.addnamespace(n) |
|
48 | self.addnamespace(n) | |
49 |
|
49 | |||
50 | tagnames = lambda repo: [t for t, n in repo.tagslist()] |
|
50 | tagnames = lambda repo: [t for t, n in repo.tagslist()] | |
51 | tagnamemap = lambda repo, name: tolist(repo._tagscache.tags.get(name)) |
|
51 | tagnamemap = lambda repo, name: tolist(repo._tagscache.tags.get(name)) | |
52 | tagnodemap = lambda repo, node: repo.nodetags(node) |
|
52 | tagnodemap = lambda repo, node: repo.nodetags(node) | |
53 | n = namespace( |
|
53 | n = namespace( | |
54 | b"tags", |
|
54 | b"tags", | |
55 | templatename=b"tag", |
|
55 | templatename=b"tag", | |
56 | logfmt=columns[b'tag'], |
|
56 | logfmt=columns[b'tag'], | |
57 | listnames=tagnames, |
|
57 | listnames=tagnames, | |
58 | namemap=tagnamemap, |
|
58 | namemap=tagnamemap, | |
59 | nodemap=tagnodemap, |
|
59 | nodemap=tagnodemap, | |
60 | deprecated={b'tip'}, |
|
60 | deprecated={b'tip'}, | |
61 | builtin=True, |
|
61 | builtin=True, | |
62 | ) |
|
62 | ) | |
63 | self.addnamespace(n) |
|
63 | self.addnamespace(n) | |
64 |
|
64 | |||
65 | bnames = lambda repo: repo.branchmap().keys() |
|
65 | bnames = lambda repo: repo.branchmap().keys() | |
66 | bnamemap = lambda repo, name: tolist(repo.branchtip(name, True)) |
|
66 | bnamemap = lambda repo, name: tolist(repo.branchtip(name, True)) | |
67 | bnodemap = lambda repo, node: [repo[node].branch()] |
|
67 | bnodemap = lambda repo, node: [repo[node].branch()] | |
68 | n = namespace( |
|
68 | n = namespace( | |
69 | b"branches", |
|
69 | b"branches", | |
70 | templatename=b"branch", |
|
70 | templatename=b"branch", | |
71 | logfmt=columns[b'branch'], |
|
71 | logfmt=columns[b'branch'], | |
72 | listnames=bnames, |
|
72 | listnames=bnames, | |
73 | namemap=bnamemap, |
|
73 | namemap=bnamemap, | |
74 | nodemap=bnodemap, |
|
74 | nodemap=bnodemap, | |
75 | builtin=True, |
|
75 | builtin=True, | |
76 | ) |
|
76 | ) | |
77 | self.addnamespace(n) |
|
77 | self.addnamespace(n) | |
78 |
|
78 | |||
79 | def __getitem__(self, namespace): |
|
79 | def __getitem__(self, namespace): | |
80 | """returns the namespace object""" |
|
80 | """returns the namespace object""" | |
81 | return self._names[namespace] |
|
81 | return self._names[namespace] | |
82 |
|
82 | |||
83 | def __iter__(self): |
|
83 | def __iter__(self): | |
84 | return self._names.__iter__() |
|
84 | return self._names.__iter__() | |
85 |
|
85 | |||
|
86 | def get(self, namespace, default=None): | |||
|
87 | return self._names.get(namespace, default) | |||
|
88 | ||||
86 | def items(self): |
|
89 | def items(self): | |
87 | return pycompat.iteritems(self._names) |
|
90 | return pycompat.iteritems(self._names) | |
88 |
|
91 | |||
89 | iteritems = items |
|
92 | iteritems = items | |
90 |
|
93 | |||
91 | def addnamespace(self, namespace, order=None): |
|
94 | def addnamespace(self, namespace, order=None): | |
92 | """register a namespace |
|
95 | """register a namespace | |
93 |
|
96 | |||
94 | namespace: the name to be registered (in plural form) |
|
97 | namespace: the name to be registered (in plural form) | |
95 | order: optional argument to specify the order of namespaces |
|
98 | order: optional argument to specify the order of namespaces | |
96 | (e.g. 'branches' should be listed before 'bookmarks') |
|
99 | (e.g. 'branches' should be listed before 'bookmarks') | |
97 |
|
100 | |||
98 | """ |
|
101 | """ | |
99 | if order is not None: |
|
102 | if order is not None: | |
100 | self._names.insert(order, namespace.name, namespace) |
|
103 | self._names.insert(order, namespace.name, namespace) | |
101 | else: |
|
104 | else: | |
102 | self._names[namespace.name] = namespace |
|
105 | self._names[namespace.name] = namespace | |
103 |
|
106 | |||
104 | # we only generate a template keyword if one does not already exist |
|
107 | # we only generate a template keyword if one does not already exist | |
105 | if namespace.name not in templatekw.keywords: |
|
108 | if namespace.name not in templatekw.keywords: | |
106 | templatekeyword = registrar.templatekeyword(templatekw.keywords) |
|
109 | templatekeyword = registrar.templatekeyword(templatekw.keywords) | |
107 |
|
110 | |||
108 | @templatekeyword(namespace.name, requires={b'repo', b'ctx'}) |
|
111 | @templatekeyword(namespace.name, requires={b'repo', b'ctx'}) | |
109 | def generatekw(context, mapping): |
|
112 | def generatekw(context, mapping): | |
110 | return templatekw.shownames(context, mapping, namespace.name) |
|
113 | return templatekw.shownames(context, mapping, namespace.name) | |
111 |
|
114 | |||
112 | def singlenode(self, repo, name): |
|
115 | def singlenode(self, repo, name): | |
113 | """ |
|
116 | """ | |
114 | Return the 'best' node for the given name. What's best is defined |
|
117 | Return the 'best' node for the given name. What's best is defined | |
115 | by the namespace's singlenode() function. The first match returned by |
|
118 | by the namespace's singlenode() function. The first match returned by | |
116 | a namespace in the defined precedence order is used. |
|
119 | a namespace in the defined precedence order is used. | |
117 |
|
120 | |||
118 | Raises a KeyError if there is no such node. |
|
121 | Raises a KeyError if there is no such node. | |
119 | """ |
|
122 | """ | |
120 | for ns, v in pycompat.iteritems(self._names): |
|
123 | for ns, v in pycompat.iteritems(self._names): | |
121 | n = v.singlenode(repo, name) |
|
124 | n = v.singlenode(repo, name) | |
122 | if n: |
|
125 | if n: | |
123 | return n |
|
126 | return n | |
124 | raise KeyError(_(b'no such name: %s') % name) |
|
127 | raise KeyError(_(b'no such name: %s') % name) | |
125 |
|
128 | |||
126 |
|
129 | |||
127 | class namespace(object): |
|
130 | class namespace(object): | |
128 | """provides an interface to a namespace |
|
131 | """provides an interface to a namespace | |
129 |
|
132 | |||
130 | Namespaces are basically generic many-to-many mapping between some |
|
133 | Namespaces are basically generic many-to-many mapping between some | |
131 | (namespaced) names and nodes. The goal here is to control the pollution of |
|
134 | (namespaced) names and nodes. The goal here is to control the pollution of | |
132 | jamming things into tags or bookmarks (in extension-land) and to simplify |
|
135 | jamming things into tags or bookmarks (in extension-land) and to simplify | |
133 | internal bits of mercurial: log output, tab completion, etc. |
|
136 | internal bits of mercurial: log output, tab completion, etc. | |
134 |
|
137 | |||
135 | More precisely, we define a mapping of names to nodes, and a mapping from |
|
138 | More precisely, we define a mapping of names to nodes, and a mapping from | |
136 | nodes to names. Each mapping returns a list. |
|
139 | nodes to names. Each mapping returns a list. | |
137 |
|
140 | |||
138 | Furthermore, each name mapping will be passed a name to lookup which might |
|
141 | Furthermore, each name mapping will be passed a name to lookup which might | |
139 | not be in its domain. In this case, each method should return an empty list |
|
142 | not be in its domain. In this case, each method should return an empty list | |
140 | and not raise an error. |
|
143 | and not raise an error. | |
141 |
|
144 | |||
142 | This namespace object will define the properties we need: |
|
145 | This namespace object will define the properties we need: | |
143 | 'name': the namespace (plural form) |
|
146 | 'name': the namespace (plural form) | |
144 | 'templatename': name to use for templating (usually the singular form |
|
147 | 'templatename': name to use for templating (usually the singular form | |
145 | of the plural namespace name) |
|
148 | of the plural namespace name) | |
146 | 'listnames': list of all names in the namespace (usually the keys of a |
|
149 | 'listnames': list of all names in the namespace (usually the keys of a | |
147 | dictionary) |
|
150 | dictionary) | |
148 | 'namemap': function that takes a name and returns a list of nodes |
|
151 | 'namemap': function that takes a name and returns a list of nodes | |
149 | 'nodemap': function that takes a node and returns a list of names |
|
152 | 'nodemap': function that takes a node and returns a list of names | |
150 | 'deprecated': set of names to be masked for ordinary use |
|
153 | 'deprecated': set of names to be masked for ordinary use | |
151 | 'builtin': bool indicating if this namespace is supported by core |
|
154 | 'builtin': bool indicating if this namespace is supported by core | |
152 | Mercurial. |
|
155 | Mercurial. | |
153 | """ |
|
156 | """ | |
154 |
|
157 | |||
155 | def __init__( |
|
158 | def __init__( | |
156 | self, |
|
159 | self, | |
157 | name, |
|
160 | name, | |
158 | templatename=None, |
|
161 | templatename=None, | |
159 | logname=None, |
|
162 | logname=None, | |
160 | colorname=None, |
|
163 | colorname=None, | |
161 | logfmt=None, |
|
164 | logfmt=None, | |
162 | listnames=None, |
|
165 | listnames=None, | |
163 | namemap=None, |
|
166 | namemap=None, | |
164 | nodemap=None, |
|
167 | nodemap=None, | |
165 | deprecated=None, |
|
168 | deprecated=None, | |
166 | builtin=False, |
|
169 | builtin=False, | |
167 | singlenode=None, |
|
170 | singlenode=None, | |
168 | ): |
|
171 | ): | |
169 | """create a namespace |
|
172 | """create a namespace | |
170 |
|
173 | |||
171 | name: the namespace to be registered (in plural form) |
|
174 | name: the namespace to be registered (in plural form) | |
172 | templatename: the name to use for templating |
|
175 | templatename: the name to use for templating | |
173 | logname: the name to use for log output; if not specified templatename |
|
176 | logname: the name to use for log output; if not specified templatename | |
174 | is used |
|
177 | is used | |
175 | colorname: the name to use for colored log output; if not specified |
|
178 | colorname: the name to use for colored log output; if not specified | |
176 | logname is used |
|
179 | logname is used | |
177 | logfmt: the format to use for (i18n-ed) log output; if not specified |
|
180 | logfmt: the format to use for (i18n-ed) log output; if not specified | |
178 | it is composed from logname |
|
181 | it is composed from logname | |
179 | listnames: function to list all names |
|
182 | listnames: function to list all names | |
180 | namemap: function that inputs a name, output node(s) |
|
183 | namemap: function that inputs a name, output node(s) | |
181 | nodemap: function that inputs a node, output name(s) |
|
184 | nodemap: function that inputs a node, output name(s) | |
182 | deprecated: set of names to be masked for ordinary use |
|
185 | deprecated: set of names to be masked for ordinary use | |
183 | builtin: whether namespace is implemented by core Mercurial |
|
186 | builtin: whether namespace is implemented by core Mercurial | |
184 | singlenode: function that inputs a name, output best node (or None) |
|
187 | singlenode: function that inputs a name, output best node (or None) | |
185 | """ |
|
188 | """ | |
186 | self.name = name |
|
189 | self.name = name | |
187 | self.templatename = templatename |
|
190 | self.templatename = templatename | |
188 | self.logname = logname |
|
191 | self.logname = logname | |
189 | self.colorname = colorname |
|
192 | self.colorname = colorname | |
190 | self.logfmt = logfmt |
|
193 | self.logfmt = logfmt | |
191 | self.listnames = listnames |
|
194 | self.listnames = listnames | |
192 | self.namemap = namemap |
|
195 | self.namemap = namemap | |
193 | self.nodemap = nodemap |
|
196 | self.nodemap = nodemap | |
194 | if singlenode: |
|
197 | if singlenode: | |
195 | self.singlenode = singlenode |
|
198 | self.singlenode = singlenode | |
196 |
|
199 | |||
197 | # if logname is not specified, use the template name as backup |
|
200 | # if logname is not specified, use the template name as backup | |
198 | if self.logname is None: |
|
201 | if self.logname is None: | |
199 | self.logname = self.templatename |
|
202 | self.logname = self.templatename | |
200 |
|
203 | |||
201 | # if colorname is not specified, just use the logname as a backup |
|
204 | # if colorname is not specified, just use the logname as a backup | |
202 | if self.colorname is None: |
|
205 | if self.colorname is None: | |
203 | self.colorname = self.logname |
|
206 | self.colorname = self.logname | |
204 |
|
207 | |||
205 | # if logfmt is not specified, compose it from logname as backup |
|
208 | # if logfmt is not specified, compose it from logname as backup | |
206 | if self.logfmt is None: |
|
209 | if self.logfmt is None: | |
207 | # i18n: column positioning for "hg log" |
|
210 | # i18n: column positioning for "hg log" | |
208 | self.logfmt = (b"%s:" % self.logname).ljust(13) + b"%s\n" |
|
211 | self.logfmt = (b"%s:" % self.logname).ljust(13) + b"%s\n" | |
209 |
|
212 | |||
210 | if deprecated is None: |
|
213 | if deprecated is None: | |
211 | self.deprecated = set() |
|
214 | self.deprecated = set() | |
212 | else: |
|
215 | else: | |
213 | self.deprecated = deprecated |
|
216 | self.deprecated = deprecated | |
214 |
|
217 | |||
215 | self.builtin = builtin |
|
218 | self.builtin = builtin | |
216 |
|
219 | |||
217 | def names(self, repo, node): |
|
220 | def names(self, repo, node): | |
218 | """method that returns a (sorted) list of names in a namespace that |
|
221 | """method that returns a (sorted) list of names in a namespace that | |
219 | match a given node""" |
|
222 | match a given node""" | |
220 | return sorted(self.nodemap(repo, node)) |
|
223 | return sorted(self.nodemap(repo, node)) | |
221 |
|
224 | |||
222 | def nodes(self, repo, name): |
|
225 | def nodes(self, repo, name): | |
223 | """method that returns a list of nodes in a namespace that |
|
226 | """method that returns a list of nodes in a namespace that | |
224 | match a given name. |
|
227 | match a given name. | |
225 |
|
228 | |||
226 | """ |
|
229 | """ | |
227 | return sorted(self.namemap(repo, name)) |
|
230 | return sorted(self.namemap(repo, name)) | |
228 |
|
231 | |||
229 | def singlenode(self, repo, name): |
|
232 | def singlenode(self, repo, name): | |
230 | """returns the best node for the given name |
|
233 | """returns the best node for the given name | |
231 |
|
234 | |||
232 | By default, the best node is the node from nodes() with the highest |
|
235 | By default, the best node is the node from nodes() with the highest | |
233 | revision number. It can be overriden by the namespace.""" |
|
236 | revision number. It can be overriden by the namespace.""" | |
234 | n = self.namemap(repo, name) |
|
237 | n = self.namemap(repo, name) | |
235 | if n: |
|
238 | if n: | |
236 | # return max revision number |
|
239 | # return max revision number | |
237 | if len(n) > 1: |
|
240 | if len(n) > 1: | |
238 | cl = repo.changelog |
|
241 | cl = repo.changelog | |
239 | maxrev = max(cl.rev(node) for node in n) |
|
242 | maxrev = max(cl.rev(node) for node in n) | |
240 | return cl.node(maxrev) |
|
243 | return cl.node(maxrev) | |
241 | return n[0] |
|
244 | return n[0] | |
242 | return None |
|
245 | return None |
@@ -1,988 +1,992 | |||||
1 | # templatekw.py - common changeset template keywords |
|
1 | # templatekw.py - common changeset template keywords | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2009 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 __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | from .i18n import _ |
|
10 | from .i18n import _ | |
11 | from .node import ( |
|
11 | from .node import ( | |
12 | hex, |
|
12 | hex, | |
13 | nullid, |
|
13 | nullid, | |
14 | wdirid, |
|
14 | wdirid, | |
15 | wdirrev, |
|
15 | wdirrev, | |
16 | ) |
|
16 | ) | |
17 |
|
17 | |||
18 | from . import ( |
|
18 | from . import ( | |
19 | diffutil, |
|
19 | diffutil, | |
20 | encoding, |
|
20 | encoding, | |
21 | error, |
|
21 | error, | |
22 | hbisect, |
|
22 | hbisect, | |
23 | i18n, |
|
23 | i18n, | |
24 | obsutil, |
|
24 | obsutil, | |
25 | patch, |
|
25 | patch, | |
26 | pycompat, |
|
26 | pycompat, | |
27 | registrar, |
|
27 | registrar, | |
28 | scmutil, |
|
28 | scmutil, | |
29 | templateutil, |
|
29 | templateutil, | |
30 | util, |
|
30 | util, | |
31 | ) |
|
31 | ) | |
32 | from .utils import stringutil |
|
32 | from .utils import stringutil | |
33 |
|
33 | |||
34 | _hybrid = templateutil.hybrid |
|
34 | _hybrid = templateutil.hybrid | |
35 | hybriddict = templateutil.hybriddict |
|
35 | hybriddict = templateutil.hybriddict | |
36 | hybridlist = templateutil.hybridlist |
|
36 | hybridlist = templateutil.hybridlist | |
37 | compatdict = templateutil.compatdict |
|
37 | compatdict = templateutil.compatdict | |
38 | compatlist = templateutil.compatlist |
|
38 | compatlist = templateutil.compatlist | |
39 | _showcompatlist = templateutil._showcompatlist |
|
39 | _showcompatlist = templateutil._showcompatlist | |
40 |
|
40 | |||
41 |
|
41 | |||
42 | def getlatesttags(context, mapping, pattern=None): |
|
42 | def getlatesttags(context, mapping, pattern=None): | |
43 | '''return date, distance and name for the latest tag of rev''' |
|
43 | '''return date, distance and name for the latest tag of rev''' | |
44 | repo = context.resource(mapping, b'repo') |
|
44 | repo = context.resource(mapping, b'repo') | |
45 | ctx = context.resource(mapping, b'ctx') |
|
45 | ctx = context.resource(mapping, b'ctx') | |
46 | cache = context.resource(mapping, b'cache') |
|
46 | cache = context.resource(mapping, b'cache') | |
47 |
|
47 | |||
48 | cachename = b'latesttags' |
|
48 | cachename = b'latesttags' | |
49 | if pattern is not None: |
|
49 | if pattern is not None: | |
50 | cachename += b'-' + pattern |
|
50 | cachename += b'-' + pattern | |
51 | match = stringutil.stringmatcher(pattern)[2] |
|
51 | match = stringutil.stringmatcher(pattern)[2] | |
52 | else: |
|
52 | else: | |
53 | match = util.always |
|
53 | match = util.always | |
54 |
|
54 | |||
55 | if cachename not in cache: |
|
55 | if cachename not in cache: | |
56 | # Cache mapping from rev to a tuple with tag date, tag |
|
56 | # Cache mapping from rev to a tuple with tag date, tag | |
57 | # distance and tag name |
|
57 | # distance and tag name | |
58 | cache[cachename] = {-1: (0, 0, [b'null'])} |
|
58 | cache[cachename] = {-1: (0, 0, [b'null'])} | |
59 | latesttags = cache[cachename] |
|
59 | latesttags = cache[cachename] | |
60 |
|
60 | |||
61 | rev = ctx.rev() |
|
61 | rev = ctx.rev() | |
62 | todo = [rev] |
|
62 | todo = [rev] | |
63 | while todo: |
|
63 | while todo: | |
64 | rev = todo.pop() |
|
64 | rev = todo.pop() | |
65 | if rev in latesttags: |
|
65 | if rev in latesttags: | |
66 | continue |
|
66 | continue | |
67 | ctx = repo[rev] |
|
67 | ctx = repo[rev] | |
68 | tags = [ |
|
68 | tags = [ | |
69 | t |
|
69 | t | |
70 | for t in ctx.tags() |
|
70 | for t in ctx.tags() | |
71 | if (repo.tagtype(t) and repo.tagtype(t) != b'local' and match(t)) |
|
71 | if (repo.tagtype(t) and repo.tagtype(t) != b'local' and match(t)) | |
72 | ] |
|
72 | ] | |
73 | if tags: |
|
73 | if tags: | |
74 | latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)] |
|
74 | latesttags[rev] = ctx.date()[0], 0, [t for t in sorted(tags)] | |
75 | continue |
|
75 | continue | |
76 | try: |
|
76 | try: | |
77 | ptags = [latesttags[p.rev()] for p in ctx.parents()] |
|
77 | ptags = [latesttags[p.rev()] for p in ctx.parents()] | |
78 | if len(ptags) > 1: |
|
78 | if len(ptags) > 1: | |
79 | if ptags[0][2] == ptags[1][2]: |
|
79 | if ptags[0][2] == ptags[1][2]: | |
80 | # The tuples are laid out so the right one can be found by |
|
80 | # The tuples are laid out so the right one can be found by | |
81 | # comparison in this case. |
|
81 | # comparison in this case. | |
82 | pdate, pdist, ptag = max(ptags) |
|
82 | pdate, pdist, ptag = max(ptags) | |
83 | else: |
|
83 | else: | |
84 |
|
84 | |||
85 | def key(x): |
|
85 | def key(x): | |
86 | tag = x[2][0] |
|
86 | tag = x[2][0] | |
87 | if ctx.rev() is None: |
|
87 | if ctx.rev() is None: | |
88 | # only() doesn't support wdir |
|
88 | # only() doesn't support wdir | |
89 | prevs = [c.rev() for c in ctx.parents()] |
|
89 | prevs = [c.rev() for c in ctx.parents()] | |
90 | changes = repo.revs(b'only(%ld, %s)', prevs, tag) |
|
90 | changes = repo.revs(b'only(%ld, %s)', prevs, tag) | |
91 | changessincetag = len(changes) + 1 |
|
91 | changessincetag = len(changes) + 1 | |
92 | else: |
|
92 | else: | |
93 | changes = repo.revs(b'only(%d, %s)', ctx.rev(), tag) |
|
93 | changes = repo.revs(b'only(%d, %s)', ctx.rev(), tag) | |
94 | changessincetag = len(changes) |
|
94 | changessincetag = len(changes) | |
95 | # Smallest number of changes since tag wins. Date is |
|
95 | # Smallest number of changes since tag wins. Date is | |
96 | # used as tiebreaker. |
|
96 | # used as tiebreaker. | |
97 | return [-changessincetag, x[0]] |
|
97 | return [-changessincetag, x[0]] | |
98 |
|
98 | |||
99 | pdate, pdist, ptag = max(ptags, key=key) |
|
99 | pdate, pdist, ptag = max(ptags, key=key) | |
100 | else: |
|
100 | else: | |
101 | pdate, pdist, ptag = ptags[0] |
|
101 | pdate, pdist, ptag = ptags[0] | |
102 | except KeyError: |
|
102 | except KeyError: | |
103 | # Cache miss - recurse |
|
103 | # Cache miss - recurse | |
104 | todo.append(rev) |
|
104 | todo.append(rev) | |
105 | todo.extend(p.rev() for p in ctx.parents()) |
|
105 | todo.extend(p.rev() for p in ctx.parents()) | |
106 | continue |
|
106 | continue | |
107 | latesttags[rev] = pdate, pdist + 1, ptag |
|
107 | latesttags[rev] = pdate, pdist + 1, ptag | |
108 | return latesttags[rev] |
|
108 | return latesttags[rev] | |
109 |
|
109 | |||
110 |
|
110 | |||
111 | def getlogcolumns(): |
|
111 | def getlogcolumns(): | |
112 | """Return a dict of log column labels""" |
|
112 | """Return a dict of log column labels""" | |
113 | _ = pycompat.identity # temporarily disable gettext |
|
113 | _ = pycompat.identity # temporarily disable gettext | |
114 | # i18n: column positioning for "hg log" |
|
114 | # i18n: column positioning for "hg log" | |
115 | columns = _( |
|
115 | columns = _( | |
116 | b'bookmark: %s\n' |
|
116 | b'bookmark: %s\n' | |
117 | b'branch: %s\n' |
|
117 | b'branch: %s\n' | |
118 | b'changeset: %s\n' |
|
118 | b'changeset: %s\n' | |
119 | b'copies: %s\n' |
|
119 | b'copies: %s\n' | |
120 | b'date: %s\n' |
|
120 | b'date: %s\n' | |
121 | b'extra: %s=%s\n' |
|
121 | b'extra: %s=%s\n' | |
122 | b'files+: %s\n' |
|
122 | b'files+: %s\n' | |
123 | b'files-: %s\n' |
|
123 | b'files-: %s\n' | |
124 | b'files: %s\n' |
|
124 | b'files: %s\n' | |
125 | b'instability: %s\n' |
|
125 | b'instability: %s\n' | |
126 | b'manifest: %s\n' |
|
126 | b'manifest: %s\n' | |
127 | b'obsolete: %s\n' |
|
127 | b'obsolete: %s\n' | |
128 | b'parent: %s\n' |
|
128 | b'parent: %s\n' | |
129 | b'phase: %s\n' |
|
129 | b'phase: %s\n' | |
130 | b'summary: %s\n' |
|
130 | b'summary: %s\n' | |
131 | b'tag: %s\n' |
|
131 | b'tag: %s\n' | |
132 | b'user: %s\n' |
|
132 | b'user: %s\n' | |
133 | ) |
|
133 | ) | |
134 | return dict( |
|
134 | return dict( | |
135 | zip( |
|
135 | zip( | |
136 | [s.split(b':', 1)[0] for s in columns.splitlines()], |
|
136 | [s.split(b':', 1)[0] for s in columns.splitlines()], | |
137 | i18n._(columns).splitlines(True), |
|
137 | i18n._(columns).splitlines(True), | |
138 | ) |
|
138 | ) | |
139 | ) |
|
139 | ) | |
140 |
|
140 | |||
141 |
|
141 | |||
142 | # basic internal templates |
|
142 | # basic internal templates | |
143 | _changeidtmpl = b'{rev}:{node|formatnode}' |
|
143 | _changeidtmpl = b'{rev}:{node|formatnode}' | |
144 |
|
144 | |||
145 | # default templates internally used for rendering of lists |
|
145 | # default templates internally used for rendering of lists | |
146 | defaulttempl = { |
|
146 | defaulttempl = { | |
147 | b'parent': _changeidtmpl + b' ', |
|
147 | b'parent': _changeidtmpl + b' ', | |
148 | b'manifest': _changeidtmpl, |
|
148 | b'manifest': _changeidtmpl, | |
149 | b'file_copy': b'{name} ({source})', |
|
149 | b'file_copy': b'{name} ({source})', | |
150 | b'envvar': b'{key}={value}', |
|
150 | b'envvar': b'{key}={value}', | |
151 | b'extra': b'{key}={value|stringescape}', |
|
151 | b'extra': b'{key}={value|stringescape}', | |
152 | } |
|
152 | } | |
153 | # filecopy is preserved for compatibility reasons |
|
153 | # filecopy is preserved for compatibility reasons | |
154 | defaulttempl[b'filecopy'] = defaulttempl[b'file_copy'] |
|
154 | defaulttempl[b'filecopy'] = defaulttempl[b'file_copy'] | |
155 |
|
155 | |||
156 | # keywords are callables (see registrar.templatekeyword for details) |
|
156 | # keywords are callables (see registrar.templatekeyword for details) | |
157 | keywords = {} |
|
157 | keywords = {} | |
158 | templatekeyword = registrar.templatekeyword(keywords) |
|
158 | templatekeyword = registrar.templatekeyword(keywords) | |
159 |
|
159 | |||
160 |
|
160 | |||
161 | @templatekeyword(b'author', requires={b'ctx'}) |
|
161 | @templatekeyword(b'author', requires={b'ctx'}) | |
162 | def showauthor(context, mapping): |
|
162 | def showauthor(context, mapping): | |
163 | """Alias for ``{user}``""" |
|
163 | """Alias for ``{user}``""" | |
164 | return showuser(context, mapping) |
|
164 | return showuser(context, mapping) | |
165 |
|
165 | |||
166 |
|
166 | |||
167 | @templatekeyword(b'bisect', requires={b'repo', b'ctx'}) |
|
167 | @templatekeyword(b'bisect', requires={b'repo', b'ctx'}) | |
168 | def showbisect(context, mapping): |
|
168 | def showbisect(context, mapping): | |
169 | """String. The changeset bisection status.""" |
|
169 | """String. The changeset bisection status.""" | |
170 | repo = context.resource(mapping, b'repo') |
|
170 | repo = context.resource(mapping, b'repo') | |
171 | ctx = context.resource(mapping, b'ctx') |
|
171 | ctx = context.resource(mapping, b'ctx') | |
172 | return hbisect.label(repo, ctx.node()) |
|
172 | return hbisect.label(repo, ctx.node()) | |
173 |
|
173 | |||
174 |
|
174 | |||
175 | @templatekeyword(b'branch', requires={b'ctx'}) |
|
175 | @templatekeyword(b'branch', requires={b'ctx'}) | |
176 | def showbranch(context, mapping): |
|
176 | def showbranch(context, mapping): | |
177 | """String. The name of the branch on which the changeset was |
|
177 | """String. The name of the branch on which the changeset was | |
178 | committed. |
|
178 | committed. | |
179 | """ |
|
179 | """ | |
180 | ctx = context.resource(mapping, b'ctx') |
|
180 | ctx = context.resource(mapping, b'ctx') | |
181 | return ctx.branch() |
|
181 | return ctx.branch() | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | @templatekeyword(b'branches', requires={b'ctx'}) |
|
184 | @templatekeyword(b'branches', requires={b'ctx'}) | |
185 | def showbranches(context, mapping): |
|
185 | def showbranches(context, mapping): | |
186 | """List of strings. The name of the branch on which the |
|
186 | """List of strings. The name of the branch on which the | |
187 | changeset was committed. Will be empty if the branch name was |
|
187 | changeset was committed. Will be empty if the branch name was | |
188 | default. (DEPRECATED) |
|
188 | default. (DEPRECATED) | |
189 | """ |
|
189 | """ | |
190 | ctx = context.resource(mapping, b'ctx') |
|
190 | ctx = context.resource(mapping, b'ctx') | |
191 | branch = ctx.branch() |
|
191 | branch = ctx.branch() | |
192 | if branch != b'default': |
|
192 | if branch != b'default': | |
193 | return compatlist( |
|
193 | return compatlist( | |
194 | context, mapping, b'branch', [branch], plural=b'branches' |
|
194 | context, mapping, b'branch', [branch], plural=b'branches' | |
195 | ) |
|
195 | ) | |
196 | return compatlist(context, mapping, b'branch', [], plural=b'branches') |
|
196 | return compatlist(context, mapping, b'branch', [], plural=b'branches') | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | @templatekeyword(b'bookmarks', requires={b'repo', b'ctx'}) |
|
199 | @templatekeyword(b'bookmarks', requires={b'repo', b'ctx'}) | |
200 | def showbookmarks(context, mapping): |
|
200 | def showbookmarks(context, mapping): | |
201 | """List of strings. Any bookmarks associated with the |
|
201 | """List of strings. Any bookmarks associated with the | |
202 | changeset. Also sets 'active', the name of the active bookmark. |
|
202 | changeset. Also sets 'active', the name of the active bookmark. | |
203 | """ |
|
203 | """ | |
204 | repo = context.resource(mapping, b'repo') |
|
204 | repo = context.resource(mapping, b'repo') | |
205 | ctx = context.resource(mapping, b'ctx') |
|
205 | ctx = context.resource(mapping, b'ctx') | |
206 | bookmarks = ctx.bookmarks() |
|
206 | bookmarks = ctx.bookmarks() | |
207 | active = repo._activebookmark |
|
207 | active = repo._activebookmark | |
208 | makemap = lambda v: {b'bookmark': v, b'active': active, b'current': active} |
|
208 | makemap = lambda v: {b'bookmark': v, b'active': active, b'current': active} | |
209 | f = _showcompatlist(context, mapping, b'bookmark', bookmarks) |
|
209 | f = _showcompatlist(context, mapping, b'bookmark', bookmarks) | |
210 | return _hybrid(f, bookmarks, makemap, pycompat.identity) |
|
210 | return _hybrid(f, bookmarks, makemap, pycompat.identity) | |
211 |
|
211 | |||
212 |
|
212 | |||
213 | @templatekeyword(b'children', requires={b'ctx'}) |
|
213 | @templatekeyword(b'children', requires={b'ctx'}) | |
214 | def showchildren(context, mapping): |
|
214 | def showchildren(context, mapping): | |
215 | """List of strings. The children of the changeset.""" |
|
215 | """List of strings. The children of the changeset.""" | |
216 | ctx = context.resource(mapping, b'ctx') |
|
216 | ctx = context.resource(mapping, b'ctx') | |
217 | childrevs = [b'%d:%s' % (cctx.rev(), cctx) for cctx in ctx.children()] |
|
217 | childrevs = [b'%d:%s' % (cctx.rev(), cctx) for cctx in ctx.children()] | |
218 | return compatlist( |
|
218 | return compatlist( | |
219 | context, mapping, b'children', childrevs, element=b'child' |
|
219 | context, mapping, b'children', childrevs, element=b'child' | |
220 | ) |
|
220 | ) | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | # Deprecated, but kept alive for help generation a purpose. |
|
223 | # Deprecated, but kept alive for help generation a purpose. | |
224 | @templatekeyword(b'currentbookmark', requires={b'repo', b'ctx'}) |
|
224 | @templatekeyword(b'currentbookmark', requires={b'repo', b'ctx'}) | |
225 | def showcurrentbookmark(context, mapping): |
|
225 | def showcurrentbookmark(context, mapping): | |
226 | """String. The active bookmark, if it is associated with the changeset. |
|
226 | """String. The active bookmark, if it is associated with the changeset. | |
227 | (DEPRECATED)""" |
|
227 | (DEPRECATED)""" | |
228 | return showactivebookmark(context, mapping) |
|
228 | return showactivebookmark(context, mapping) | |
229 |
|
229 | |||
230 |
|
230 | |||
231 | @templatekeyword(b'activebookmark', requires={b'repo', b'ctx'}) |
|
231 | @templatekeyword(b'activebookmark', requires={b'repo', b'ctx'}) | |
232 | def showactivebookmark(context, mapping): |
|
232 | def showactivebookmark(context, mapping): | |
233 | """String. The active bookmark, if it is associated with the changeset.""" |
|
233 | """String. The active bookmark, if it is associated with the changeset.""" | |
234 | repo = context.resource(mapping, b'repo') |
|
234 | repo = context.resource(mapping, b'repo') | |
235 | ctx = context.resource(mapping, b'ctx') |
|
235 | ctx = context.resource(mapping, b'ctx') | |
236 | active = repo._activebookmark |
|
236 | active = repo._activebookmark | |
237 | if active and active in ctx.bookmarks(): |
|
237 | if active and active in ctx.bookmarks(): | |
238 | return active |
|
238 | return active | |
239 | return b'' |
|
239 | return b'' | |
240 |
|
240 | |||
241 |
|
241 | |||
242 | @templatekeyword(b'date', requires={b'ctx'}) |
|
242 | @templatekeyword(b'date', requires={b'ctx'}) | |
243 | def showdate(context, mapping): |
|
243 | def showdate(context, mapping): | |
244 | """Date information. The date when the changeset was committed.""" |
|
244 | """Date information. The date when the changeset was committed.""" | |
245 | ctx = context.resource(mapping, b'ctx') |
|
245 | ctx = context.resource(mapping, b'ctx') | |
246 | # the default string format is '<float(unixtime)><tzoffset>' because |
|
246 | # the default string format is '<float(unixtime)><tzoffset>' because | |
247 | # python-hglib splits date at decimal separator. |
|
247 | # python-hglib splits date at decimal separator. | |
248 | return templateutil.date(ctx.date(), showfmt=b'%d.0%d') |
|
248 | return templateutil.date(ctx.date(), showfmt=b'%d.0%d') | |
249 |
|
249 | |||
250 |
|
250 | |||
251 | @templatekeyword(b'desc', requires={b'ctx'}) |
|
251 | @templatekeyword(b'desc', requires={b'ctx'}) | |
252 | def showdescription(context, mapping): |
|
252 | def showdescription(context, mapping): | |
253 | """String. The text of the changeset description.""" |
|
253 | """String. The text of the changeset description.""" | |
254 | ctx = context.resource(mapping, b'ctx') |
|
254 | ctx = context.resource(mapping, b'ctx') | |
255 | s = ctx.description() |
|
255 | s = ctx.description() | |
256 | if isinstance(s, encoding.localstr): |
|
256 | if isinstance(s, encoding.localstr): | |
257 | # try hard to preserve utf-8 bytes |
|
257 | # try hard to preserve utf-8 bytes | |
258 | return encoding.tolocal(encoding.fromlocal(s).strip()) |
|
258 | return encoding.tolocal(encoding.fromlocal(s).strip()) | |
259 | elif isinstance(s, encoding.safelocalstr): |
|
259 | elif isinstance(s, encoding.safelocalstr): | |
260 | return encoding.safelocalstr(s.strip()) |
|
260 | return encoding.safelocalstr(s.strip()) | |
261 | else: |
|
261 | else: | |
262 | return s.strip() |
|
262 | return s.strip() | |
263 |
|
263 | |||
264 |
|
264 | |||
265 | @templatekeyword(b'diffstat', requires={b'ui', b'ctx'}) |
|
265 | @templatekeyword(b'diffstat', requires={b'ui', b'ctx'}) | |
266 | def showdiffstat(context, mapping): |
|
266 | def showdiffstat(context, mapping): | |
267 | """String. Statistics of changes with the following format: |
|
267 | """String. Statistics of changes with the following format: | |
268 | "modified files: +added/-removed lines" |
|
268 | "modified files: +added/-removed lines" | |
269 | """ |
|
269 | """ | |
270 | ui = context.resource(mapping, b'ui') |
|
270 | ui = context.resource(mapping, b'ui') | |
271 | ctx = context.resource(mapping, b'ctx') |
|
271 | ctx = context.resource(mapping, b'ctx') | |
272 | diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) |
|
272 | diffopts = diffutil.diffallopts(ui, {b'noprefix': False}) | |
273 | diff = ctx.diff(opts=diffopts) |
|
273 | diff = ctx.diff(opts=diffopts) | |
274 | stats = patch.diffstatdata(util.iterlines(diff)) |
|
274 | stats = patch.diffstatdata(util.iterlines(diff)) | |
275 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) |
|
275 | maxname, maxtotal, adds, removes, binary = patch.diffstatsum(stats) | |
276 | return b'%d: +%d/-%d' % (len(stats), adds, removes) |
|
276 | return b'%d: +%d/-%d' % (len(stats), adds, removes) | |
277 |
|
277 | |||
278 |
|
278 | |||
279 | @templatekeyword(b'envvars', requires={b'ui'}) |
|
279 | @templatekeyword(b'envvars', requires={b'ui'}) | |
280 | def showenvvars(context, mapping): |
|
280 | def showenvvars(context, mapping): | |
281 | """A dictionary of environment variables. (EXPERIMENTAL)""" |
|
281 | """A dictionary of environment variables. (EXPERIMENTAL)""" | |
282 | ui = context.resource(mapping, b'ui') |
|
282 | ui = context.resource(mapping, b'ui') | |
283 | env = ui.exportableenviron() |
|
283 | env = ui.exportableenviron() | |
284 | env = util.sortdict((k, env[k]) for k in sorted(env)) |
|
284 | env = util.sortdict((k, env[k]) for k in sorted(env)) | |
285 | return compatdict(context, mapping, b'envvar', env, plural=b'envvars') |
|
285 | return compatdict(context, mapping, b'envvar', env, plural=b'envvars') | |
286 |
|
286 | |||
287 |
|
287 | |||
288 | @templatekeyword(b'extras', requires={b'ctx'}) |
|
288 | @templatekeyword(b'extras', requires={b'ctx'}) | |
289 | def showextras(context, mapping): |
|
289 | def showextras(context, mapping): | |
290 | """List of dicts with key, value entries of the 'extras' |
|
290 | """List of dicts with key, value entries of the 'extras' | |
291 | field of this changeset.""" |
|
291 | field of this changeset.""" | |
292 | ctx = context.resource(mapping, b'ctx') |
|
292 | ctx = context.resource(mapping, b'ctx') | |
293 | extras = ctx.extra() |
|
293 | extras = ctx.extra() | |
294 | extras = util.sortdict((k, extras[k]) for k in sorted(extras)) |
|
294 | extras = util.sortdict((k, extras[k]) for k in sorted(extras)) | |
295 | makemap = lambda k: {b'key': k, b'value': extras[k]} |
|
295 | makemap = lambda k: {b'key': k, b'value': extras[k]} | |
296 | c = [makemap(k) for k in extras] |
|
296 | c = [makemap(k) for k in extras] | |
297 | f = _showcompatlist(context, mapping, b'extra', c, plural=b'extras') |
|
297 | f = _showcompatlist(context, mapping, b'extra', c, plural=b'extras') | |
298 | return _hybrid( |
|
298 | return _hybrid( | |
299 | f, |
|
299 | f, | |
300 | extras, |
|
300 | extras, | |
301 | makemap, |
|
301 | makemap, | |
302 | lambda k: b'%s=%s' % (k, stringutil.escapestr(extras[k])), |
|
302 | lambda k: b'%s=%s' % (k, stringutil.escapestr(extras[k])), | |
303 | ) |
|
303 | ) | |
304 |
|
304 | |||
305 |
|
305 | |||
306 | def _getfilestatus(context, mapping, listall=False): |
|
306 | def _getfilestatus(context, mapping, listall=False): | |
307 | ctx = context.resource(mapping, b'ctx') |
|
307 | ctx = context.resource(mapping, b'ctx') | |
308 | revcache = context.resource(mapping, b'revcache') |
|
308 | revcache = context.resource(mapping, b'revcache') | |
309 | if b'filestatus' not in revcache or revcache[b'filestatusall'] < listall: |
|
309 | if b'filestatus' not in revcache or revcache[b'filestatusall'] < listall: | |
310 | stat = ctx.p1().status( |
|
310 | stat = ctx.p1().status( | |
311 | ctx, listignored=listall, listclean=listall, listunknown=listall |
|
311 | ctx, listignored=listall, listclean=listall, listunknown=listall | |
312 | ) |
|
312 | ) | |
313 | revcache[b'filestatus'] = stat |
|
313 | revcache[b'filestatus'] = stat | |
314 | revcache[b'filestatusall'] = listall |
|
314 | revcache[b'filestatusall'] = listall | |
315 | return revcache[b'filestatus'] |
|
315 | return revcache[b'filestatus'] | |
316 |
|
316 | |||
317 |
|
317 | |||
318 | def _getfilestatusmap(context, mapping, listall=False): |
|
318 | def _getfilestatusmap(context, mapping, listall=False): | |
319 | revcache = context.resource(mapping, b'revcache') |
|
319 | revcache = context.resource(mapping, b'revcache') | |
320 | if b'filestatusmap' not in revcache or revcache[b'filestatusall'] < listall: |
|
320 | if b'filestatusmap' not in revcache or revcache[b'filestatusall'] < listall: | |
321 | stat = _getfilestatus(context, mapping, listall=listall) |
|
321 | stat = _getfilestatus(context, mapping, listall=listall) | |
322 | revcache[b'filestatusmap'] = statmap = {} |
|
322 | revcache[b'filestatusmap'] = statmap = {} | |
323 | for char, files in zip(pycompat.iterbytestr(b'MAR!?IC'), stat): |
|
323 | for char, files in zip(pycompat.iterbytestr(b'MAR!?IC'), stat): | |
324 | statmap.update((f, char) for f in files) |
|
324 | statmap.update((f, char) for f in files) | |
325 | return revcache[b'filestatusmap'] # {path: statchar} |
|
325 | return revcache[b'filestatusmap'] # {path: statchar} | |
326 |
|
326 | |||
327 |
|
327 | |||
328 | @templatekeyword( |
|
328 | @templatekeyword( | |
329 | b'file_copies', requires={b'repo', b'ctx', b'cache', b'revcache'} |
|
329 | b'file_copies', requires={b'repo', b'ctx', b'cache', b'revcache'} | |
330 | ) |
|
330 | ) | |
331 | def showfilecopies(context, mapping): |
|
331 | def showfilecopies(context, mapping): | |
332 | """List of strings. Files copied in this changeset with |
|
332 | """List of strings. Files copied in this changeset with | |
333 | their sources. |
|
333 | their sources. | |
334 | """ |
|
334 | """ | |
335 | repo = context.resource(mapping, b'repo') |
|
335 | repo = context.resource(mapping, b'repo') | |
336 | ctx = context.resource(mapping, b'ctx') |
|
336 | ctx = context.resource(mapping, b'ctx') | |
337 | cache = context.resource(mapping, b'cache') |
|
337 | cache = context.resource(mapping, b'cache') | |
338 | copies = context.resource(mapping, b'revcache').get(b'copies') |
|
338 | copies = context.resource(mapping, b'revcache').get(b'copies') | |
339 | if copies is None: |
|
339 | if copies is None: | |
340 | if b'getcopies' not in cache: |
|
340 | if b'getcopies' not in cache: | |
341 | cache[b'getcopies'] = scmutil.getcopiesfn(repo) |
|
341 | cache[b'getcopies'] = scmutil.getcopiesfn(repo) | |
342 | getcopies = cache[b'getcopies'] |
|
342 | getcopies = cache[b'getcopies'] | |
343 | copies = getcopies(ctx) |
|
343 | copies = getcopies(ctx) | |
344 | return templateutil.compatfilecopiesdict( |
|
344 | return templateutil.compatfilecopiesdict( | |
345 | context, mapping, b'file_copy', copies |
|
345 | context, mapping, b'file_copy', copies | |
346 | ) |
|
346 | ) | |
347 |
|
347 | |||
348 |
|
348 | |||
349 | # showfilecopiesswitch() displays file copies only if copy records are |
|
349 | # showfilecopiesswitch() displays file copies only if copy records are | |
350 | # provided before calling the templater, usually with a --copies |
|
350 | # provided before calling the templater, usually with a --copies | |
351 | # command line switch. |
|
351 | # command line switch. | |
352 | @templatekeyword(b'file_copies_switch', requires={b'revcache'}) |
|
352 | @templatekeyword(b'file_copies_switch', requires={b'revcache'}) | |
353 | def showfilecopiesswitch(context, mapping): |
|
353 | def showfilecopiesswitch(context, mapping): | |
354 | """List of strings. Like "file_copies" but displayed |
|
354 | """List of strings. Like "file_copies" but displayed | |
355 | only if the --copied switch is set. |
|
355 | only if the --copied switch is set. | |
356 | """ |
|
356 | """ | |
357 | copies = context.resource(mapping, b'revcache').get(b'copies') or [] |
|
357 | copies = context.resource(mapping, b'revcache').get(b'copies') or [] | |
358 | return templateutil.compatfilecopiesdict( |
|
358 | return templateutil.compatfilecopiesdict( | |
359 | context, mapping, b'file_copy', copies |
|
359 | context, mapping, b'file_copy', copies | |
360 | ) |
|
360 | ) | |
361 |
|
361 | |||
362 |
|
362 | |||
363 | @templatekeyword(b'file_adds', requires={b'ctx', b'revcache'}) |
|
363 | @templatekeyword(b'file_adds', requires={b'ctx', b'revcache'}) | |
364 | def showfileadds(context, mapping): |
|
364 | def showfileadds(context, mapping): | |
365 | """List of strings. Files added by this changeset.""" |
|
365 | """List of strings. Files added by this changeset.""" | |
366 | ctx = context.resource(mapping, b'ctx') |
|
366 | ctx = context.resource(mapping, b'ctx') | |
367 | return templateutil.compatfileslist( |
|
367 | return templateutil.compatfileslist( | |
368 | context, mapping, b'file_add', ctx.filesadded() |
|
368 | context, mapping, b'file_add', ctx.filesadded() | |
369 | ) |
|
369 | ) | |
370 |
|
370 | |||
371 |
|
371 | |||
372 | @templatekeyword(b'file_dels', requires={b'ctx', b'revcache'}) |
|
372 | @templatekeyword(b'file_dels', requires={b'ctx', b'revcache'}) | |
373 | def showfiledels(context, mapping): |
|
373 | def showfiledels(context, mapping): | |
374 | """List of strings. Files removed by this changeset.""" |
|
374 | """List of strings. Files removed by this changeset.""" | |
375 | ctx = context.resource(mapping, b'ctx') |
|
375 | ctx = context.resource(mapping, b'ctx') | |
376 | return templateutil.compatfileslist( |
|
376 | return templateutil.compatfileslist( | |
377 | context, mapping, b'file_del', ctx.filesremoved() |
|
377 | context, mapping, b'file_del', ctx.filesremoved() | |
378 | ) |
|
378 | ) | |
379 |
|
379 | |||
380 |
|
380 | |||
381 | @templatekeyword(b'file_mods', requires={b'ctx', b'revcache'}) |
|
381 | @templatekeyword(b'file_mods', requires={b'ctx', b'revcache'}) | |
382 | def showfilemods(context, mapping): |
|
382 | def showfilemods(context, mapping): | |
383 | """List of strings. Files modified by this changeset.""" |
|
383 | """List of strings. Files modified by this changeset.""" | |
384 | ctx = context.resource(mapping, b'ctx') |
|
384 | ctx = context.resource(mapping, b'ctx') | |
385 | return templateutil.compatfileslist( |
|
385 | return templateutil.compatfileslist( | |
386 | context, mapping, b'file_mod', ctx.filesmodified() |
|
386 | context, mapping, b'file_mod', ctx.filesmodified() | |
387 | ) |
|
387 | ) | |
388 |
|
388 | |||
389 |
|
389 | |||
390 | @templatekeyword(b'files', requires={b'ctx'}) |
|
390 | @templatekeyword(b'files', requires={b'ctx'}) | |
391 | def showfiles(context, mapping): |
|
391 | def showfiles(context, mapping): | |
392 | """List of strings. All files modified, added, or removed by this |
|
392 | """List of strings. All files modified, added, or removed by this | |
393 | changeset. |
|
393 | changeset. | |
394 | """ |
|
394 | """ | |
395 | ctx = context.resource(mapping, b'ctx') |
|
395 | ctx = context.resource(mapping, b'ctx') | |
396 | return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) |
|
396 | return templateutil.compatfileslist(context, mapping, b'file', ctx.files()) | |
397 |
|
397 | |||
398 |
|
398 | |||
399 | @templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) |
|
399 | @templatekeyword(b'graphnode', requires={b'repo', b'ctx', b'cache'}) | |
400 | def showgraphnode(context, mapping): |
|
400 | def showgraphnode(context, mapping): | |
401 | """String. The character representing the changeset node in an ASCII |
|
401 | """String. The character representing the changeset node in an ASCII | |
402 | revision graph.""" |
|
402 | revision graph.""" | |
403 | repo = context.resource(mapping, b'repo') |
|
403 | repo = context.resource(mapping, b'repo') | |
404 | ctx = context.resource(mapping, b'ctx') |
|
404 | ctx = context.resource(mapping, b'ctx') | |
405 | cache = context.resource(mapping, b'cache') |
|
405 | cache = context.resource(mapping, b'cache') | |
406 | return getgraphnode(repo, ctx, cache) |
|
406 | return getgraphnode(repo, ctx, cache) | |
407 |
|
407 | |||
408 |
|
408 | |||
409 | def getgraphnode(repo, ctx, cache): |
|
409 | def getgraphnode(repo, ctx, cache): | |
410 | return getgraphnodecurrent(repo, ctx, cache) or getgraphnodesymbol(ctx) |
|
410 | return getgraphnodecurrent(repo, ctx, cache) or getgraphnodesymbol(ctx) | |
411 |
|
411 | |||
412 |
|
412 | |||
413 | def getgraphnodecurrent(repo, ctx, cache): |
|
413 | def getgraphnodecurrent(repo, ctx, cache): | |
414 | wpnodes = repo.dirstate.parents() |
|
414 | wpnodes = repo.dirstate.parents() | |
415 | if wpnodes[1] == nullid: |
|
415 | if wpnodes[1] == nullid: | |
416 | wpnodes = wpnodes[:1] |
|
416 | wpnodes = wpnodes[:1] | |
417 | if ctx.node() in wpnodes: |
|
417 | if ctx.node() in wpnodes: | |
418 | return b'@' |
|
418 | return b'@' | |
419 | else: |
|
419 | else: | |
420 | merge_nodes = cache.get(b'merge_nodes') |
|
420 | merge_nodes = cache.get(b'merge_nodes') | |
421 | if merge_nodes is None: |
|
421 | if merge_nodes is None: | |
422 | from . import merge |
|
422 | from . import merge | |
423 |
|
423 | |||
424 | mergestate = merge.mergestate.read(repo) |
|
424 | mergestate = merge.mergestate.read(repo) | |
425 | if mergestate.active(): |
|
425 | if mergestate.active(): | |
426 | merge_nodes = (mergestate.local, mergestate.other) |
|
426 | merge_nodes = (mergestate.local, mergestate.other) | |
427 | else: |
|
427 | else: | |
428 | merge_nodes = () |
|
428 | merge_nodes = () | |
429 | cache[b'merge_nodes'] = merge_nodes |
|
429 | cache[b'merge_nodes'] = merge_nodes | |
430 |
|
430 | |||
431 | if ctx.node() in merge_nodes: |
|
431 | if ctx.node() in merge_nodes: | |
432 | return b'%' |
|
432 | return b'%' | |
433 | return b'' |
|
433 | return b'' | |
434 |
|
434 | |||
435 |
|
435 | |||
436 | def getgraphnodesymbol(ctx): |
|
436 | def getgraphnodesymbol(ctx): | |
437 | if ctx.obsolete(): |
|
437 | if ctx.obsolete(): | |
438 | return b'x' |
|
438 | return b'x' | |
439 | elif ctx.isunstable(): |
|
439 | elif ctx.isunstable(): | |
440 | return b'*' |
|
440 | return b'*' | |
441 | elif ctx.closesbranch(): |
|
441 | elif ctx.closesbranch(): | |
442 | return b'_' |
|
442 | return b'_' | |
443 | else: |
|
443 | else: | |
444 | return b'o' |
|
444 | return b'o' | |
445 |
|
445 | |||
446 |
|
446 | |||
447 | @templatekeyword(b'graphwidth', requires=()) |
|
447 | @templatekeyword(b'graphwidth', requires=()) | |
448 | def showgraphwidth(context, mapping): |
|
448 | def showgraphwidth(context, mapping): | |
449 | """Integer. The width of the graph drawn by 'log --graph' or zero.""" |
|
449 | """Integer. The width of the graph drawn by 'log --graph' or zero.""" | |
450 | # just hosts documentation; should be overridden by template mapping |
|
450 | # just hosts documentation; should be overridden by template mapping | |
451 | return 0 |
|
451 | return 0 | |
452 |
|
452 | |||
453 |
|
453 | |||
454 | @templatekeyword(b'index', requires=()) |
|
454 | @templatekeyword(b'index', requires=()) | |
455 | def showindex(context, mapping): |
|
455 | def showindex(context, mapping): | |
456 | """Integer. The current iteration of the loop. (0 indexed)""" |
|
456 | """Integer. The current iteration of the loop. (0 indexed)""" | |
457 | # just hosts documentation; should be overridden by template mapping |
|
457 | # just hosts documentation; should be overridden by template mapping | |
458 | raise error.Abort(_(b"can't use index in this context")) |
|
458 | raise error.Abort(_(b"can't use index in this context")) | |
459 |
|
459 | |||
460 |
|
460 | |||
461 | @templatekeyword(b'latesttag', requires={b'repo', b'ctx', b'cache'}) |
|
461 | @templatekeyword(b'latesttag', requires={b'repo', b'ctx', b'cache'}) | |
462 | def showlatesttag(context, mapping): |
|
462 | def showlatesttag(context, mapping): | |
463 | """List of strings. The global tags on the most recent globally |
|
463 | """List of strings. The global tags on the most recent globally | |
464 | tagged ancestor of this changeset. If no such tags exist, the list |
|
464 | tagged ancestor of this changeset. If no such tags exist, the list | |
465 | consists of the single string "null". |
|
465 | consists of the single string "null". | |
466 | """ |
|
466 | """ | |
467 | return showlatesttags(context, mapping, None) |
|
467 | return showlatesttags(context, mapping, None) | |
468 |
|
468 | |||
469 |
|
469 | |||
470 | def showlatesttags(context, mapping, pattern): |
|
470 | def showlatesttags(context, mapping, pattern): | |
471 | """helper method for the latesttag keyword and function""" |
|
471 | """helper method for the latesttag keyword and function""" | |
472 | latesttags = getlatesttags(context, mapping, pattern) |
|
472 | latesttags = getlatesttags(context, mapping, pattern) | |
473 |
|
473 | |||
474 | # latesttag[0] is an implementation detail for sorting csets on different |
|
474 | # latesttag[0] is an implementation detail for sorting csets on different | |
475 | # branches in a stable manner- it is the date the tagged cset was created, |
|
475 | # branches in a stable manner- it is the date the tagged cset was created, | |
476 | # not the date the tag was created. Therefore it isn't made visible here. |
|
476 | # not the date the tag was created. Therefore it isn't made visible here. | |
477 | makemap = lambda v: { |
|
477 | makemap = lambda v: { | |
478 | b'changes': _showchangessincetag, |
|
478 | b'changes': _showchangessincetag, | |
479 | b'distance': latesttags[1], |
|
479 | b'distance': latesttags[1], | |
480 | b'latesttag': v, # BC with {latesttag % '{latesttag}'} |
|
480 | b'latesttag': v, # BC with {latesttag % '{latesttag}'} | |
481 | b'tag': v, |
|
481 | b'tag': v, | |
482 | } |
|
482 | } | |
483 |
|
483 | |||
484 | tags = latesttags[2] |
|
484 | tags = latesttags[2] | |
485 | f = _showcompatlist(context, mapping, b'latesttag', tags, separator=b':') |
|
485 | f = _showcompatlist(context, mapping, b'latesttag', tags, separator=b':') | |
486 | return _hybrid(f, tags, makemap, pycompat.identity) |
|
486 | return _hybrid(f, tags, makemap, pycompat.identity) | |
487 |
|
487 | |||
488 |
|
488 | |||
489 | @templatekeyword(b'latesttagdistance', requires={b'repo', b'ctx', b'cache'}) |
|
489 | @templatekeyword(b'latesttagdistance', requires={b'repo', b'ctx', b'cache'}) | |
490 | def showlatesttagdistance(context, mapping): |
|
490 | def showlatesttagdistance(context, mapping): | |
491 | """Integer. Longest path to the latest tag.""" |
|
491 | """Integer. Longest path to the latest tag.""" | |
492 | return getlatesttags(context, mapping)[1] |
|
492 | return getlatesttags(context, mapping)[1] | |
493 |
|
493 | |||
494 |
|
494 | |||
495 | @templatekeyword(b'changessincelatesttag', requires={b'repo', b'ctx', b'cache'}) |
|
495 | @templatekeyword(b'changessincelatesttag', requires={b'repo', b'ctx', b'cache'}) | |
496 | def showchangessincelatesttag(context, mapping): |
|
496 | def showchangessincelatesttag(context, mapping): | |
497 | """Integer. All ancestors not in the latest tag.""" |
|
497 | """Integer. All ancestors not in the latest tag.""" | |
498 | tag = getlatesttags(context, mapping)[2][0] |
|
498 | tag = getlatesttags(context, mapping)[2][0] | |
499 | mapping = context.overlaymap(mapping, {b'tag': tag}) |
|
499 | mapping = context.overlaymap(mapping, {b'tag': tag}) | |
500 | return _showchangessincetag(context, mapping) |
|
500 | return _showchangessincetag(context, mapping) | |
501 |
|
501 | |||
502 |
|
502 | |||
503 | def _showchangessincetag(context, mapping): |
|
503 | def _showchangessincetag(context, mapping): | |
504 | repo = context.resource(mapping, b'repo') |
|
504 | repo = context.resource(mapping, b'repo') | |
505 | ctx = context.resource(mapping, b'ctx') |
|
505 | ctx = context.resource(mapping, b'ctx') | |
506 | offset = 0 |
|
506 | offset = 0 | |
507 | revs = [ctx.rev()] |
|
507 | revs = [ctx.rev()] | |
508 | tag = context.symbol(mapping, b'tag') |
|
508 | tag = context.symbol(mapping, b'tag') | |
509 |
|
509 | |||
510 | # The only() revset doesn't currently support wdir() |
|
510 | # The only() revset doesn't currently support wdir() | |
511 | if ctx.rev() is None: |
|
511 | if ctx.rev() is None: | |
512 | offset = 1 |
|
512 | offset = 1 | |
513 | revs = [p.rev() for p in ctx.parents()] |
|
513 | revs = [p.rev() for p in ctx.parents()] | |
514 |
|
514 | |||
515 | return len(repo.revs(b'only(%ld, %s)', revs, tag)) + offset |
|
515 | return len(repo.revs(b'only(%ld, %s)', revs, tag)) + offset | |
516 |
|
516 | |||
517 |
|
517 | |||
518 | # teach templater latesttags.changes is switched to (context, mapping) API |
|
518 | # teach templater latesttags.changes is switched to (context, mapping) API | |
519 | _showchangessincetag._requires = {b'repo', b'ctx'} |
|
519 | _showchangessincetag._requires = {b'repo', b'ctx'} | |
520 |
|
520 | |||
521 |
|
521 | |||
522 | @templatekeyword(b'manifest', requires={b'repo', b'ctx'}) |
|
522 | @templatekeyword(b'manifest', requires={b'repo', b'ctx'}) | |
523 | def showmanifest(context, mapping): |
|
523 | def showmanifest(context, mapping): | |
524 | repo = context.resource(mapping, b'repo') |
|
524 | repo = context.resource(mapping, b'repo') | |
525 | ctx = context.resource(mapping, b'ctx') |
|
525 | ctx = context.resource(mapping, b'ctx') | |
526 | mnode = ctx.manifestnode() |
|
526 | mnode = ctx.manifestnode() | |
527 | if mnode is None: |
|
527 | if mnode is None: | |
528 | mnode = wdirid |
|
528 | mnode = wdirid | |
529 | mrev = wdirrev |
|
529 | mrev = wdirrev | |
530 | else: |
|
530 | else: | |
531 | mrev = repo.manifestlog.rev(mnode) |
|
531 | mrev = repo.manifestlog.rev(mnode) | |
532 | mhex = hex(mnode) |
|
532 | mhex = hex(mnode) | |
533 | mapping = context.overlaymap(mapping, {b'rev': mrev, b'node': mhex}) |
|
533 | mapping = context.overlaymap(mapping, {b'rev': mrev, b'node': mhex}) | |
534 | f = context.process(b'manifest', mapping) |
|
534 | f = context.process(b'manifest', mapping) | |
535 | return templateutil.hybriditem( |
|
535 | return templateutil.hybriditem( | |
536 | f, None, f, lambda x: {b'rev': mrev, b'node': mhex} |
|
536 | f, None, f, lambda x: {b'rev': mrev, b'node': mhex} | |
537 | ) |
|
537 | ) | |
538 |
|
538 | |||
539 |
|
539 | |||
540 | @templatekeyword(b'obsfate', requires={b'ui', b'repo', b'ctx'}) |
|
540 | @templatekeyword(b'obsfate', requires={b'ui', b'repo', b'ctx'}) | |
541 | def showobsfate(context, mapping): |
|
541 | def showobsfate(context, mapping): | |
542 | # this function returns a list containing pre-formatted obsfate strings. |
|
542 | # this function returns a list containing pre-formatted obsfate strings. | |
543 | # |
|
543 | # | |
544 | # This function will be replaced by templates fragments when we will have |
|
544 | # This function will be replaced by templates fragments when we will have | |
545 | # the verbosity templatekw available. |
|
545 | # the verbosity templatekw available. | |
546 | succsandmarkers = showsuccsandmarkers(context, mapping) |
|
546 | succsandmarkers = showsuccsandmarkers(context, mapping) | |
547 |
|
547 | |||
548 | ui = context.resource(mapping, b'ui') |
|
548 | ui = context.resource(mapping, b'ui') | |
549 | repo = context.resource(mapping, b'repo') |
|
549 | repo = context.resource(mapping, b'repo') | |
550 | values = [] |
|
550 | values = [] | |
551 |
|
551 | |||
552 | for x in succsandmarkers.tovalue(context, mapping): |
|
552 | for x in succsandmarkers.tovalue(context, mapping): | |
553 | v = obsutil.obsfateprinter( |
|
553 | v = obsutil.obsfateprinter( | |
554 | ui, repo, x[b'successors'], x[b'markers'], scmutil.formatchangeid |
|
554 | ui, repo, x[b'successors'], x[b'markers'], scmutil.formatchangeid | |
555 | ) |
|
555 | ) | |
556 | values.append(v) |
|
556 | values.append(v) | |
557 |
|
557 | |||
558 | return compatlist(context, mapping, b"fate", values) |
|
558 | return compatlist(context, mapping, b"fate", values) | |
559 |
|
559 | |||
560 |
|
560 | |||
561 | def shownames(context, mapping, namespace): |
|
561 | def shownames(context, mapping, namespace): | |
562 | """helper method to generate a template keyword for a namespace""" |
|
562 | """helper method to generate a template keyword for a namespace""" | |
563 | repo = context.resource(mapping, b'repo') |
|
563 | repo = context.resource(mapping, b'repo') | |
564 | ctx = context.resource(mapping, b'ctx') |
|
564 | ctx = context.resource(mapping, b'ctx') | |
565 |
ns = repo.names |
|
565 | ns = repo.names.get(namespace) | |
|
566 | if ns is None: | |||
|
567 | # namespaces.addnamespace() registers new template keyword, but | |||
|
568 | # the registered namespace might not exist in the current repo. | |||
|
569 | return | |||
566 | names = ns.names(repo, ctx.node()) |
|
570 | names = ns.names(repo, ctx.node()) | |
567 | return compatlist( |
|
571 | return compatlist( | |
568 | context, mapping, ns.templatename, names, plural=namespace |
|
572 | context, mapping, ns.templatename, names, plural=namespace | |
569 | ) |
|
573 | ) | |
570 |
|
574 | |||
571 |
|
575 | |||
572 | @templatekeyword(b'namespaces', requires={b'repo', b'ctx'}) |
|
576 | @templatekeyword(b'namespaces', requires={b'repo', b'ctx'}) | |
573 | def shownamespaces(context, mapping): |
|
577 | def shownamespaces(context, mapping): | |
574 | """Dict of lists. Names attached to this changeset per |
|
578 | """Dict of lists. Names attached to this changeset per | |
575 | namespace.""" |
|
579 | namespace.""" | |
576 | repo = context.resource(mapping, b'repo') |
|
580 | repo = context.resource(mapping, b'repo') | |
577 | ctx = context.resource(mapping, b'ctx') |
|
581 | ctx = context.resource(mapping, b'ctx') | |
578 |
|
582 | |||
579 | namespaces = util.sortdict() |
|
583 | namespaces = util.sortdict() | |
580 |
|
584 | |||
581 | def makensmapfn(ns): |
|
585 | def makensmapfn(ns): | |
582 | # 'name' for iterating over namespaces, templatename for local reference |
|
586 | # 'name' for iterating over namespaces, templatename for local reference | |
583 | return lambda v: {b'name': v, ns.templatename: v} |
|
587 | return lambda v: {b'name': v, ns.templatename: v} | |
584 |
|
588 | |||
585 | for k, ns in pycompat.iteritems(repo.names): |
|
589 | for k, ns in pycompat.iteritems(repo.names): | |
586 | names = ns.names(repo, ctx.node()) |
|
590 | names = ns.names(repo, ctx.node()) | |
587 | f = _showcompatlist(context, mapping, b'name', names) |
|
591 | f = _showcompatlist(context, mapping, b'name', names) | |
588 | namespaces[k] = _hybrid(f, names, makensmapfn(ns), pycompat.identity) |
|
592 | namespaces[k] = _hybrid(f, names, makensmapfn(ns), pycompat.identity) | |
589 |
|
593 | |||
590 | f = _showcompatlist(context, mapping, b'namespace', list(namespaces)) |
|
594 | f = _showcompatlist(context, mapping, b'namespace', list(namespaces)) | |
591 |
|
595 | |||
592 | def makemap(ns): |
|
596 | def makemap(ns): | |
593 | return { |
|
597 | return { | |
594 | b'namespace': ns, |
|
598 | b'namespace': ns, | |
595 | b'names': namespaces[ns], |
|
599 | b'names': namespaces[ns], | |
596 | b'builtin': repo.names[ns].builtin, |
|
600 | b'builtin': repo.names[ns].builtin, | |
597 | b'colorname': repo.names[ns].colorname, |
|
601 | b'colorname': repo.names[ns].colorname, | |
598 | } |
|
602 | } | |
599 |
|
603 | |||
600 | return _hybrid(f, namespaces, makemap, pycompat.identity) |
|
604 | return _hybrid(f, namespaces, makemap, pycompat.identity) | |
601 |
|
605 | |||
602 |
|
606 | |||
603 | @templatekeyword(b'negrev', requires={b'repo', b'ctx'}) |
|
607 | @templatekeyword(b'negrev', requires={b'repo', b'ctx'}) | |
604 | def shownegrev(context, mapping): |
|
608 | def shownegrev(context, mapping): | |
605 | """Integer. The repository-local changeset negative revision number, |
|
609 | """Integer. The repository-local changeset negative revision number, | |
606 | which counts in the opposite direction.""" |
|
610 | which counts in the opposite direction.""" | |
607 | ctx = context.resource(mapping, b'ctx') |
|
611 | ctx = context.resource(mapping, b'ctx') | |
608 | rev = ctx.rev() |
|
612 | rev = ctx.rev() | |
609 | if rev is None or rev < 0: # wdir() or nullrev? |
|
613 | if rev is None or rev < 0: # wdir() or nullrev? | |
610 | return None |
|
614 | return None | |
611 | repo = context.resource(mapping, b'repo') |
|
615 | repo = context.resource(mapping, b'repo') | |
612 | return rev - len(repo) |
|
616 | return rev - len(repo) | |
613 |
|
617 | |||
614 |
|
618 | |||
615 | @templatekeyword(b'node', requires={b'ctx'}) |
|
619 | @templatekeyword(b'node', requires={b'ctx'}) | |
616 | def shownode(context, mapping): |
|
620 | def shownode(context, mapping): | |
617 | """String. The changeset identification hash, as a 40 hexadecimal |
|
621 | """String. The changeset identification hash, as a 40 hexadecimal | |
618 | digit string. |
|
622 | digit string. | |
619 | """ |
|
623 | """ | |
620 | ctx = context.resource(mapping, b'ctx') |
|
624 | ctx = context.resource(mapping, b'ctx') | |
621 | return ctx.hex() |
|
625 | return ctx.hex() | |
622 |
|
626 | |||
623 |
|
627 | |||
624 | @templatekeyword(b'obsolete', requires={b'ctx'}) |
|
628 | @templatekeyword(b'obsolete', requires={b'ctx'}) | |
625 | def showobsolete(context, mapping): |
|
629 | def showobsolete(context, mapping): | |
626 | """String. Whether the changeset is obsolete. (EXPERIMENTAL)""" |
|
630 | """String. Whether the changeset is obsolete. (EXPERIMENTAL)""" | |
627 | ctx = context.resource(mapping, b'ctx') |
|
631 | ctx = context.resource(mapping, b'ctx') | |
628 | if ctx.obsolete(): |
|
632 | if ctx.obsolete(): | |
629 | return b'obsolete' |
|
633 | return b'obsolete' | |
630 | return b'' |
|
634 | return b'' | |
631 |
|
635 | |||
632 |
|
636 | |||
633 | @templatekeyword(b'path', requires={b'fctx'}) |
|
637 | @templatekeyword(b'path', requires={b'fctx'}) | |
634 | def showpath(context, mapping): |
|
638 | def showpath(context, mapping): | |
635 | """String. Repository-absolute path of the current file. (EXPERIMENTAL)""" |
|
639 | """String. Repository-absolute path of the current file. (EXPERIMENTAL)""" | |
636 | fctx = context.resource(mapping, b'fctx') |
|
640 | fctx = context.resource(mapping, b'fctx') | |
637 | return fctx.path() |
|
641 | return fctx.path() | |
638 |
|
642 | |||
639 |
|
643 | |||
640 | @templatekeyword(b'peerurls', requires={b'repo'}) |
|
644 | @templatekeyword(b'peerurls', requires={b'repo'}) | |
641 | def showpeerurls(context, mapping): |
|
645 | def showpeerurls(context, mapping): | |
642 | """A dictionary of repository locations defined in the [paths] section |
|
646 | """A dictionary of repository locations defined in the [paths] section | |
643 | of your configuration file.""" |
|
647 | of your configuration file.""" | |
644 | repo = context.resource(mapping, b'repo') |
|
648 | repo = context.resource(mapping, b'repo') | |
645 | # see commands.paths() for naming of dictionary keys |
|
649 | # see commands.paths() for naming of dictionary keys | |
646 | paths = repo.ui.paths |
|
650 | paths = repo.ui.paths | |
647 | urls = util.sortdict( |
|
651 | urls = util.sortdict( | |
648 | (k, p.rawloc) for k, p in sorted(pycompat.iteritems(paths)) |
|
652 | (k, p.rawloc) for k, p in sorted(pycompat.iteritems(paths)) | |
649 | ) |
|
653 | ) | |
650 |
|
654 | |||
651 | def makemap(k): |
|
655 | def makemap(k): | |
652 | p = paths[k] |
|
656 | p = paths[k] | |
653 | d = {b'name': k, b'url': p.rawloc} |
|
657 | d = {b'name': k, b'url': p.rawloc} | |
654 | d.update((o, v) for o, v in sorted(pycompat.iteritems(p.suboptions))) |
|
658 | d.update((o, v) for o, v in sorted(pycompat.iteritems(p.suboptions))) | |
655 | return d |
|
659 | return d | |
656 |
|
660 | |||
657 | return _hybrid(None, urls, makemap, lambda k: b'%s=%s' % (k, urls[k])) |
|
661 | return _hybrid(None, urls, makemap, lambda k: b'%s=%s' % (k, urls[k])) | |
658 |
|
662 | |||
659 |
|
663 | |||
660 | @templatekeyword(b"predecessors", requires={b'repo', b'ctx'}) |
|
664 | @templatekeyword(b"predecessors", requires={b'repo', b'ctx'}) | |
661 | def showpredecessors(context, mapping): |
|
665 | def showpredecessors(context, mapping): | |
662 | """Returns the list of the closest visible predecessors. (EXPERIMENTAL)""" |
|
666 | """Returns the list of the closest visible predecessors. (EXPERIMENTAL)""" | |
663 | repo = context.resource(mapping, b'repo') |
|
667 | repo = context.resource(mapping, b'repo') | |
664 | ctx = context.resource(mapping, b'ctx') |
|
668 | ctx = context.resource(mapping, b'ctx') | |
665 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) |
|
669 | predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node())) | |
666 | predecessors = pycompat.maplist(hex, predecessors) |
|
670 | predecessors = pycompat.maplist(hex, predecessors) | |
667 |
|
671 | |||
668 | return _hybrid( |
|
672 | return _hybrid( | |
669 | None, |
|
673 | None, | |
670 | predecessors, |
|
674 | predecessors, | |
671 | lambda x: {b'ctx': repo[x]}, |
|
675 | lambda x: {b'ctx': repo[x]}, | |
672 | lambda x: scmutil.formatchangeid(repo[x]), |
|
676 | lambda x: scmutil.formatchangeid(repo[x]), | |
673 | ) |
|
677 | ) | |
674 |
|
678 | |||
675 |
|
679 | |||
676 | @templatekeyword(b'reporoot', requires={b'repo'}) |
|
680 | @templatekeyword(b'reporoot', requires={b'repo'}) | |
677 | def showreporoot(context, mapping): |
|
681 | def showreporoot(context, mapping): | |
678 | """String. The root directory of the current repository.""" |
|
682 | """String. The root directory of the current repository.""" | |
679 | repo = context.resource(mapping, b'repo') |
|
683 | repo = context.resource(mapping, b'repo') | |
680 | return repo.root |
|
684 | return repo.root | |
681 |
|
685 | |||
682 |
|
686 | |||
683 | @templatekeyword(b'size', requires={b'fctx'}) |
|
687 | @templatekeyword(b'size', requires={b'fctx'}) | |
684 | def showsize(context, mapping): |
|
688 | def showsize(context, mapping): | |
685 | """Integer. Size of the current file in bytes. (EXPERIMENTAL)""" |
|
689 | """Integer. Size of the current file in bytes. (EXPERIMENTAL)""" | |
686 | fctx = context.resource(mapping, b'fctx') |
|
690 | fctx = context.resource(mapping, b'fctx') | |
687 | return fctx.size() |
|
691 | return fctx.size() | |
688 |
|
692 | |||
689 |
|
693 | |||
690 | # requires 'fctx' to denote {status} depends on (ctx, path) pair |
|
694 | # requires 'fctx' to denote {status} depends on (ctx, path) pair | |
691 | @templatekeyword(b'status', requires={b'ctx', b'fctx', b'revcache'}) |
|
695 | @templatekeyword(b'status', requires={b'ctx', b'fctx', b'revcache'}) | |
692 | def showstatus(context, mapping): |
|
696 | def showstatus(context, mapping): | |
693 | """String. Status code of the current file. (EXPERIMENTAL)""" |
|
697 | """String. Status code of the current file. (EXPERIMENTAL)""" | |
694 | path = templateutil.runsymbol(context, mapping, b'path') |
|
698 | path = templateutil.runsymbol(context, mapping, b'path') | |
695 | path = templateutil.stringify(context, mapping, path) |
|
699 | path = templateutil.stringify(context, mapping, path) | |
696 | if not path: |
|
700 | if not path: | |
697 | return |
|
701 | return | |
698 | statmap = _getfilestatusmap(context, mapping) |
|
702 | statmap = _getfilestatusmap(context, mapping) | |
699 | if path not in statmap: |
|
703 | if path not in statmap: | |
700 | statmap = _getfilestatusmap(context, mapping, listall=True) |
|
704 | statmap = _getfilestatusmap(context, mapping, listall=True) | |
701 | return statmap.get(path) |
|
705 | return statmap.get(path) | |
702 |
|
706 | |||
703 |
|
707 | |||
704 | @templatekeyword(b"successorssets", requires={b'repo', b'ctx'}) |
|
708 | @templatekeyword(b"successorssets", requires={b'repo', b'ctx'}) | |
705 | def showsuccessorssets(context, mapping): |
|
709 | def showsuccessorssets(context, mapping): | |
706 | """Returns a string of sets of successors for a changectx. Format used |
|
710 | """Returns a string of sets of successors for a changectx. Format used | |
707 | is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2 |
|
711 | is: [ctx1, ctx2], [ctx3] if ctx has been split into ctx1 and ctx2 | |
708 | while also diverged into ctx3. (EXPERIMENTAL)""" |
|
712 | while also diverged into ctx3. (EXPERIMENTAL)""" | |
709 | repo = context.resource(mapping, b'repo') |
|
713 | repo = context.resource(mapping, b'repo') | |
710 | ctx = context.resource(mapping, b'ctx') |
|
714 | ctx = context.resource(mapping, b'ctx') | |
711 | if not ctx.obsolete(): |
|
715 | if not ctx.obsolete(): | |
712 | return b'' |
|
716 | return b'' | |
713 |
|
717 | |||
714 | ssets = obsutil.successorssets(repo, ctx.node(), closest=True) |
|
718 | ssets = obsutil.successorssets(repo, ctx.node(), closest=True) | |
715 | ssets = [[hex(n) for n in ss] for ss in ssets] |
|
719 | ssets = [[hex(n) for n in ss] for ss in ssets] | |
716 |
|
720 | |||
717 | data = [] |
|
721 | data = [] | |
718 | for ss in ssets: |
|
722 | for ss in ssets: | |
719 | h = _hybrid( |
|
723 | h = _hybrid( | |
720 | None, |
|
724 | None, | |
721 | ss, |
|
725 | ss, | |
722 | lambda x: {b'ctx': repo[x]}, |
|
726 | lambda x: {b'ctx': repo[x]}, | |
723 | lambda x: scmutil.formatchangeid(repo[x]), |
|
727 | lambda x: scmutil.formatchangeid(repo[x]), | |
724 | ) |
|
728 | ) | |
725 | data.append(h) |
|
729 | data.append(h) | |
726 |
|
730 | |||
727 | # Format the successorssets |
|
731 | # Format the successorssets | |
728 | def render(d): |
|
732 | def render(d): | |
729 | return templateutil.stringify(context, mapping, d) |
|
733 | return templateutil.stringify(context, mapping, d) | |
730 |
|
734 | |||
731 | def gen(data): |
|
735 | def gen(data): | |
732 | yield b"; ".join(render(d) for d in data) |
|
736 | yield b"; ".join(render(d) for d in data) | |
733 |
|
737 | |||
734 | return _hybrid( |
|
738 | return _hybrid( | |
735 | gen(data), data, lambda x: {b'successorset': x}, pycompat.identity |
|
739 | gen(data), data, lambda x: {b'successorset': x}, pycompat.identity | |
736 | ) |
|
740 | ) | |
737 |
|
741 | |||
738 |
|
742 | |||
739 | @templatekeyword(b"succsandmarkers", requires={b'repo', b'ctx'}) |
|
743 | @templatekeyword(b"succsandmarkers", requires={b'repo', b'ctx'}) | |
740 | def showsuccsandmarkers(context, mapping): |
|
744 | def showsuccsandmarkers(context, mapping): | |
741 | """Returns a list of dict for each final successor of ctx. The dict |
|
745 | """Returns a list of dict for each final successor of ctx. The dict | |
742 | contains successors node id in "successors" keys and the list of |
|
746 | contains successors node id in "successors" keys and the list of | |
743 | obs-markers from ctx to the set of successors in "markers". |
|
747 | obs-markers from ctx to the set of successors in "markers". | |
744 | (EXPERIMENTAL) |
|
748 | (EXPERIMENTAL) | |
745 | """ |
|
749 | """ | |
746 | repo = context.resource(mapping, b'repo') |
|
750 | repo = context.resource(mapping, b'repo') | |
747 | ctx = context.resource(mapping, b'ctx') |
|
751 | ctx = context.resource(mapping, b'ctx') | |
748 |
|
752 | |||
749 | values = obsutil.successorsandmarkers(repo, ctx) |
|
753 | values = obsutil.successorsandmarkers(repo, ctx) | |
750 |
|
754 | |||
751 | if values is None: |
|
755 | if values is None: | |
752 | values = [] |
|
756 | values = [] | |
753 |
|
757 | |||
754 | # Format successors and markers to avoid exposing binary to templates |
|
758 | # Format successors and markers to avoid exposing binary to templates | |
755 | data = [] |
|
759 | data = [] | |
756 | for i in values: |
|
760 | for i in values: | |
757 | # Format successors |
|
761 | # Format successors | |
758 | successors = i[b'successors'] |
|
762 | successors = i[b'successors'] | |
759 |
|
763 | |||
760 | successors = [hex(n) for n in successors] |
|
764 | successors = [hex(n) for n in successors] | |
761 | successors = _hybrid( |
|
765 | successors = _hybrid( | |
762 | None, |
|
766 | None, | |
763 | successors, |
|
767 | successors, | |
764 | lambda x: {b'ctx': repo[x]}, |
|
768 | lambda x: {b'ctx': repo[x]}, | |
765 | lambda x: scmutil.formatchangeid(repo[x]), |
|
769 | lambda x: scmutil.formatchangeid(repo[x]), | |
766 | ) |
|
770 | ) | |
767 |
|
771 | |||
768 | # Format markers |
|
772 | # Format markers | |
769 | finalmarkers = [] |
|
773 | finalmarkers = [] | |
770 | for m in i[b'markers']: |
|
774 | for m in i[b'markers']: | |
771 | hexprec = hex(m[0]) |
|
775 | hexprec = hex(m[0]) | |
772 | hexsucs = tuple(hex(n) for n in m[1]) |
|
776 | hexsucs = tuple(hex(n) for n in m[1]) | |
773 | hexparents = None |
|
777 | hexparents = None | |
774 | if m[5] is not None: |
|
778 | if m[5] is not None: | |
775 | hexparents = tuple(hex(n) for n in m[5]) |
|
779 | hexparents = tuple(hex(n) for n in m[5]) | |
776 | newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] |
|
780 | newmarker = (hexprec, hexsucs) + m[2:5] + (hexparents,) + m[6:] | |
777 | finalmarkers.append(newmarker) |
|
781 | finalmarkers.append(newmarker) | |
778 |
|
782 | |||
779 | data.append({b'successors': successors, b'markers': finalmarkers}) |
|
783 | data.append({b'successors': successors, b'markers': finalmarkers}) | |
780 |
|
784 | |||
781 | return templateutil.mappinglist(data) |
|
785 | return templateutil.mappinglist(data) | |
782 |
|
786 | |||
783 |
|
787 | |||
784 | @templatekeyword(b'p1', requires={b'ctx'}) |
|
788 | @templatekeyword(b'p1', requires={b'ctx'}) | |
785 | def showp1(context, mapping): |
|
789 | def showp1(context, mapping): | |
786 | """Changeset. The changeset's first parent. ``{p1.rev}`` for the revision |
|
790 | """Changeset. The changeset's first parent. ``{p1.rev}`` for the revision | |
787 | number, and ``{p1.node}`` for the identification hash.""" |
|
791 | number, and ``{p1.node}`` for the identification hash.""" | |
788 | ctx = context.resource(mapping, b'ctx') |
|
792 | ctx = context.resource(mapping, b'ctx') | |
789 | return templateutil.mappingdict({b'ctx': ctx.p1()}, tmpl=_changeidtmpl) |
|
793 | return templateutil.mappingdict({b'ctx': ctx.p1()}, tmpl=_changeidtmpl) | |
790 |
|
794 | |||
791 |
|
795 | |||
792 | @templatekeyword(b'p2', requires={b'ctx'}) |
|
796 | @templatekeyword(b'p2', requires={b'ctx'}) | |
793 | def showp2(context, mapping): |
|
797 | def showp2(context, mapping): | |
794 | """Changeset. The changeset's second parent. ``{p2.rev}`` for the revision |
|
798 | """Changeset. The changeset's second parent. ``{p2.rev}`` for the revision | |
795 | number, and ``{p2.node}`` for the identification hash.""" |
|
799 | number, and ``{p2.node}`` for the identification hash.""" | |
796 | ctx = context.resource(mapping, b'ctx') |
|
800 | ctx = context.resource(mapping, b'ctx') | |
797 | return templateutil.mappingdict({b'ctx': ctx.p2()}, tmpl=_changeidtmpl) |
|
801 | return templateutil.mappingdict({b'ctx': ctx.p2()}, tmpl=_changeidtmpl) | |
798 |
|
802 | |||
799 |
|
803 | |||
800 | @templatekeyword(b'p1rev', requires={b'ctx'}) |
|
804 | @templatekeyword(b'p1rev', requires={b'ctx'}) | |
801 | def showp1rev(context, mapping): |
|
805 | def showp1rev(context, mapping): | |
802 | """Integer. The repository-local revision number of the changeset's |
|
806 | """Integer. The repository-local revision number of the changeset's | |
803 | first parent, or -1 if the changeset has no parents. (DEPRECATED)""" |
|
807 | first parent, or -1 if the changeset has no parents. (DEPRECATED)""" | |
804 | ctx = context.resource(mapping, b'ctx') |
|
808 | ctx = context.resource(mapping, b'ctx') | |
805 | return ctx.p1().rev() |
|
809 | return ctx.p1().rev() | |
806 |
|
810 | |||
807 |
|
811 | |||
808 | @templatekeyword(b'p2rev', requires={b'ctx'}) |
|
812 | @templatekeyword(b'p2rev', requires={b'ctx'}) | |
809 | def showp2rev(context, mapping): |
|
813 | def showp2rev(context, mapping): | |
810 | """Integer. The repository-local revision number of the changeset's |
|
814 | """Integer. The repository-local revision number of the changeset's | |
811 | second parent, or -1 if the changeset has no second parent. (DEPRECATED)""" |
|
815 | second parent, or -1 if the changeset has no second parent. (DEPRECATED)""" | |
812 | ctx = context.resource(mapping, b'ctx') |
|
816 | ctx = context.resource(mapping, b'ctx') | |
813 | return ctx.p2().rev() |
|
817 | return ctx.p2().rev() | |
814 |
|
818 | |||
815 |
|
819 | |||
816 | @templatekeyword(b'p1node', requires={b'ctx'}) |
|
820 | @templatekeyword(b'p1node', requires={b'ctx'}) | |
817 | def showp1node(context, mapping): |
|
821 | def showp1node(context, mapping): | |
818 | """String. The identification hash of the changeset's first parent, |
|
822 | """String. The identification hash of the changeset's first parent, | |
819 | as a 40 digit hexadecimal string. If the changeset has no parents, all |
|
823 | as a 40 digit hexadecimal string. If the changeset has no parents, all | |
820 | digits are 0. (DEPRECATED)""" |
|
824 | digits are 0. (DEPRECATED)""" | |
821 | ctx = context.resource(mapping, b'ctx') |
|
825 | ctx = context.resource(mapping, b'ctx') | |
822 | return ctx.p1().hex() |
|
826 | return ctx.p1().hex() | |
823 |
|
827 | |||
824 |
|
828 | |||
825 | @templatekeyword(b'p2node', requires={b'ctx'}) |
|
829 | @templatekeyword(b'p2node', requires={b'ctx'}) | |
826 | def showp2node(context, mapping): |
|
830 | def showp2node(context, mapping): | |
827 | """String. The identification hash of the changeset's second |
|
831 | """String. The identification hash of the changeset's second | |
828 | parent, as a 40 digit hexadecimal string. If the changeset has no second |
|
832 | parent, as a 40 digit hexadecimal string. If the changeset has no second | |
829 | parent, all digits are 0. (DEPRECATED)""" |
|
833 | parent, all digits are 0. (DEPRECATED)""" | |
830 | ctx = context.resource(mapping, b'ctx') |
|
834 | ctx = context.resource(mapping, b'ctx') | |
831 | return ctx.p2().hex() |
|
835 | return ctx.p2().hex() | |
832 |
|
836 | |||
833 |
|
837 | |||
834 | @templatekeyword(b'parents', requires={b'repo', b'ctx'}) |
|
838 | @templatekeyword(b'parents', requires={b'repo', b'ctx'}) | |
835 | def showparents(context, mapping): |
|
839 | def showparents(context, mapping): | |
836 | """List of strings. The parents of the changeset in "rev:node" |
|
840 | """List of strings. The parents of the changeset in "rev:node" | |
837 | format. If the changeset has only one "natural" parent (the predecessor |
|
841 | format. If the changeset has only one "natural" parent (the predecessor | |
838 | revision) nothing is shown.""" |
|
842 | revision) nothing is shown.""" | |
839 | repo = context.resource(mapping, b'repo') |
|
843 | repo = context.resource(mapping, b'repo') | |
840 | ctx = context.resource(mapping, b'ctx') |
|
844 | ctx = context.resource(mapping, b'ctx') | |
841 | pctxs = scmutil.meaningfulparents(repo, ctx) |
|
845 | pctxs = scmutil.meaningfulparents(repo, ctx) | |
842 | prevs = [p.rev() for p in pctxs] |
|
846 | prevs = [p.rev() for p in pctxs] | |
843 | parents = [ |
|
847 | parents = [ | |
844 | [(b'rev', p.rev()), (b'node', p.hex()), (b'phase', p.phasestr())] |
|
848 | [(b'rev', p.rev()), (b'node', p.hex()), (b'phase', p.phasestr())] | |
845 | for p in pctxs |
|
849 | for p in pctxs | |
846 | ] |
|
850 | ] | |
847 | f = _showcompatlist(context, mapping, b'parent', parents) |
|
851 | f = _showcompatlist(context, mapping, b'parent', parents) | |
848 | return _hybrid( |
|
852 | return _hybrid( | |
849 | f, |
|
853 | f, | |
850 | prevs, |
|
854 | prevs, | |
851 | lambda x: {b'ctx': repo[x]}, |
|
855 | lambda x: {b'ctx': repo[x]}, | |
852 | lambda x: scmutil.formatchangeid(repo[x]), |
|
856 | lambda x: scmutil.formatchangeid(repo[x]), | |
853 | keytype=int, |
|
857 | keytype=int, | |
854 | ) |
|
858 | ) | |
855 |
|
859 | |||
856 |
|
860 | |||
857 | @templatekeyword(b'phase', requires={b'ctx'}) |
|
861 | @templatekeyword(b'phase', requires={b'ctx'}) | |
858 | def showphase(context, mapping): |
|
862 | def showphase(context, mapping): | |
859 | """String. The changeset phase name.""" |
|
863 | """String. The changeset phase name.""" | |
860 | ctx = context.resource(mapping, b'ctx') |
|
864 | ctx = context.resource(mapping, b'ctx') | |
861 | return ctx.phasestr() |
|
865 | return ctx.phasestr() | |
862 |
|
866 | |||
863 |
|
867 | |||
864 | @templatekeyword(b'phaseidx', requires={b'ctx'}) |
|
868 | @templatekeyword(b'phaseidx', requires={b'ctx'}) | |
865 | def showphaseidx(context, mapping): |
|
869 | def showphaseidx(context, mapping): | |
866 | """Integer. The changeset phase index. (ADVANCED)""" |
|
870 | """Integer. The changeset phase index. (ADVANCED)""" | |
867 | ctx = context.resource(mapping, b'ctx') |
|
871 | ctx = context.resource(mapping, b'ctx') | |
868 | return ctx.phase() |
|
872 | return ctx.phase() | |
869 |
|
873 | |||
870 |
|
874 | |||
871 | @templatekeyword(b'rev', requires={b'ctx'}) |
|
875 | @templatekeyword(b'rev', requires={b'ctx'}) | |
872 | def showrev(context, mapping): |
|
876 | def showrev(context, mapping): | |
873 | """Integer. The repository-local changeset revision number.""" |
|
877 | """Integer. The repository-local changeset revision number.""" | |
874 | ctx = context.resource(mapping, b'ctx') |
|
878 | ctx = context.resource(mapping, b'ctx') | |
875 | return scmutil.intrev(ctx) |
|
879 | return scmutil.intrev(ctx) | |
876 |
|
880 | |||
877 |
|
881 | |||
878 | @templatekeyword(b'subrepos', requires={b'ctx'}) |
|
882 | @templatekeyword(b'subrepos', requires={b'ctx'}) | |
879 | def showsubrepos(context, mapping): |
|
883 | def showsubrepos(context, mapping): | |
880 | """List of strings. Updated subrepositories in the changeset.""" |
|
884 | """List of strings. Updated subrepositories in the changeset.""" | |
881 | ctx = context.resource(mapping, b'ctx') |
|
885 | ctx = context.resource(mapping, b'ctx') | |
882 | substate = ctx.substate |
|
886 | substate = ctx.substate | |
883 | if not substate: |
|
887 | if not substate: | |
884 | return compatlist(context, mapping, b'subrepo', []) |
|
888 | return compatlist(context, mapping, b'subrepo', []) | |
885 | psubstate = ctx.p1().substate or {} |
|
889 | psubstate = ctx.p1().substate or {} | |
886 | subrepos = [] |
|
890 | subrepos = [] | |
887 | for sub in substate: |
|
891 | for sub in substate: | |
888 | if sub not in psubstate or substate[sub] != psubstate[sub]: |
|
892 | if sub not in psubstate or substate[sub] != psubstate[sub]: | |
889 | subrepos.append(sub) # modified or newly added in ctx |
|
893 | subrepos.append(sub) # modified or newly added in ctx | |
890 | for sub in psubstate: |
|
894 | for sub in psubstate: | |
891 | if sub not in substate: |
|
895 | if sub not in substate: | |
892 | subrepos.append(sub) # removed in ctx |
|
896 | subrepos.append(sub) # removed in ctx | |
893 | return compatlist(context, mapping, b'subrepo', sorted(subrepos)) |
|
897 | return compatlist(context, mapping, b'subrepo', sorted(subrepos)) | |
894 |
|
898 | |||
895 |
|
899 | |||
896 | # don't remove "showtags" definition, even though namespaces will put |
|
900 | # don't remove "showtags" definition, even though namespaces will put | |
897 | # a helper function for "tags" keyword into "keywords" map automatically, |
|
901 | # a helper function for "tags" keyword into "keywords" map automatically, | |
898 | # because online help text is built without namespaces initialization |
|
902 | # because online help text is built without namespaces initialization | |
899 | @templatekeyword(b'tags', requires={b'repo', b'ctx'}) |
|
903 | @templatekeyword(b'tags', requires={b'repo', b'ctx'}) | |
900 | def showtags(context, mapping): |
|
904 | def showtags(context, mapping): | |
901 | """List of strings. Any tags associated with the changeset.""" |
|
905 | """List of strings. Any tags associated with the changeset.""" | |
902 | return shownames(context, mapping, b'tags') |
|
906 | return shownames(context, mapping, b'tags') | |
903 |
|
907 | |||
904 |
|
908 | |||
905 | @templatekeyword(b'termwidth', requires={b'ui'}) |
|
909 | @templatekeyword(b'termwidth', requires={b'ui'}) | |
906 | def showtermwidth(context, mapping): |
|
910 | def showtermwidth(context, mapping): | |
907 | """Integer. The width of the current terminal.""" |
|
911 | """Integer. The width of the current terminal.""" | |
908 | ui = context.resource(mapping, b'ui') |
|
912 | ui = context.resource(mapping, b'ui') | |
909 | return ui.termwidth() |
|
913 | return ui.termwidth() | |
910 |
|
914 | |||
911 |
|
915 | |||
912 | @templatekeyword(b'user', requires={b'ctx'}) |
|
916 | @templatekeyword(b'user', requires={b'ctx'}) | |
913 | def showuser(context, mapping): |
|
917 | def showuser(context, mapping): | |
914 | """String. The unmodified author of the changeset.""" |
|
918 | """String. The unmodified author of the changeset.""" | |
915 | ctx = context.resource(mapping, b'ctx') |
|
919 | ctx = context.resource(mapping, b'ctx') | |
916 | return ctx.user() |
|
920 | return ctx.user() | |
917 |
|
921 | |||
918 |
|
922 | |||
919 | @templatekeyword(b'instabilities', requires={b'ctx'}) |
|
923 | @templatekeyword(b'instabilities', requires={b'ctx'}) | |
920 | def showinstabilities(context, mapping): |
|
924 | def showinstabilities(context, mapping): | |
921 | """List of strings. Evolution instabilities affecting the changeset. |
|
925 | """List of strings. Evolution instabilities affecting the changeset. | |
922 | (EXPERIMENTAL) |
|
926 | (EXPERIMENTAL) | |
923 | """ |
|
927 | """ | |
924 | ctx = context.resource(mapping, b'ctx') |
|
928 | ctx = context.resource(mapping, b'ctx') | |
925 | return compatlist( |
|
929 | return compatlist( | |
926 | context, |
|
930 | context, | |
927 | mapping, |
|
931 | mapping, | |
928 | b'instability', |
|
932 | b'instability', | |
929 | ctx.instabilities(), |
|
933 | ctx.instabilities(), | |
930 | plural=b'instabilities', |
|
934 | plural=b'instabilities', | |
931 | ) |
|
935 | ) | |
932 |
|
936 | |||
933 |
|
937 | |||
934 | @templatekeyword(b'verbosity', requires={b'ui'}) |
|
938 | @templatekeyword(b'verbosity', requires={b'ui'}) | |
935 | def showverbosity(context, mapping): |
|
939 | def showverbosity(context, mapping): | |
936 | """String. The current output verbosity in 'debug', 'quiet', 'verbose', |
|
940 | """String. The current output verbosity in 'debug', 'quiet', 'verbose', | |
937 | or ''.""" |
|
941 | or ''.""" | |
938 | ui = context.resource(mapping, b'ui') |
|
942 | ui = context.resource(mapping, b'ui') | |
939 | # see logcmdutil.changesettemplater for priority of these flags |
|
943 | # see logcmdutil.changesettemplater for priority of these flags | |
940 | if ui.debugflag: |
|
944 | if ui.debugflag: | |
941 | return b'debug' |
|
945 | return b'debug' | |
942 | elif ui.quiet: |
|
946 | elif ui.quiet: | |
943 | return b'quiet' |
|
947 | return b'quiet' | |
944 | elif ui.verbose: |
|
948 | elif ui.verbose: | |
945 | return b'verbose' |
|
949 | return b'verbose' | |
946 | return b'' |
|
950 | return b'' | |
947 |
|
951 | |||
948 |
|
952 | |||
949 | @templatekeyword(b'whyunstable', requires={b'repo', b'ctx'}) |
|
953 | @templatekeyword(b'whyunstable', requires={b'repo', b'ctx'}) | |
950 | def showwhyunstable(context, mapping): |
|
954 | def showwhyunstable(context, mapping): | |
951 | """List of dicts explaining all instabilities of a changeset. |
|
955 | """List of dicts explaining all instabilities of a changeset. | |
952 | (EXPERIMENTAL) |
|
956 | (EXPERIMENTAL) | |
953 | """ |
|
957 | """ | |
954 | repo = context.resource(mapping, b'repo') |
|
958 | repo = context.resource(mapping, b'repo') | |
955 | ctx = context.resource(mapping, b'ctx') |
|
959 | ctx = context.resource(mapping, b'ctx') | |
956 |
|
960 | |||
957 | def formatnode(ctx): |
|
961 | def formatnode(ctx): | |
958 | return b'%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr()) |
|
962 | return b'%s (%s)' % (scmutil.formatchangeid(ctx), ctx.phasestr()) | |
959 |
|
963 | |||
960 | entries = obsutil.whyunstable(repo, ctx) |
|
964 | entries = obsutil.whyunstable(repo, ctx) | |
961 |
|
965 | |||
962 | for entry in entries: |
|
966 | for entry in entries: | |
963 | if entry.get(b'divergentnodes'): |
|
967 | if entry.get(b'divergentnodes'): | |
964 | dnodes = entry[b'divergentnodes'] |
|
968 | dnodes = entry[b'divergentnodes'] | |
965 | dnhybrid = _hybrid( |
|
969 | dnhybrid = _hybrid( | |
966 | None, |
|
970 | None, | |
967 | [dnode.hex() for dnode in dnodes], |
|
971 | [dnode.hex() for dnode in dnodes], | |
968 | lambda x: {b'ctx': repo[x]}, |
|
972 | lambda x: {b'ctx': repo[x]}, | |
969 | lambda x: formatnode(repo[x]), |
|
973 | lambda x: formatnode(repo[x]), | |
970 | ) |
|
974 | ) | |
971 | entry[b'divergentnodes'] = dnhybrid |
|
975 | entry[b'divergentnodes'] = dnhybrid | |
972 |
|
976 | |||
973 | tmpl = ( |
|
977 | tmpl = ( | |
974 | b'{instability}:{if(divergentnodes, " ")}{divergentnodes} ' |
|
978 | b'{instability}:{if(divergentnodes, " ")}{divergentnodes} ' | |
975 | b'{reason} {node|short}' |
|
979 | b'{reason} {node|short}' | |
976 | ) |
|
980 | ) | |
977 | return templateutil.mappinglist(entries, tmpl=tmpl, sep=b'\n') |
|
981 | return templateutil.mappinglist(entries, tmpl=tmpl, sep=b'\n') | |
978 |
|
982 | |||
979 |
|
983 | |||
980 | def loadkeyword(ui, extname, registrarobj): |
|
984 | def loadkeyword(ui, extname, registrarobj): | |
981 | """Load template keyword from specified registrarobj |
|
985 | """Load template keyword from specified registrarobj | |
982 | """ |
|
986 | """ | |
983 | for name, func in pycompat.iteritems(registrarobj._table): |
|
987 | for name, func in pycompat.iteritems(registrarobj._table): | |
984 | keywords[name] = func |
|
988 | keywords[name] = func | |
985 |
|
989 | |||
986 |
|
990 | |||
987 | # tell hggettext to extract docstrings from these functions: |
|
991 | # tell hggettext to extract docstrings from these functions: | |
988 | i18nfunctions = keywords.values() |
|
992 | i18nfunctions = keywords.values() |
@@ -1,2776 +1,2790 | |||||
1 | Log on empty repository: checking consistency |
|
1 | Log on empty repository: checking consistency | |
2 |
|
2 | |||
3 | $ hg init empty |
|
3 | $ hg init empty | |
4 | $ cd empty |
|
4 | $ cd empty | |
5 | $ hg log |
|
5 | $ hg log | |
6 | $ hg log -r 1 |
|
6 | $ hg log -r 1 | |
7 | abort: unknown revision '1'! |
|
7 | abort: unknown revision '1'! | |
8 | [255] |
|
8 | [255] | |
9 | $ hg log -r -1:0 |
|
9 | $ hg log -r -1:0 | |
10 | abort: unknown revision '-1'! |
|
10 | abort: unknown revision '-1'! | |
11 | [255] |
|
11 | [255] | |
12 | $ hg log -r 'branch(name)' |
|
12 | $ hg log -r 'branch(name)' | |
13 | abort: unknown revision 'name'! |
|
13 | abort: unknown revision 'name'! | |
14 | [255] |
|
14 | [255] | |
15 | $ hg log -r null -q |
|
15 | $ hg log -r null -q | |
16 | -1:000000000000 |
|
16 | -1:000000000000 | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 |
|
19 | |||
20 | The g is crafted to have 2 filelog topological heads in a linear |
|
20 | The g is crafted to have 2 filelog topological heads in a linear | |
21 | changeset graph |
|
21 | changeset graph | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
25 | $ echo a > a |
|
25 | $ echo a > a | |
26 | $ echo f > f |
|
26 | $ echo f > f | |
27 | $ hg ci -Ama -d '1 0' |
|
27 | $ hg ci -Ama -d '1 0' | |
28 | adding a |
|
28 | adding a | |
29 | adding f |
|
29 | adding f | |
30 |
|
30 | |||
31 | $ hg cp a b |
|
31 | $ hg cp a b | |
32 | $ hg cp f g |
|
32 | $ hg cp f g | |
33 | $ hg ci -mb -d '2 0' |
|
33 | $ hg ci -mb -d '2 0' | |
34 |
|
34 | |||
35 | $ mkdir dir |
|
35 | $ mkdir dir | |
36 | $ hg mv b dir |
|
36 | $ hg mv b dir | |
37 | $ echo g >> g |
|
37 | $ echo g >> g | |
38 | $ echo f >> f |
|
38 | $ echo f >> f | |
39 | $ hg ci -mc -d '3 0' |
|
39 | $ hg ci -mc -d '3 0' | |
40 |
|
40 | |||
41 | $ hg mv a b |
|
41 | $ hg mv a b | |
42 | $ hg cp -f f g |
|
42 | $ hg cp -f f g | |
43 | $ echo a > d |
|
43 | $ echo a > d | |
44 | $ hg add d |
|
44 | $ hg add d | |
45 | $ hg ci -md -d '4 0' |
|
45 | $ hg ci -md -d '4 0' | |
46 |
|
46 | |||
47 | $ hg mv dir/b e |
|
47 | $ hg mv dir/b e | |
48 | $ hg ci -me -d '5 0' |
|
48 | $ hg ci -me -d '5 0' | |
49 |
|
49 | |||
50 | Make sure largefiles doesn't interfere with logging a regular file |
|
50 | Make sure largefiles doesn't interfere with logging a regular file | |
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= | |
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
53 | updated patterns: .hglf/a, a |
|
53 | updated patterns: .hglf/a, a | |
54 | 0: a |
|
54 | 0: a | |
55 | $ hg log a |
|
55 | $ hg log a | |
56 | changeset: 0:9161b9aeaf16 |
|
56 | changeset: 0:9161b9aeaf16 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:01 1970 +0000 | |
59 | summary: a |
|
59 | summary: a | |
60 |
|
60 | |||
61 | $ hg log glob:a* |
|
61 | $ hg log glob:a* | |
62 | changeset: 3:2ca5ba701980 |
|
62 | changeset: 3:2ca5ba701980 | |
63 | user: test |
|
63 | user: test | |
64 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
64 | date: Thu Jan 01 00:00:04 1970 +0000 | |
65 | summary: d |
|
65 | summary: d | |
66 |
|
66 | |||
67 | changeset: 0:9161b9aeaf16 |
|
67 | changeset: 0:9161b9aeaf16 | |
68 | user: test |
|
68 | user: test | |
69 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
69 | date: Thu Jan 01 00:00:01 1970 +0000 | |
70 | summary: a |
|
70 | summary: a | |
71 |
|
71 | |||
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= | |
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
74 | updated patterns: glob:.hglf/a*, glob:a* |
|
74 | updated patterns: glob:.hglf/a*, glob:a* | |
75 | 3: d |
|
75 | 3: d | |
76 | 0: a |
|
76 | 0: a | |
77 |
|
77 | |||
78 | log on directory |
|
78 | log on directory | |
79 |
|
79 | |||
80 | $ hg log dir |
|
80 | $ hg log dir | |
81 | changeset: 4:7e4639b4691b |
|
81 | changeset: 4:7e4639b4691b | |
82 | tag: tip |
|
82 | tag: tip | |
83 | user: test |
|
83 | user: test | |
84 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
84 | date: Thu Jan 01 00:00:05 1970 +0000 | |
85 | summary: e |
|
85 | summary: e | |
86 |
|
86 | |||
87 | changeset: 2:f8954cd4dc1f |
|
87 | changeset: 2:f8954cd4dc1f | |
88 | user: test |
|
88 | user: test | |
89 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
89 | date: Thu Jan 01 00:00:03 1970 +0000 | |
90 | summary: c |
|
90 | summary: c | |
91 |
|
91 | |||
92 | $ hg log somethingthatdoesntexist dir |
|
92 | $ hg log somethingthatdoesntexist dir | |
93 | changeset: 4:7e4639b4691b |
|
93 | changeset: 4:7e4639b4691b | |
94 | tag: tip |
|
94 | tag: tip | |
95 | user: test |
|
95 | user: test | |
96 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
96 | date: Thu Jan 01 00:00:05 1970 +0000 | |
97 | summary: e |
|
97 | summary: e | |
98 |
|
98 | |||
99 | changeset: 2:f8954cd4dc1f |
|
99 | changeset: 2:f8954cd4dc1f | |
100 | user: test |
|
100 | user: test | |
101 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
101 | date: Thu Jan 01 00:00:03 1970 +0000 | |
102 | summary: c |
|
102 | summary: c | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | -X, with explicit path |
|
105 | -X, with explicit path | |
106 |
|
106 | |||
107 | $ hg log a -X a |
|
107 | $ hg log a -X a | |
108 |
|
108 | |||
109 | -f, non-existent directory |
|
109 | -f, non-existent directory | |
110 |
|
110 | |||
111 | $ hg log -f dir |
|
111 | $ hg log -f dir | |
112 | abort: cannot follow file not in parent revision: "dir" |
|
112 | abort: cannot follow file not in parent revision: "dir" | |
113 | [255] |
|
113 | [255] | |
114 |
|
114 | |||
115 | -f, directory |
|
115 | -f, directory | |
116 |
|
116 | |||
117 | $ hg up -q 3 |
|
117 | $ hg up -q 3 | |
118 | $ hg log -f dir |
|
118 | $ hg log -f dir | |
119 | changeset: 2:f8954cd4dc1f |
|
119 | changeset: 2:f8954cd4dc1f | |
120 | user: test |
|
120 | user: test | |
121 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:03 1970 +0000 | |
122 | summary: c |
|
122 | summary: c | |
123 |
|
123 | |||
124 | -f, directory with --patch |
|
124 | -f, directory with --patch | |
125 |
|
125 | |||
126 | $ hg log -f dir -p |
|
126 | $ hg log -f dir -p | |
127 | changeset: 2:f8954cd4dc1f |
|
127 | changeset: 2:f8954cd4dc1f | |
128 | user: test |
|
128 | user: test | |
129 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
129 | date: Thu Jan 01 00:00:03 1970 +0000 | |
130 | summary: c |
|
130 | summary: c | |
131 |
|
131 | |||
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
133 | --- /dev/null* (glob) |
|
133 | --- /dev/null* (glob) | |
134 | +++ b/dir/b* (glob) |
|
134 | +++ b/dir/b* (glob) | |
135 | @@ -0,0 +1,1 @@ |
|
135 | @@ -0,0 +1,1 @@ | |
136 | +a |
|
136 | +a | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | -f, pattern |
|
139 | -f, pattern | |
140 |
|
140 | |||
141 | $ hg log -f -I 'dir**' -p |
|
141 | $ hg log -f -I 'dir**' -p | |
142 | changeset: 2:f8954cd4dc1f |
|
142 | changeset: 2:f8954cd4dc1f | |
143 | user: test |
|
143 | user: test | |
144 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
144 | date: Thu Jan 01 00:00:03 1970 +0000 | |
145 | summary: c |
|
145 | summary: c | |
146 |
|
146 | |||
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
148 | --- /dev/null* (glob) |
|
148 | --- /dev/null* (glob) | |
149 | +++ b/dir/b* (glob) |
|
149 | +++ b/dir/b* (glob) | |
150 | @@ -0,0 +1,1 @@ |
|
150 | @@ -0,0 +1,1 @@ | |
151 | +a |
|
151 | +a | |
152 |
|
152 | |||
153 | $ hg up -q 4 |
|
153 | $ hg up -q 4 | |
154 |
|
154 | |||
155 | -f, a wrong style |
|
155 | -f, a wrong style | |
156 |
|
156 | |||
157 | $ hg log -f -l1 --style something |
|
157 | $ hg log -f -l1 --style something | |
158 | abort: style 'something' not found |
|
158 | abort: style 'something' not found | |
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
160 | [255] |
|
160 | [255] | |
161 |
|
161 | |||
162 | -f, phases style |
|
162 | -f, phases style | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | $ hg log -f -l1 --style phases |
|
165 | $ hg log -f -l1 --style phases | |
166 | changeset: 4:7e4639b4691b |
|
166 | changeset: 4:7e4639b4691b | |
167 | tag: tip |
|
167 | tag: tip | |
168 | phase: draft |
|
168 | phase: draft | |
169 | user: test |
|
169 | user: test | |
170 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:05 1970 +0000 | |
171 | summary: e |
|
171 | summary: e | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | $ hg log -f -l1 --style phases -q |
|
174 | $ hg log -f -l1 --style phases -q | |
175 | 4:7e4639b4691b |
|
175 | 4:7e4639b4691b | |
176 |
|
176 | |||
177 | -f, but no args |
|
177 | -f, but no args | |
178 |
|
178 | |||
179 | $ hg log -f |
|
179 | $ hg log -f | |
180 | changeset: 4:7e4639b4691b |
|
180 | changeset: 4:7e4639b4691b | |
181 | tag: tip |
|
181 | tag: tip | |
182 | user: test |
|
182 | user: test | |
183 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:05 1970 +0000 | |
184 | summary: e |
|
184 | summary: e | |
185 |
|
185 | |||
186 | changeset: 3:2ca5ba701980 |
|
186 | changeset: 3:2ca5ba701980 | |
187 | user: test |
|
187 | user: test | |
188 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:04 1970 +0000 | |
189 | summary: d |
|
189 | summary: d | |
190 |
|
190 | |||
191 | changeset: 2:f8954cd4dc1f |
|
191 | changeset: 2:f8954cd4dc1f | |
192 | user: test |
|
192 | user: test | |
193 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
193 | date: Thu Jan 01 00:00:03 1970 +0000 | |
194 | summary: c |
|
194 | summary: c | |
195 |
|
195 | |||
196 | changeset: 1:d89b0a12d229 |
|
196 | changeset: 1:d89b0a12d229 | |
197 | user: test |
|
197 | user: test | |
198 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:02 1970 +0000 | |
199 | summary: b |
|
199 | summary: b | |
200 |
|
200 | |||
201 | changeset: 0:9161b9aeaf16 |
|
201 | changeset: 0:9161b9aeaf16 | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:01 1970 +0000 | |
204 | summary: a |
|
204 | summary: a | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | one rename |
|
207 | one rename | |
208 |
|
208 | |||
209 | $ hg up -q 2 |
|
209 | $ hg up -q 2 | |
210 | $ hg log -vf a |
|
210 | $ hg log -vf a | |
211 | changeset: 0:9161b9aeaf16 |
|
211 | changeset: 0:9161b9aeaf16 | |
212 | user: test |
|
212 | user: test | |
213 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:01 1970 +0000 | |
214 | files: a f |
|
214 | files: a f | |
215 | description: |
|
215 | description: | |
216 | a |
|
216 | a | |
217 |
|
217 | |||
218 |
|
218 | |||
219 |
|
219 | |||
220 | many renames |
|
220 | many renames | |
221 |
|
221 | |||
222 | $ hg up -q tip |
|
222 | $ hg up -q tip | |
223 | $ hg log -vf e |
|
223 | $ hg log -vf e | |
224 | changeset: 4:7e4639b4691b |
|
224 | changeset: 4:7e4639b4691b | |
225 | tag: tip |
|
225 | tag: tip | |
226 | user: test |
|
226 | user: test | |
227 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
227 | date: Thu Jan 01 00:00:05 1970 +0000 | |
228 | files: dir/b e |
|
228 | files: dir/b e | |
229 | description: |
|
229 | description: | |
230 | e |
|
230 | e | |
231 |
|
231 | |||
232 |
|
232 | |||
233 | changeset: 2:f8954cd4dc1f |
|
233 | changeset: 2:f8954cd4dc1f | |
234 | user: test |
|
234 | user: test | |
235 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
235 | date: Thu Jan 01 00:00:03 1970 +0000 | |
236 | files: b dir/b f g |
|
236 | files: b dir/b f g | |
237 | description: |
|
237 | description: | |
238 | c |
|
238 | c | |
239 |
|
239 | |||
240 |
|
240 | |||
241 | changeset: 1:d89b0a12d229 |
|
241 | changeset: 1:d89b0a12d229 | |
242 | user: test |
|
242 | user: test | |
243 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
243 | date: Thu Jan 01 00:00:02 1970 +0000 | |
244 | files: b g |
|
244 | files: b g | |
245 | description: |
|
245 | description: | |
246 | b |
|
246 | b | |
247 |
|
247 | |||
248 |
|
248 | |||
249 | changeset: 0:9161b9aeaf16 |
|
249 | changeset: 0:9161b9aeaf16 | |
250 | user: test |
|
250 | user: test | |
251 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
251 | date: Thu Jan 01 00:00:01 1970 +0000 | |
252 | files: a f |
|
252 | files: a f | |
253 | description: |
|
253 | description: | |
254 | a |
|
254 | a | |
255 |
|
255 | |||
256 |
|
256 | |||
257 |
|
257 | |||
258 |
|
258 | |||
259 | log -pf dir/b |
|
259 | log -pf dir/b | |
260 |
|
260 | |||
261 | $ hg up -q 3 |
|
261 | $ hg up -q 3 | |
262 | $ hg log -pf dir/b |
|
262 | $ hg log -pf dir/b | |
263 | changeset: 2:f8954cd4dc1f |
|
263 | changeset: 2:f8954cd4dc1f | |
264 | user: test |
|
264 | user: test | |
265 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:03 1970 +0000 | |
266 | summary: c |
|
266 | summary: c | |
267 |
|
267 | |||
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
271 | @@ -0,0 +1,1 @@ |
|
271 | @@ -0,0 +1,1 @@ | |
272 | +a |
|
272 | +a | |
273 |
|
273 | |||
274 | changeset: 1:d89b0a12d229 |
|
274 | changeset: 1:d89b0a12d229 | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:02 1970 +0000 | |
277 | summary: b |
|
277 | summary: b | |
278 |
|
278 | |||
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
282 | @@ -0,0 +1,1 @@ |
|
282 | @@ -0,0 +1,1 @@ | |
283 | +a |
|
283 | +a | |
284 |
|
284 | |||
285 | changeset: 0:9161b9aeaf16 |
|
285 | changeset: 0:9161b9aeaf16 | |
286 | user: test |
|
286 | user: test | |
287 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
287 | date: Thu Jan 01 00:00:01 1970 +0000 | |
288 | summary: a |
|
288 | summary: a | |
289 |
|
289 | |||
290 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
290 | diff -r 000000000000 -r 9161b9aeaf16 a | |
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
293 | @@ -0,0 +1,1 @@ |
|
293 | @@ -0,0 +1,1 @@ | |
294 | +a |
|
294 | +a | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | log -pf b inside dir |
|
297 | log -pf b inside dir | |
298 |
|
298 | |||
299 | $ hg --cwd=dir log -pf b |
|
299 | $ hg --cwd=dir log -pf b | |
300 | changeset: 2:f8954cd4dc1f |
|
300 | changeset: 2:f8954cd4dc1f | |
301 | user: test |
|
301 | user: test | |
302 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:03 1970 +0000 | |
303 | summary: c |
|
303 | summary: c | |
304 |
|
304 | |||
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
308 | @@ -0,0 +1,1 @@ |
|
308 | @@ -0,0 +1,1 @@ | |
309 | +a |
|
309 | +a | |
310 |
|
310 | |||
311 | changeset: 1:d89b0a12d229 |
|
311 | changeset: 1:d89b0a12d229 | |
312 | user: test |
|
312 | user: test | |
313 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
313 | date: Thu Jan 01 00:00:02 1970 +0000 | |
314 | summary: b |
|
314 | summary: b | |
315 |
|
315 | |||
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
319 | @@ -0,0 +1,1 @@ |
|
319 | @@ -0,0 +1,1 @@ | |
320 | +a |
|
320 | +a | |
321 |
|
321 | |||
322 | changeset: 0:9161b9aeaf16 |
|
322 | changeset: 0:9161b9aeaf16 | |
323 | user: test |
|
323 | user: test | |
324 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
324 | date: Thu Jan 01 00:00:01 1970 +0000 | |
325 | summary: a |
|
325 | summary: a | |
326 |
|
326 | |||
327 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
327 | diff -r 000000000000 -r 9161b9aeaf16 a | |
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
330 | @@ -0,0 +1,1 @@ |
|
330 | @@ -0,0 +1,1 @@ | |
331 | +a |
|
331 | +a | |
332 |
|
332 | |||
333 |
|
333 | |||
334 | log -pf, but no args |
|
334 | log -pf, but no args | |
335 |
|
335 | |||
336 | $ hg log -pf |
|
336 | $ hg log -pf | |
337 | changeset: 3:2ca5ba701980 |
|
337 | changeset: 3:2ca5ba701980 | |
338 | user: test |
|
338 | user: test | |
339 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
339 | date: Thu Jan 01 00:00:04 1970 +0000 | |
340 | summary: d |
|
340 | summary: d | |
341 |
|
341 | |||
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a |
|
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a | |
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 |
|
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 | |
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
345 | @@ -1,1 +0,0 @@ |
|
345 | @@ -1,1 +0,0 @@ | |
346 | -a |
|
346 | -a | |
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b |
|
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b | |
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 |
|
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 | |
350 | @@ -0,0 +1,1 @@ |
|
350 | @@ -0,0 +1,1 @@ | |
351 | +a |
|
351 | +a | |
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
355 | @@ -0,0 +1,1 @@ |
|
355 | @@ -0,0 +1,1 @@ | |
356 | +a |
|
356 | +a | |
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
360 | @@ -1,2 +1,2 @@ |
|
360 | @@ -1,2 +1,2 @@ | |
361 | f |
|
361 | f | |
362 | -g |
|
362 | -g | |
363 | +f |
|
363 | +f | |
364 |
|
364 | |||
365 | changeset: 2:f8954cd4dc1f |
|
365 | changeset: 2:f8954cd4dc1f | |
366 | user: test |
|
366 | user: test | |
367 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
367 | date: Thu Jan 01 00:00:03 1970 +0000 | |
368 | summary: c |
|
368 | summary: c | |
369 |
|
369 | |||
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b |
|
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b | |
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 |
|
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 | |
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
373 | @@ -1,1 +0,0 @@ |
|
373 | @@ -1,1 +0,0 @@ | |
374 | -a |
|
374 | -a | |
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
378 | @@ -0,0 +1,1 @@ |
|
378 | @@ -0,0 +1,1 @@ | |
379 | +a |
|
379 | +a | |
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
383 | @@ -1,1 +1,2 @@ |
|
383 | @@ -1,1 +1,2 @@ | |
384 | f |
|
384 | f | |
385 | +f |
|
385 | +f | |
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g |
|
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g | |
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 |
|
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 | |
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 |
|
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 | |
389 | @@ -1,1 +1,2 @@ |
|
389 | @@ -1,1 +1,2 @@ | |
390 | f |
|
390 | f | |
391 | +g |
|
391 | +g | |
392 |
|
392 | |||
393 | changeset: 1:d89b0a12d229 |
|
393 | changeset: 1:d89b0a12d229 | |
394 | user: test |
|
394 | user: test | |
395 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
395 | date: Thu Jan 01 00:00:02 1970 +0000 | |
396 | summary: b |
|
396 | summary: b | |
397 |
|
397 | |||
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
401 | @@ -0,0 +1,1 @@ |
|
401 | @@ -0,0 +1,1 @@ | |
402 | +a |
|
402 | +a | |
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g |
|
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g | |
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 |
|
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 | |
406 | @@ -0,0 +1,1 @@ |
|
406 | @@ -0,0 +1,1 @@ | |
407 | +f |
|
407 | +f | |
408 |
|
408 | |||
409 | changeset: 0:9161b9aeaf16 |
|
409 | changeset: 0:9161b9aeaf16 | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:01 1970 +0000 | |
412 | summary: a |
|
412 | summary: a | |
413 |
|
413 | |||
414 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
414 | diff -r 000000000000 -r 9161b9aeaf16 a | |
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
417 | @@ -0,0 +1,1 @@ |
|
417 | @@ -0,0 +1,1 @@ | |
418 | +a |
|
418 | +a | |
419 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
419 | diff -r 000000000000 -r 9161b9aeaf16 f | |
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
422 | @@ -0,0 +1,1 @@ |
|
422 | @@ -0,0 +1,1 @@ | |
423 | +f |
|
423 | +f | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | log -vf dir/b |
|
426 | log -vf dir/b | |
427 |
|
427 | |||
428 | $ hg log -vf dir/b |
|
428 | $ hg log -vf dir/b | |
429 | changeset: 2:f8954cd4dc1f |
|
429 | changeset: 2:f8954cd4dc1f | |
430 | user: test |
|
430 | user: test | |
431 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
431 | date: Thu Jan 01 00:00:03 1970 +0000 | |
432 | files: b dir/b f g |
|
432 | files: b dir/b f g | |
433 | description: |
|
433 | description: | |
434 | c |
|
434 | c | |
435 |
|
435 | |||
436 |
|
436 | |||
437 | changeset: 1:d89b0a12d229 |
|
437 | changeset: 1:d89b0a12d229 | |
438 | user: test |
|
438 | user: test | |
439 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
439 | date: Thu Jan 01 00:00:02 1970 +0000 | |
440 | files: b g |
|
440 | files: b g | |
441 | description: |
|
441 | description: | |
442 | b |
|
442 | b | |
443 |
|
443 | |||
444 |
|
444 | |||
445 | changeset: 0:9161b9aeaf16 |
|
445 | changeset: 0:9161b9aeaf16 | |
446 | user: test |
|
446 | user: test | |
447 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
447 | date: Thu Jan 01 00:00:01 1970 +0000 | |
448 | files: a f |
|
448 | files: a f | |
449 | description: |
|
449 | description: | |
450 | a |
|
450 | a | |
451 |
|
451 | |||
452 |
|
452 | |||
453 |
|
453 | |||
454 |
|
454 | |||
455 | -f and multiple filelog heads |
|
455 | -f and multiple filelog heads | |
456 |
|
456 | |||
457 | $ hg up -q 2 |
|
457 | $ hg up -q 2 | |
458 | $ hg log -f g --template '{rev}\n' |
|
458 | $ hg log -f g --template '{rev}\n' | |
459 | 2 |
|
459 | 2 | |
460 | 1 |
|
460 | 1 | |
461 | 0 |
|
461 | 0 | |
462 | $ hg up -q tip |
|
462 | $ hg up -q tip | |
463 | $ hg log -f g --template '{rev}\n' |
|
463 | $ hg log -f g --template '{rev}\n' | |
464 | 3 |
|
464 | 3 | |
465 | 2 |
|
465 | 2 | |
466 | 0 |
|
466 | 0 | |
467 |
|
467 | |||
468 | follow files from the specified revisions (issue4959) |
|
468 | follow files from the specified revisions (issue4959) | |
469 |
|
469 | |||
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' |
|
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' | |
471 | @ 4 dir/b e, dir/b->e |
|
471 | @ 4 dir/b e, dir/b->e | |
472 | | |
|
472 | | | |
473 | o 3 a b d g, a->b f->g |
|
473 | o 3 a b d g, a->b f->g | |
474 | | |
|
474 | | | |
475 | o 2 b dir/b f g, b->dir/b |
|
475 | o 2 b dir/b f g, b->dir/b | |
476 | | |
|
476 | | | |
477 | o 1 b g, a->b f->g |
|
477 | o 1 b g, a->b f->g | |
478 | | |
|
478 | | | |
479 | o 0 a f, |
|
479 | o 0 a f, | |
480 |
|
480 | |||
481 |
|
481 | |||
482 | $ hg log -T '{rev}\n' -fr 4 e |
|
482 | $ hg log -T '{rev}\n' -fr 4 e | |
483 | 4 |
|
483 | 4 | |
484 | 2 |
|
484 | 2 | |
485 | 1 |
|
485 | 1 | |
486 | 0 |
|
486 | 0 | |
487 | $ hg log -T '{rev}\n' -fr 2 g |
|
487 | $ hg log -T '{rev}\n' -fr 2 g | |
488 | 2 |
|
488 | 2 | |
489 | 1 |
|
489 | 1 | |
490 | 0 |
|
490 | 0 | |
491 | $ hg log -T '{rev}\n' -fr '2+3' g |
|
491 | $ hg log -T '{rev}\n' -fr '2+3' g | |
492 | 3 |
|
492 | 3 | |
493 | 2 |
|
493 | 2 | |
494 | 1 |
|
494 | 1 | |
495 | 0 |
|
495 | 0 | |
496 |
|
496 | |||
497 | follow files from the specified revisions with glob patterns (issue5053) |
|
497 | follow files from the specified revisions with glob patterns (issue5053) | |
498 | (BROKEN: should follow copies from e@4) |
|
498 | (BROKEN: should follow copies from e@4) | |
499 |
|
499 | |||
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' |
|
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' | |
501 | 4 |
|
501 | 4 | |
502 | 2 (false !) |
|
502 | 2 (false !) | |
503 | 1 (false !) |
|
503 | 1 (false !) | |
504 | 0 (false !) |
|
504 | 0 (false !) | |
505 |
|
505 | |||
506 | follow files from the specified revisions with missing patterns |
|
506 | follow files from the specified revisions with missing patterns | |
507 | (BROKEN: should follow copies from e@4) |
|
507 | (BROKEN: should follow copies from e@4) | |
508 |
|
508 | |||
509 | $ hg log -T '{rev}\n' -fr4 e x |
|
509 | $ hg log -T '{rev}\n' -fr4 e x | |
510 | 4 |
|
510 | 4 | |
511 | 2 (false !) |
|
511 | 2 (false !) | |
512 | 1 (false !) |
|
512 | 1 (false !) | |
513 | 0 (false !) |
|
513 | 0 (false !) | |
514 |
|
514 | |||
515 | follow files from the specified revisions across copies with -p/--patch |
|
515 | follow files from the specified revisions across copies with -p/--patch | |
516 |
|
516 | |||
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g |
|
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g | |
518 | == rev: 4, dir/b->e == |
|
518 | == rev: 4, dir/b->e == | |
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e |
|
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e | |
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 |
|
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 | |
522 | @@ -0,0 +1,1 @@ |
|
522 | @@ -0,0 +1,1 @@ | |
523 | +a |
|
523 | +a | |
524 |
|
524 | |||
525 | == rev: 3, a->b f->g == |
|
525 | == rev: 3, a->b f->g == | |
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
529 | @@ -1,2 +1,2 @@ |
|
529 | @@ -1,2 +1,2 @@ | |
530 | f |
|
530 | f | |
531 | -g |
|
531 | -g | |
532 | +f |
|
532 | +f | |
533 |
|
533 | |||
534 | == rev: 2, b->dir/b == |
|
534 | == rev: 2, b->dir/b == | |
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
538 | @@ -0,0 +1,1 @@ |
|
538 | @@ -0,0 +1,1 @@ | |
539 | +a |
|
539 | +a | |
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
543 | @@ -1,1 +1,2 @@ |
|
543 | @@ -1,1 +1,2 @@ | |
544 | f |
|
544 | f | |
545 | +f |
|
545 | +f | |
546 |
|
546 | |||
547 | == rev: 1, a->b f->g == |
|
547 | == rev: 1, a->b f->g == | |
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
551 | @@ -0,0 +1,1 @@ |
|
551 | @@ -0,0 +1,1 @@ | |
552 | +a |
|
552 | +a | |
553 |
|
553 | |||
554 | == rev: 0, == |
|
554 | == rev: 0, == | |
555 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
555 | diff -r 000000000000 -r 9161b9aeaf16 a | |
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
558 | @@ -0,0 +1,1 @@ |
|
558 | @@ -0,0 +1,1 @@ | |
559 | +a |
|
559 | +a | |
560 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
560 | diff -r 000000000000 -r 9161b9aeaf16 f | |
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
563 | @@ -0,0 +1,1 @@ |
|
563 | @@ -0,0 +1,1 @@ | |
564 | +f |
|
564 | +f | |
565 |
|
565 | |||
566 |
|
566 | |||
567 | log copies with --copies |
|
567 | log copies with --copies | |
568 |
|
568 | |||
569 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
569 | $ hg log -vC --template '{rev} {file_copies}\n' | |
570 | 4 e (dir/b) |
|
570 | 4 e (dir/b) | |
571 | 3 b (a)g (f) |
|
571 | 3 b (a)g (f) | |
572 | 2 dir/b (b) |
|
572 | 2 dir/b (b) | |
573 | 1 b (a)g (f) |
|
573 | 1 b (a)g (f) | |
574 | 0 |
|
574 | 0 | |
575 |
|
575 | |||
576 | log copies switch without --copies, with old filecopy template |
|
576 | log copies switch without --copies, with old filecopy template | |
577 |
|
577 | |||
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | |
579 | 4 |
|
579 | 4 | |
580 | 3 |
|
580 | 3 | |
581 | 2 |
|
581 | 2 | |
582 | 1 |
|
582 | 1 | |
583 | 0 |
|
583 | 0 | |
584 |
|
584 | |||
585 | log copies switch with --copies |
|
585 | log copies switch with --copies | |
586 |
|
586 | |||
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' | |
588 | 4 e (dir/b) |
|
588 | 4 e (dir/b) | |
589 | 3 b (a)g (f) |
|
589 | 3 b (a)g (f) | |
590 | 2 dir/b (b) |
|
590 | 2 dir/b (b) | |
591 | 1 b (a)g (f) |
|
591 | 1 b (a)g (f) | |
592 | 0 |
|
592 | 0 | |
593 |
|
593 | |||
594 |
|
594 | |||
595 | log copies with hardcoded style and with --style=default |
|
595 | log copies with hardcoded style and with --style=default | |
596 |
|
596 | |||
597 | $ hg log -vC -r4 |
|
597 | $ hg log -vC -r4 | |
598 | changeset: 4:7e4639b4691b |
|
598 | changeset: 4:7e4639b4691b | |
599 | tag: tip |
|
599 | tag: tip | |
600 | user: test |
|
600 | user: test | |
601 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
601 | date: Thu Jan 01 00:00:05 1970 +0000 | |
602 | files: dir/b e |
|
602 | files: dir/b e | |
603 | copies: e (dir/b) |
|
603 | copies: e (dir/b) | |
604 | description: |
|
604 | description: | |
605 | e |
|
605 | e | |
606 |
|
606 | |||
607 |
|
607 | |||
608 | $ hg log -vC -r4 --style=default |
|
608 | $ hg log -vC -r4 --style=default | |
609 | changeset: 4:7e4639b4691b |
|
609 | changeset: 4:7e4639b4691b | |
610 | tag: tip |
|
610 | tag: tip | |
611 | user: test |
|
611 | user: test | |
612 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
612 | date: Thu Jan 01 00:00:05 1970 +0000 | |
613 | files: dir/b e |
|
613 | files: dir/b e | |
614 | copies: e (dir/b) |
|
614 | copies: e (dir/b) | |
615 | description: |
|
615 | description: | |
616 | e |
|
616 | e | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | $ hg log -vC -r4 -Tjson |
|
619 | $ hg log -vC -r4 -Tjson | |
620 | [ |
|
620 | [ | |
621 | { |
|
621 | { | |
622 | "bookmarks": [], |
|
622 | "bookmarks": [], | |
623 | "branch": "default", |
|
623 | "branch": "default", | |
624 | "copies": {"e": "dir/b"}, |
|
624 | "copies": {"e": "dir/b"}, | |
625 | "date": [5, 0], |
|
625 | "date": [5, 0], | |
626 | "desc": "e", |
|
626 | "desc": "e", | |
627 | "files": ["dir/b", "e"], |
|
627 | "files": ["dir/b", "e"], | |
628 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", |
|
628 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", | |
629 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], |
|
629 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], | |
630 | "phase": "draft", |
|
630 | "phase": "draft", | |
631 | "rev": 4, |
|
631 | "rev": 4, | |
632 | "tags": ["tip"], |
|
632 | "tags": ["tip"], | |
633 | "user": "test" |
|
633 | "user": "test" | |
634 | } |
|
634 | } | |
635 | ] |
|
635 | ] | |
636 |
|
636 | |||
637 | log copies, non-linear manifest |
|
637 | log copies, non-linear manifest | |
638 |
|
638 | |||
639 | $ hg up -C 3 |
|
639 | $ hg up -C 3 | |
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
641 | $ hg mv dir/b e |
|
641 | $ hg mv dir/b e | |
642 | $ echo foo > foo |
|
642 | $ echo foo > foo | |
643 | $ hg ci -Ame2 -d '6 0' |
|
643 | $ hg ci -Ame2 -d '6 0' | |
644 | adding foo |
|
644 | adding foo | |
645 | created new head |
|
645 | created new head | |
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 | |
647 | 5 e (dir/b) |
|
647 | 5 e (dir/b) | |
648 |
|
648 | |||
649 |
|
649 | |||
650 | log copies, execute bit set |
|
650 | log copies, execute bit set | |
651 |
|
651 | |||
652 | #if execbit |
|
652 | #if execbit | |
653 | $ chmod +x e |
|
653 | $ chmod +x e | |
654 | $ hg ci -me3 -d '7 0' |
|
654 | $ hg ci -me3 -d '7 0' | |
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 | |
656 | 6 |
|
656 | 6 | |
657 | #endif |
|
657 | #endif | |
658 |
|
658 | |||
659 | log copies, empty set |
|
659 | log copies, empty set | |
660 |
|
660 | |||
661 | $ hg log --copies -r '0 and not 0' |
|
661 | $ hg log --copies -r '0 and not 0' | |
662 |
|
662 | |||
663 | log -p d |
|
663 | log -p d | |
664 |
|
664 | |||
665 | $ hg log -pv d |
|
665 | $ hg log -pv d | |
666 | changeset: 3:2ca5ba701980 |
|
666 | changeset: 3:2ca5ba701980 | |
667 | user: test |
|
667 | user: test | |
668 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
668 | date: Thu Jan 01 00:00:04 1970 +0000 | |
669 | files: a b d g |
|
669 | files: a b d g | |
670 | description: |
|
670 | description: | |
671 | d |
|
671 | d | |
672 |
|
672 | |||
673 |
|
673 | |||
674 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
674 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
675 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
675 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
676 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
676 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
677 | @@ -0,0 +1,1 @@ |
|
677 | @@ -0,0 +1,1 @@ | |
678 | +a |
|
678 | +a | |
679 |
|
679 | |||
680 |
|
680 | |||
681 |
|
681 | |||
682 | log --removed file |
|
682 | log --removed file | |
683 |
|
683 | |||
684 | $ hg log --removed -v a |
|
684 | $ hg log --removed -v a | |
685 | changeset: 3:2ca5ba701980 |
|
685 | changeset: 3:2ca5ba701980 | |
686 | user: test |
|
686 | user: test | |
687 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
687 | date: Thu Jan 01 00:00:04 1970 +0000 | |
688 | files: a b d g |
|
688 | files: a b d g | |
689 | description: |
|
689 | description: | |
690 | d |
|
690 | d | |
691 |
|
691 | |||
692 |
|
692 | |||
693 | changeset: 0:9161b9aeaf16 |
|
693 | changeset: 0:9161b9aeaf16 | |
694 | user: test |
|
694 | user: test | |
695 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
695 | date: Thu Jan 01 00:00:01 1970 +0000 | |
696 | files: a f |
|
696 | files: a f | |
697 | description: |
|
697 | description: | |
698 | a |
|
698 | a | |
699 |
|
699 | |||
700 |
|
700 | |||
701 |
|
701 | |||
702 | log --removed revrange file |
|
702 | log --removed revrange file | |
703 |
|
703 | |||
704 | $ hg log --removed -v -r0:2 a |
|
704 | $ hg log --removed -v -r0:2 a | |
705 | changeset: 0:9161b9aeaf16 |
|
705 | changeset: 0:9161b9aeaf16 | |
706 | user: test |
|
706 | user: test | |
707 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
707 | date: Thu Jan 01 00:00:01 1970 +0000 | |
708 | files: a f |
|
708 | files: a f | |
709 | description: |
|
709 | description: | |
710 | a |
|
710 | a | |
711 |
|
711 | |||
712 |
|
712 | |||
713 | $ cd .. |
|
713 | $ cd .. | |
714 |
|
714 | |||
715 | log --follow tests |
|
715 | log --follow tests | |
716 |
|
716 | |||
717 | $ hg init follow |
|
717 | $ hg init follow | |
718 | $ cd follow |
|
718 | $ cd follow | |
719 |
|
719 | |||
720 | $ echo base > base |
|
720 | $ echo base > base | |
721 | $ hg ci -Ambase -d '1 0' |
|
721 | $ hg ci -Ambase -d '1 0' | |
722 | adding base |
|
722 | adding base | |
723 |
|
723 | |||
724 | $ echo r1 >> base |
|
724 | $ echo r1 >> base | |
725 | $ hg ci -Amr1 -d '1 0' |
|
725 | $ hg ci -Amr1 -d '1 0' | |
726 | $ echo r2 >> base |
|
726 | $ echo r2 >> base | |
727 | $ hg ci -Amr2 -d '1 0' |
|
727 | $ hg ci -Amr2 -d '1 0' | |
728 |
|
728 | |||
729 | $ hg up -C 1 |
|
729 | $ hg up -C 1 | |
730 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
730 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
731 | $ echo b1 > b1 |
|
731 | $ echo b1 > b1 | |
732 |
|
732 | |||
733 | log -r "follow('set:clean()')" |
|
733 | log -r "follow('set:clean()')" | |
734 |
|
734 | |||
735 | $ hg log -r "follow('set:clean()')" |
|
735 | $ hg log -r "follow('set:clean()')" | |
736 | changeset: 0:67e992f2c4f3 |
|
736 | changeset: 0:67e992f2c4f3 | |
737 | user: test |
|
737 | user: test | |
738 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
738 | date: Thu Jan 01 00:00:01 1970 +0000 | |
739 | summary: base |
|
739 | summary: base | |
740 |
|
740 | |||
741 | changeset: 1:3d5bf5654eda |
|
741 | changeset: 1:3d5bf5654eda | |
742 | user: test |
|
742 | user: test | |
743 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
743 | date: Thu Jan 01 00:00:01 1970 +0000 | |
744 | summary: r1 |
|
744 | summary: r1 | |
745 |
|
745 | |||
746 |
|
746 | |||
747 | $ hg ci -Amb1 -d '1 0' |
|
747 | $ hg ci -Amb1 -d '1 0' | |
748 | adding b1 |
|
748 | adding b1 | |
749 | created new head |
|
749 | created new head | |
750 |
|
750 | |||
751 |
|
751 | |||
752 | log -f |
|
752 | log -f | |
753 |
|
753 | |||
754 | $ hg log -f |
|
754 | $ hg log -f | |
755 | changeset: 3:e62f78d544b4 |
|
755 | changeset: 3:e62f78d544b4 | |
756 | tag: tip |
|
756 | tag: tip | |
757 | parent: 1:3d5bf5654eda |
|
757 | parent: 1:3d5bf5654eda | |
758 | user: test |
|
758 | user: test | |
759 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
759 | date: Thu Jan 01 00:00:01 1970 +0000 | |
760 | summary: b1 |
|
760 | summary: b1 | |
761 |
|
761 | |||
762 | changeset: 1:3d5bf5654eda |
|
762 | changeset: 1:3d5bf5654eda | |
763 | user: test |
|
763 | user: test | |
764 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:01 1970 +0000 | |
765 | summary: r1 |
|
765 | summary: r1 | |
766 |
|
766 | |||
767 | changeset: 0:67e992f2c4f3 |
|
767 | changeset: 0:67e992f2c4f3 | |
768 | user: test |
|
768 | user: test | |
769 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
769 | date: Thu Jan 01 00:00:01 1970 +0000 | |
770 | summary: base |
|
770 | summary: base | |
771 |
|
771 | |||
772 |
|
772 | |||
773 | log -r follow('glob:b*') |
|
773 | log -r follow('glob:b*') | |
774 |
|
774 | |||
775 | $ hg log -r "follow('glob:b*')" |
|
775 | $ hg log -r "follow('glob:b*')" | |
776 | changeset: 0:67e992f2c4f3 |
|
776 | changeset: 0:67e992f2c4f3 | |
777 | user: test |
|
777 | user: test | |
778 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
778 | date: Thu Jan 01 00:00:01 1970 +0000 | |
779 | summary: base |
|
779 | summary: base | |
780 |
|
780 | |||
781 | changeset: 1:3d5bf5654eda |
|
781 | changeset: 1:3d5bf5654eda | |
782 | user: test |
|
782 | user: test | |
783 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
783 | date: Thu Jan 01 00:00:01 1970 +0000 | |
784 | summary: r1 |
|
784 | summary: r1 | |
785 |
|
785 | |||
786 | changeset: 3:e62f78d544b4 |
|
786 | changeset: 3:e62f78d544b4 | |
787 | tag: tip |
|
787 | tag: tip | |
788 | parent: 1:3d5bf5654eda |
|
788 | parent: 1:3d5bf5654eda | |
789 | user: test |
|
789 | user: test | |
790 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
790 | date: Thu Jan 01 00:00:01 1970 +0000 | |
791 | summary: b1 |
|
791 | summary: b1 | |
792 |
|
792 | |||
793 | log -f -r '1 + 4' |
|
793 | log -f -r '1 + 4' | |
794 |
|
794 | |||
795 | $ hg up -C 0 |
|
795 | $ hg up -C 0 | |
796 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
796 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
797 | $ echo b2 > b2 |
|
797 | $ echo b2 > b2 | |
798 | $ hg ci -Amb2 -d '1 0' |
|
798 | $ hg ci -Amb2 -d '1 0' | |
799 | adding b2 |
|
799 | adding b2 | |
800 | created new head |
|
800 | created new head | |
801 | $ hg log -f -r '1 + 4' |
|
801 | $ hg log -f -r '1 + 4' | |
802 | changeset: 4:ddb82e70d1a1 |
|
802 | changeset: 4:ddb82e70d1a1 | |
803 | tag: tip |
|
803 | tag: tip | |
804 | parent: 0:67e992f2c4f3 |
|
804 | parent: 0:67e992f2c4f3 | |
805 | user: test |
|
805 | user: test | |
806 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
806 | date: Thu Jan 01 00:00:01 1970 +0000 | |
807 | summary: b2 |
|
807 | summary: b2 | |
808 |
|
808 | |||
809 | changeset: 1:3d5bf5654eda |
|
809 | changeset: 1:3d5bf5654eda | |
810 | user: test |
|
810 | user: test | |
811 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
811 | date: Thu Jan 01 00:00:01 1970 +0000 | |
812 | summary: r1 |
|
812 | summary: r1 | |
813 |
|
813 | |||
814 | changeset: 0:67e992f2c4f3 |
|
814 | changeset: 0:67e992f2c4f3 | |
815 | user: test |
|
815 | user: test | |
816 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
816 | date: Thu Jan 01 00:00:01 1970 +0000 | |
817 | summary: base |
|
817 | summary: base | |
818 |
|
818 | |||
819 |
|
819 | |||
820 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no |
|
820 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no | |
821 | effect |
|
821 | effect | |
822 |
|
822 | |||
823 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA |
|
823 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA | |
824 | 4:ddb82e70d1a1 |
|
824 | 4:ddb82e70d1a1 | |
825 | 1:3d5bf5654eda |
|
825 | 1:3d5bf5654eda | |
826 | 0:67e992f2c4f3 |
|
826 | 0:67e992f2c4f3 | |
827 |
|
827 | |||
828 | log -r "follow('set:grep(b2)')" |
|
828 | log -r "follow('set:grep(b2)')" | |
829 |
|
829 | |||
830 | $ hg log -r "follow('set:grep(b2)')" |
|
830 | $ hg log -r "follow('set:grep(b2)')" | |
831 | changeset: 4:ddb82e70d1a1 |
|
831 | changeset: 4:ddb82e70d1a1 | |
832 | tag: tip |
|
832 | tag: tip | |
833 | parent: 0:67e992f2c4f3 |
|
833 | parent: 0:67e992f2c4f3 | |
834 | user: test |
|
834 | user: test | |
835 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
835 | date: Thu Jan 01 00:00:01 1970 +0000 | |
836 | summary: b2 |
|
836 | summary: b2 | |
837 |
|
837 | |||
838 | log -r "follow('set:grep(b2)', 4)" |
|
838 | log -r "follow('set:grep(b2)', 4)" | |
839 |
|
839 | |||
840 | $ hg up -qC 0 |
|
840 | $ hg up -qC 0 | |
841 | $ hg log -r "follow('set:grep(b2)', 4)" |
|
841 | $ hg log -r "follow('set:grep(b2)', 4)" | |
842 | changeset: 4:ddb82e70d1a1 |
|
842 | changeset: 4:ddb82e70d1a1 | |
843 | tag: tip |
|
843 | tag: tip | |
844 | parent: 0:67e992f2c4f3 |
|
844 | parent: 0:67e992f2c4f3 | |
845 | user: test |
|
845 | user: test | |
846 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
846 | date: Thu Jan 01 00:00:01 1970 +0000 | |
847 | summary: b2 |
|
847 | summary: b2 | |
848 |
|
848 | |||
849 |
|
849 | |||
850 | follow files starting from multiple revisions: |
|
850 | follow files starting from multiple revisions: | |
851 |
|
851 | |||
852 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" |
|
852 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" | |
853 | 3: b1 |
|
853 | 3: b1 | |
854 | 4: b2 |
|
854 | 4: b2 | |
855 |
|
855 | |||
856 | follow files starting from empty revision: |
|
856 | follow files starting from empty revision: | |
857 |
|
857 | |||
858 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" |
|
858 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" | |
859 |
|
859 | |||
860 | follow starting from revisions: |
|
860 | follow starting from revisions: | |
861 |
|
861 | |||
862 | $ hg log -Gq -r "follow(startrev=2+4)" |
|
862 | $ hg log -Gq -r "follow(startrev=2+4)" | |
863 | o 4:ddb82e70d1a1 |
|
863 | o 4:ddb82e70d1a1 | |
864 | | |
|
864 | | | |
865 | | o 2:60c670bf5b30 |
|
865 | | o 2:60c670bf5b30 | |
866 | | | |
|
866 | | | | |
867 | | o 1:3d5bf5654eda |
|
867 | | o 1:3d5bf5654eda | |
868 | |/ |
|
868 | |/ | |
869 | @ 0:67e992f2c4f3 |
|
869 | @ 0:67e992f2c4f3 | |
870 |
|
870 | |||
871 |
|
871 | |||
872 | follow the current revision: |
|
872 | follow the current revision: | |
873 |
|
873 | |||
874 | $ hg log -Gq -r "follow()" |
|
874 | $ hg log -Gq -r "follow()" | |
875 | @ 0:67e992f2c4f3 |
|
875 | @ 0:67e992f2c4f3 | |
876 |
|
876 | |||
877 |
|
877 | |||
878 | $ hg up -qC 4 |
|
878 | $ hg up -qC 4 | |
879 |
|
879 | |||
880 | log -f -r null |
|
880 | log -f -r null | |
881 |
|
881 | |||
882 | $ hg log -f -r null |
|
882 | $ hg log -f -r null | |
883 | changeset: -1:000000000000 |
|
883 | changeset: -1:000000000000 | |
884 | user: |
|
884 | user: | |
885 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
885 | date: Thu Jan 01 00:00:00 1970 +0000 | |
886 |
|
886 | |||
887 | $ hg log -f -r null -G |
|
887 | $ hg log -f -r null -G | |
888 | o changeset: -1:000000000000 |
|
888 | o changeset: -1:000000000000 | |
889 | user: |
|
889 | user: | |
890 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
890 | date: Thu Jan 01 00:00:00 1970 +0000 | |
891 |
|
891 | |||
892 |
|
892 | |||
893 |
|
893 | |||
894 | log -f with null parent |
|
894 | log -f with null parent | |
895 |
|
895 | |||
896 | $ hg up -C null |
|
896 | $ hg up -C null | |
897 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
897 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
898 | $ hg log -f |
|
898 | $ hg log -f | |
899 |
|
899 | |||
900 |
|
900 | |||
901 | log -r . with two parents |
|
901 | log -r . with two parents | |
902 |
|
902 | |||
903 | $ hg up -C 3 |
|
903 | $ hg up -C 3 | |
904 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
904 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
905 | $ hg merge tip |
|
905 | $ hg merge tip | |
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
907 | (branch merge, don't forget to commit) |
|
907 | (branch merge, don't forget to commit) | |
908 | $ hg log -r . |
|
908 | $ hg log -r . | |
909 | changeset: 3:e62f78d544b4 |
|
909 | changeset: 3:e62f78d544b4 | |
910 | parent: 1:3d5bf5654eda |
|
910 | parent: 1:3d5bf5654eda | |
911 | user: test |
|
911 | user: test | |
912 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
912 | date: Thu Jan 01 00:00:01 1970 +0000 | |
913 | summary: b1 |
|
913 | summary: b1 | |
914 |
|
914 | |||
915 |
|
915 | |||
916 |
|
916 | |||
917 | log -r . with one parent |
|
917 | log -r . with one parent | |
918 |
|
918 | |||
919 | $ hg ci -mm12 -d '1 0' |
|
919 | $ hg ci -mm12 -d '1 0' | |
920 | $ hg log -r . |
|
920 | $ hg log -r . | |
921 | changeset: 5:302e9dd6890d |
|
921 | changeset: 5:302e9dd6890d | |
922 | tag: tip |
|
922 | tag: tip | |
923 | parent: 3:e62f78d544b4 |
|
923 | parent: 3:e62f78d544b4 | |
924 | parent: 4:ddb82e70d1a1 |
|
924 | parent: 4:ddb82e70d1a1 | |
925 | user: test |
|
925 | user: test | |
926 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
926 | date: Thu Jan 01 00:00:01 1970 +0000 | |
927 | summary: m12 |
|
927 | summary: m12 | |
928 |
|
928 | |||
929 |
|
929 | |||
930 | $ echo postm >> b1 |
|
930 | $ echo postm >> b1 | |
931 | $ hg ci -Amb1.1 -d'1 0' |
|
931 | $ hg ci -Amb1.1 -d'1 0' | |
932 |
|
932 | |||
933 |
|
933 | |||
934 | log --follow-first |
|
934 | log --follow-first | |
935 |
|
935 | |||
936 | $ hg log --follow-first |
|
936 | $ hg log --follow-first | |
937 | changeset: 6:2404bbcab562 |
|
937 | changeset: 6:2404bbcab562 | |
938 | tag: tip |
|
938 | tag: tip | |
939 | user: test |
|
939 | user: test | |
940 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
940 | date: Thu Jan 01 00:00:01 1970 +0000 | |
941 | summary: b1.1 |
|
941 | summary: b1.1 | |
942 |
|
942 | |||
943 | changeset: 5:302e9dd6890d |
|
943 | changeset: 5:302e9dd6890d | |
944 | parent: 3:e62f78d544b4 |
|
944 | parent: 3:e62f78d544b4 | |
945 | parent: 4:ddb82e70d1a1 |
|
945 | parent: 4:ddb82e70d1a1 | |
946 | user: test |
|
946 | user: test | |
947 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
947 | date: Thu Jan 01 00:00:01 1970 +0000 | |
948 | summary: m12 |
|
948 | summary: m12 | |
949 |
|
949 | |||
950 | changeset: 3:e62f78d544b4 |
|
950 | changeset: 3:e62f78d544b4 | |
951 | parent: 1:3d5bf5654eda |
|
951 | parent: 1:3d5bf5654eda | |
952 | user: test |
|
952 | user: test | |
953 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
953 | date: Thu Jan 01 00:00:01 1970 +0000 | |
954 | summary: b1 |
|
954 | summary: b1 | |
955 |
|
955 | |||
956 | changeset: 1:3d5bf5654eda |
|
956 | changeset: 1:3d5bf5654eda | |
957 | user: test |
|
957 | user: test | |
958 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
958 | date: Thu Jan 01 00:00:01 1970 +0000 | |
959 | summary: r1 |
|
959 | summary: r1 | |
960 |
|
960 | |||
961 | changeset: 0:67e992f2c4f3 |
|
961 | changeset: 0:67e992f2c4f3 | |
962 | user: test |
|
962 | user: test | |
963 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
963 | date: Thu Jan 01 00:00:01 1970 +0000 | |
964 | summary: base |
|
964 | summary: base | |
965 |
|
965 | |||
966 |
|
966 | |||
967 |
|
967 | |||
968 | log -P 2 |
|
968 | log -P 2 | |
969 |
|
969 | |||
970 | $ hg log -P 2 |
|
970 | $ hg log -P 2 | |
971 | changeset: 6:2404bbcab562 |
|
971 | changeset: 6:2404bbcab562 | |
972 | tag: tip |
|
972 | tag: tip | |
973 | user: test |
|
973 | user: test | |
974 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
974 | date: Thu Jan 01 00:00:01 1970 +0000 | |
975 | summary: b1.1 |
|
975 | summary: b1.1 | |
976 |
|
976 | |||
977 | changeset: 5:302e9dd6890d |
|
977 | changeset: 5:302e9dd6890d | |
978 | parent: 3:e62f78d544b4 |
|
978 | parent: 3:e62f78d544b4 | |
979 | parent: 4:ddb82e70d1a1 |
|
979 | parent: 4:ddb82e70d1a1 | |
980 | user: test |
|
980 | user: test | |
981 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
981 | date: Thu Jan 01 00:00:01 1970 +0000 | |
982 | summary: m12 |
|
982 | summary: m12 | |
983 |
|
983 | |||
984 | changeset: 4:ddb82e70d1a1 |
|
984 | changeset: 4:ddb82e70d1a1 | |
985 | parent: 0:67e992f2c4f3 |
|
985 | parent: 0:67e992f2c4f3 | |
986 | user: test |
|
986 | user: test | |
987 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
987 | date: Thu Jan 01 00:00:01 1970 +0000 | |
988 | summary: b2 |
|
988 | summary: b2 | |
989 |
|
989 | |||
990 | changeset: 3:e62f78d544b4 |
|
990 | changeset: 3:e62f78d544b4 | |
991 | parent: 1:3d5bf5654eda |
|
991 | parent: 1:3d5bf5654eda | |
992 | user: test |
|
992 | user: test | |
993 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
993 | date: Thu Jan 01 00:00:01 1970 +0000 | |
994 | summary: b1 |
|
994 | summary: b1 | |
995 |
|
995 | |||
996 |
|
996 | |||
997 |
|
997 | |||
998 | log -r tip -p --git |
|
998 | log -r tip -p --git | |
999 |
|
999 | |||
1000 | $ hg log -r tip -p --git |
|
1000 | $ hg log -r tip -p --git | |
1001 | changeset: 6:2404bbcab562 |
|
1001 | changeset: 6:2404bbcab562 | |
1002 | tag: tip |
|
1002 | tag: tip | |
1003 | user: test |
|
1003 | user: test | |
1004 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1004 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1005 | summary: b1.1 |
|
1005 | summary: b1.1 | |
1006 |
|
1006 | |||
1007 | diff --git a/b1 b/b1 |
|
1007 | diff --git a/b1 b/b1 | |
1008 | --- a/b1 |
|
1008 | --- a/b1 | |
1009 | +++ b/b1 |
|
1009 | +++ b/b1 | |
1010 | @@ -1,1 +1,2 @@ |
|
1010 | @@ -1,1 +1,2 @@ | |
1011 | b1 |
|
1011 | b1 | |
1012 | +postm |
|
1012 | +postm | |
1013 |
|
1013 | |||
1014 |
|
1014 | |||
1015 |
|
1015 | |||
1016 | log -r "" |
|
1016 | log -r "" | |
1017 |
|
1017 | |||
1018 | $ hg log -r '' |
|
1018 | $ hg log -r '' | |
1019 | hg: parse error: empty query |
|
1019 | hg: parse error: empty query | |
1020 | [255] |
|
1020 | [255] | |
1021 |
|
1021 | |||
1022 | log -r <some unknown node id> |
|
1022 | log -r <some unknown node id> | |
1023 |
|
1023 | |||
1024 | $ hg log -r 1000000000000000000000000000000000000000 |
|
1024 | $ hg log -r 1000000000000000000000000000000000000000 | |
1025 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
1025 | abort: unknown revision '1000000000000000000000000000000000000000'! | |
1026 | [255] |
|
1026 | [255] | |
1027 |
|
1027 | |||
1028 | log -k r1 |
|
1028 | log -k r1 | |
1029 |
|
1029 | |||
1030 | $ hg log -k r1 |
|
1030 | $ hg log -k r1 | |
1031 | changeset: 1:3d5bf5654eda |
|
1031 | changeset: 1:3d5bf5654eda | |
1032 | user: test |
|
1032 | user: test | |
1033 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1033 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1034 | summary: r1 |
|
1034 | summary: r1 | |
1035 |
|
1035 | |||
1036 | log -p -l2 --color=always |
|
1036 | log -p -l2 --color=always | |
1037 |
|
1037 | |||
1038 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
1038 | $ hg --config extensions.color= --config color.mode=ansi \ | |
1039 | > log -p -l2 --color=always |
|
1039 | > log -p -l2 --color=always | |
1040 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
1040 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) | |
1041 | tag: tip |
|
1041 | tag: tip | |
1042 | user: test |
|
1042 | user: test | |
1043 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1043 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1044 | summary: b1.1 |
|
1044 | summary: b1.1 | |
1045 |
|
1045 | |||
1046 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
1046 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) | |
1047 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1047 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1048 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1048 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1049 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
1049 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | |
1050 | b1 |
|
1050 | b1 | |
1051 | \x1b[0;32m+postm\x1b[0m (esc) |
|
1051 | \x1b[0;32m+postm\x1b[0m (esc) | |
1052 |
|
1052 | |||
1053 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
1053 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) | |
1054 | parent: 3:e62f78d544b4 |
|
1054 | parent: 3:e62f78d544b4 | |
1055 | parent: 4:ddb82e70d1a1 |
|
1055 | parent: 4:ddb82e70d1a1 | |
1056 | user: test |
|
1056 | user: test | |
1057 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1057 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1058 | summary: m12 |
|
1058 | summary: m12 | |
1059 |
|
1059 | |||
1060 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
1060 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) | |
1061 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
1061 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) | |
1062 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1062 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1063 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
1063 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) | |
1064 | \x1b[0;32m+b2\x1b[0m (esc) |
|
1064 | \x1b[0;32m+b2\x1b[0m (esc) | |
1065 |
|
1065 | |||
1066 |
|
1066 | |||
1067 |
|
1067 | |||
1068 | log -r tip --stat |
|
1068 | log -r tip --stat | |
1069 |
|
1069 | |||
1070 | $ hg log -r tip --stat |
|
1070 | $ hg log -r tip --stat | |
1071 | changeset: 6:2404bbcab562 |
|
1071 | changeset: 6:2404bbcab562 | |
1072 | tag: tip |
|
1072 | tag: tip | |
1073 | user: test |
|
1073 | user: test | |
1074 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1074 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1075 | summary: b1.1 |
|
1075 | summary: b1.1 | |
1076 |
|
1076 | |||
1077 | b1 | 1 + |
|
1077 | b1 | 1 + | |
1078 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1078 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1079 |
|
1079 | |||
1080 |
|
1080 | |||
1081 | $ cd .. |
|
1081 | $ cd .. | |
1082 |
|
1082 | |||
1083 | log --follow --patch FILE in repository where linkrev isn't trustworthy |
|
1083 | log --follow --patch FILE in repository where linkrev isn't trustworthy | |
1084 | (issue5376, issue6124) |
|
1084 | (issue5376, issue6124) | |
1085 |
|
1085 | |||
1086 | $ hg init follow-dup |
|
1086 | $ hg init follow-dup | |
1087 | $ cd follow-dup |
|
1087 | $ cd follow-dup | |
1088 | $ cat <<EOF >> .hg/hgrc |
|
1088 | $ cat <<EOF >> .hg/hgrc | |
1089 | > [ui] |
|
1089 | > [ui] | |
1090 | > logtemplate = '=== {rev}: {desc}\n' |
|
1090 | > logtemplate = '=== {rev}: {desc}\n' | |
1091 | > [diff] |
|
1091 | > [diff] | |
1092 | > nodates = True |
|
1092 | > nodates = True | |
1093 | > EOF |
|
1093 | > EOF | |
1094 | $ echo 0 >> a |
|
1094 | $ echo 0 >> a | |
1095 | $ hg ci -qAm 'a0' |
|
1095 | $ hg ci -qAm 'a0' | |
1096 | $ echo 1 >> a |
|
1096 | $ echo 1 >> a | |
1097 | $ hg ci -m 'a1' |
|
1097 | $ hg ci -m 'a1' | |
1098 | $ hg up -q 0 |
|
1098 | $ hg up -q 0 | |
1099 | $ echo 1 >> a |
|
1099 | $ echo 1 >> a | |
1100 | $ touch b |
|
1100 | $ touch b | |
1101 | $ hg ci -qAm 'a1 with b' |
|
1101 | $ hg ci -qAm 'a1 with b' | |
1102 | $ echo 3 >> a |
|
1102 | $ echo 3 >> a | |
1103 | $ hg ci -m 'a3' |
|
1103 | $ hg ci -m 'a3' | |
1104 |
|
1104 | |||
1105 | fctx.rev() == 2, but fctx.linkrev() == 1 |
|
1105 | fctx.rev() == 2, but fctx.linkrev() == 1 | |
1106 |
|
1106 | |||
1107 | $ hg log -pf a |
|
1107 | $ hg log -pf a | |
1108 | === 3: a3 |
|
1108 | === 3: a3 | |
1109 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
1109 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
1110 | --- a/a |
|
1110 | --- a/a | |
1111 | +++ b/a |
|
1111 | +++ b/a | |
1112 | @@ -1,2 +1,3 @@ |
|
1112 | @@ -1,2 +1,3 @@ | |
1113 | 0 |
|
1113 | 0 | |
1114 | 1 |
|
1114 | 1 | |
1115 | +3 |
|
1115 | +3 | |
1116 |
|
1116 | |||
1117 | === 2: a1 with b |
|
1117 | === 2: a1 with b | |
1118 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1118 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1119 | --- a/a |
|
1119 | --- a/a | |
1120 | +++ b/a |
|
1120 | +++ b/a | |
1121 | @@ -1,1 +1,2 @@ |
|
1121 | @@ -1,1 +1,2 @@ | |
1122 | 0 |
|
1122 | 0 | |
1123 | +1 |
|
1123 | +1 | |
1124 |
|
1124 | |||
1125 | === 0: a0 |
|
1125 | === 0: a0 | |
1126 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1126 | diff -r 000000000000 -r 49b5e81287e2 a | |
1127 | --- /dev/null |
|
1127 | --- /dev/null | |
1128 | +++ b/a |
|
1128 | +++ b/a | |
1129 | @@ -0,0 +1,1 @@ |
|
1129 | @@ -0,0 +1,1 @@ | |
1130 | +0 |
|
1130 | +0 | |
1131 |
|
1131 | |||
1132 | $ hg log -pr . a |
|
1132 | $ hg log -pr . a | |
1133 | === 3: a3 |
|
1133 | === 3: a3 | |
1134 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
1134 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
1135 | --- a/a |
|
1135 | --- a/a | |
1136 | +++ b/a |
|
1136 | +++ b/a | |
1137 | @@ -1,2 +1,3 @@ |
|
1137 | @@ -1,2 +1,3 @@ | |
1138 | 0 |
|
1138 | 0 | |
1139 | 1 |
|
1139 | 1 | |
1140 | +3 |
|
1140 | +3 | |
1141 |
|
1141 | |||
1142 |
|
1142 | |||
1143 | fctx.introrev() == 2, but fctx.linkrev() == 1 |
|
1143 | fctx.introrev() == 2, but fctx.linkrev() == 1 | |
1144 |
|
1144 | |||
1145 | $ hg up -q 2 |
|
1145 | $ hg up -q 2 | |
1146 | $ hg log -pf a |
|
1146 | $ hg log -pf a | |
1147 | === 2: a1 with b |
|
1147 | === 2: a1 with b | |
1148 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1148 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1149 | --- a/a |
|
1149 | --- a/a | |
1150 | +++ b/a |
|
1150 | +++ b/a | |
1151 | @@ -1,1 +1,2 @@ |
|
1151 | @@ -1,1 +1,2 @@ | |
1152 | 0 |
|
1152 | 0 | |
1153 | +1 |
|
1153 | +1 | |
1154 |
|
1154 | |||
1155 | === 0: a0 |
|
1155 | === 0: a0 | |
1156 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1156 | diff -r 000000000000 -r 49b5e81287e2 a | |
1157 | --- /dev/null |
|
1157 | --- /dev/null | |
1158 | +++ b/a |
|
1158 | +++ b/a | |
1159 | @@ -0,0 +1,1 @@ |
|
1159 | @@ -0,0 +1,1 @@ | |
1160 | +0 |
|
1160 | +0 | |
1161 |
|
1161 | |||
1162 |
|
1162 | |||
1163 | BROKEN: should show the same diff as for rev 2 above |
|
1163 | BROKEN: should show the same diff as for rev 2 above | |
1164 | $ hg log -pr . a |
|
1164 | $ hg log -pr . a | |
1165 |
|
1165 | |||
1166 | $ cd .. |
|
1166 | $ cd .. | |
1167 |
|
1167 | |||
1168 | Multiple copy sources of a file: |
|
1168 | Multiple copy sources of a file: | |
1169 |
|
1169 | |||
1170 | $ hg init follow-multi |
|
1170 | $ hg init follow-multi | |
1171 | $ cd follow-multi |
|
1171 | $ cd follow-multi | |
1172 | $ echo 0 >> a |
|
1172 | $ echo 0 >> a | |
1173 | $ hg ci -qAm 'a' |
|
1173 | $ hg ci -qAm 'a' | |
1174 | $ hg cp a b |
|
1174 | $ hg cp a b | |
1175 | $ hg ci -m 'a->b' |
|
1175 | $ hg ci -m 'a->b' | |
1176 | $ echo 2 >> a |
|
1176 | $ echo 2 >> a | |
1177 | $ hg ci -m 'a' |
|
1177 | $ hg ci -m 'a' | |
1178 | $ echo 3 >> b |
|
1178 | $ echo 3 >> b | |
1179 | $ hg ci -m 'b' |
|
1179 | $ hg ci -m 'b' | |
1180 | $ echo 4 >> a |
|
1180 | $ echo 4 >> a | |
1181 | $ echo 4 >> b |
|
1181 | $ echo 4 >> b | |
1182 | $ hg ci -m 'a,b' |
|
1182 | $ hg ci -m 'a,b' | |
1183 | $ echo 5 >> a |
|
1183 | $ echo 5 >> a | |
1184 | $ hg ci -m 'a0' |
|
1184 | $ hg ci -m 'a0' | |
1185 | $ echo 6 >> b |
|
1185 | $ echo 6 >> b | |
1186 | $ hg ci -m 'b0' |
|
1186 | $ hg ci -m 'b0' | |
1187 | $ hg up -q 4 |
|
1187 | $ hg up -q 4 | |
1188 | $ echo 7 >> b |
|
1188 | $ echo 7 >> b | |
1189 | $ hg ci -m 'b1' |
|
1189 | $ hg ci -m 'b1' | |
1190 | created new head |
|
1190 | created new head | |
1191 | $ echo 8 >> a |
|
1191 | $ echo 8 >> a | |
1192 | $ hg ci -m 'a1' |
|
1192 | $ hg ci -m 'a1' | |
1193 | $ hg rm a |
|
1193 | $ hg rm a | |
1194 | $ hg mv b a |
|
1194 | $ hg mv b a | |
1195 | $ hg ci -m 'b1->a1' |
|
1195 | $ hg ci -m 'b1->a1' | |
1196 | $ hg merge -qt :local |
|
1196 | $ hg merge -qt :local | |
1197 | $ hg ci -m '(a0,b1->a1)->a' |
|
1197 | $ hg ci -m '(a0,b1->a1)->a' | |
1198 |
|
1198 | |||
1199 | $ hg log -GT '{rev}: {desc}\n' |
|
1199 | $ hg log -GT '{rev}: {desc}\n' | |
1200 | @ 10: (a0,b1->a1)->a |
|
1200 | @ 10: (a0,b1->a1)->a | |
1201 | |\ |
|
1201 | |\ | |
1202 | | o 9: b1->a1 |
|
1202 | | o 9: b1->a1 | |
1203 | | | |
|
1203 | | | | |
1204 | | o 8: a1 |
|
1204 | | o 8: a1 | |
1205 | | | |
|
1205 | | | | |
1206 | | o 7: b1 |
|
1206 | | o 7: b1 | |
1207 | | | |
|
1207 | | | | |
1208 | o | 6: b0 |
|
1208 | o | 6: b0 | |
1209 | | | |
|
1209 | | | | |
1210 | o | 5: a0 |
|
1210 | o | 5: a0 | |
1211 | |/ |
|
1211 | |/ | |
1212 | o 4: a,b |
|
1212 | o 4: a,b | |
1213 | | |
|
1213 | | | |
1214 | o 3: b |
|
1214 | o 3: b | |
1215 | | |
|
1215 | | | |
1216 | o 2: a |
|
1216 | o 2: a | |
1217 | | |
|
1217 | | | |
1218 | o 1: a->b |
|
1218 | o 1: a->b | |
1219 | | |
|
1219 | | | |
1220 | o 0: a |
|
1220 | o 0: a | |
1221 |
|
1221 | |||
1222 |
|
1222 | |||
1223 | since file 'a' has multiple copy sources at the revision 4, ancestors can't |
|
1223 | since file 'a' has multiple copy sources at the revision 4, ancestors can't | |
1224 | be indexed solely by fctx.linkrev(). |
|
1224 | be indexed solely by fctx.linkrev(). | |
1225 |
|
1225 | |||
1226 | $ hg log -T '{rev}: {desc}\n' -f a |
|
1226 | $ hg log -T '{rev}: {desc}\n' -f a | |
1227 | 10: (a0,b1->a1)->a |
|
1227 | 10: (a0,b1->a1)->a | |
1228 | 9: b1->a1 |
|
1228 | 9: b1->a1 | |
1229 | 7: b1 |
|
1229 | 7: b1 | |
1230 | 5: a0 |
|
1230 | 5: a0 | |
1231 | 4: a,b |
|
1231 | 4: a,b | |
1232 | 3: b |
|
1232 | 3: b | |
1233 | 2: a |
|
1233 | 2: a | |
1234 | 1: a->b |
|
1234 | 1: a->b | |
1235 | 0: a |
|
1235 | 0: a | |
1236 |
|
1236 | |||
1237 | $ cd .. |
|
1237 | $ cd .. | |
1238 |
|
1238 | |||
1239 | Test that log should respect the order of -rREV even if multiple OR conditions |
|
1239 | Test that log should respect the order of -rREV even if multiple OR conditions | |
1240 | are specified (issue5100): |
|
1240 | are specified (issue5100): | |
1241 |
|
1241 | |||
1242 | $ hg init revorder |
|
1242 | $ hg init revorder | |
1243 | $ cd revorder |
|
1243 | $ cd revorder | |
1244 |
|
1244 | |||
1245 | $ hg branch -q b0 |
|
1245 | $ hg branch -q b0 | |
1246 | $ echo 0 >> f0 |
|
1246 | $ echo 0 >> f0 | |
1247 | $ hg ci -qAm k0 -u u0 |
|
1247 | $ hg ci -qAm k0 -u u0 | |
1248 | $ hg branch -q b1 |
|
1248 | $ hg branch -q b1 | |
1249 | $ echo 1 >> f1 |
|
1249 | $ echo 1 >> f1 | |
1250 | $ hg ci -qAm k1 -u u1 |
|
1250 | $ hg ci -qAm k1 -u u1 | |
1251 | $ hg branch -q b2 |
|
1251 | $ hg branch -q b2 | |
1252 | $ echo 2 >> f2 |
|
1252 | $ echo 2 >> f2 | |
1253 | $ hg ci -qAm k2 -u u2 |
|
1253 | $ hg ci -qAm k2 -u u2 | |
1254 |
|
1254 | |||
1255 | $ hg update -q b2 |
|
1255 | $ hg update -q b2 | |
1256 | $ echo 3 >> f2 |
|
1256 | $ echo 3 >> f2 | |
1257 | $ hg ci -qAm k2 -u u2 |
|
1257 | $ hg ci -qAm k2 -u u2 | |
1258 | $ hg update -q b1 |
|
1258 | $ hg update -q b1 | |
1259 | $ echo 4 >> f1 |
|
1259 | $ echo 4 >> f1 | |
1260 | $ hg ci -qAm k1 -u u1 |
|
1260 | $ hg ci -qAm k1 -u u1 | |
1261 | $ hg update -q b0 |
|
1261 | $ hg update -q b0 | |
1262 | $ echo 5 >> f0 |
|
1262 | $ echo 5 >> f0 | |
1263 | $ hg ci -qAm k0 -u u0 |
|
1263 | $ hg ci -qAm k0 -u u0 | |
1264 |
|
1264 | |||
1265 | summary of revisions: |
|
1265 | summary of revisions: | |
1266 |
|
1266 | |||
1267 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' |
|
1267 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' | |
1268 | @ 5 b0 u0 k0 f0 |
|
1268 | @ 5 b0 u0 k0 f0 | |
1269 | | |
|
1269 | | | |
1270 | | o 4 b1 u1 k1 f1 |
|
1270 | | o 4 b1 u1 k1 f1 | |
1271 | | | |
|
1271 | | | | |
1272 | | | o 3 b2 u2 k2 f2 |
|
1272 | | | o 3 b2 u2 k2 f2 | |
1273 | | | | |
|
1273 | | | | | |
1274 | | | o 2 b2 u2 k2 f2 |
|
1274 | | | o 2 b2 u2 k2 f2 | |
1275 | | |/ |
|
1275 | | |/ | |
1276 | | o 1 b1 u1 k1 f1 |
|
1276 | | o 1 b1 u1 k1 f1 | |
1277 | |/ |
|
1277 | |/ | |
1278 | o 0 b0 u0 k0 f0 |
|
1278 | o 0 b0 u0 k0 f0 | |
1279 |
|
1279 | |||
1280 |
|
1280 | |||
1281 | log -b BRANCH in ascending order: |
|
1281 | log -b BRANCH in ascending order: | |
1282 |
|
1282 | |||
1283 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 |
|
1283 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 | |
1284 | 0 b0 |
|
1284 | 0 b0 | |
1285 | 1 b1 |
|
1285 | 1 b1 | |
1286 | 4 b1 |
|
1286 | 4 b1 | |
1287 | 5 b0 |
|
1287 | 5 b0 | |
1288 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 |
|
1288 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 | |
1289 | 0 b0 |
|
1289 | 0 b0 | |
1290 | 1 b1 |
|
1290 | 1 b1 | |
1291 | 4 b1 |
|
1291 | 4 b1 | |
1292 | 5 b0 |
|
1292 | 5 b0 | |
1293 |
|
1293 | |||
1294 | log --only-branch BRANCH in descending order: |
|
1294 | log --only-branch BRANCH in descending order: | |
1295 |
|
1295 | |||
1296 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 |
|
1296 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 | |
1297 | 4 b1 |
|
1297 | 4 b1 | |
1298 | 3 b2 |
|
1298 | 3 b2 | |
1299 | 2 b2 |
|
1299 | 2 b2 | |
1300 | 1 b1 |
|
1300 | 1 b1 | |
1301 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 |
|
1301 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 | |
1302 | 4 b1 |
|
1302 | 4 b1 | |
1303 | 3 b2 |
|
1303 | 3 b2 | |
1304 | 2 b2 |
|
1304 | 2 b2 | |
1305 | 1 b1 |
|
1305 | 1 b1 | |
1306 |
|
1306 | |||
1307 | log -u USER in ascending order, against compound set: |
|
1307 | log -u USER in ascending order, against compound set: | |
1308 |
|
1308 | |||
1309 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 |
|
1309 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 | |
1310 | 0 u0 |
|
1310 | 0 u0 | |
1311 | 2 u2 |
|
1311 | 2 u2 | |
1312 | 3 u2 |
|
1312 | 3 u2 | |
1313 | 5 u0 |
|
1313 | 5 u0 | |
1314 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 |
|
1314 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 | |
1315 | 0 u0 |
|
1315 | 0 u0 | |
1316 | 2 u2 |
|
1316 | 2 u2 | |
1317 | 3 u2 |
|
1317 | 3 u2 | |
1318 | 5 u0 |
|
1318 | 5 u0 | |
1319 |
|
1319 | |||
1320 | log -k TEXT in descending order, against compound set: |
|
1320 | log -k TEXT in descending order, against compound set: | |
1321 |
|
1321 | |||
1322 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 |
|
1322 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 | |
1323 | 5 k0 |
|
1323 | 5 k0 | |
1324 | 3 k2 |
|
1324 | 3 k2 | |
1325 | 2 k2 |
|
1325 | 2 k2 | |
1326 | 1 k1 |
|
1326 | 1 k1 | |
1327 | 0 k0 |
|
1327 | 0 k0 | |
1328 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 |
|
1328 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 | |
1329 | 5 k0 |
|
1329 | 5 k0 | |
1330 | 3 k2 |
|
1330 | 3 k2 | |
1331 | 2 k2 |
|
1331 | 2 k2 | |
1332 | 1 k1 |
|
1332 | 1 k1 | |
1333 | 0 k0 |
|
1333 | 0 k0 | |
1334 |
|
1334 | |||
1335 | log FILE in ascending order, against dagrange: |
|
1335 | log FILE in ascending order, against dagrange: | |
1336 |
|
1336 | |||
1337 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 |
|
1337 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 | |
1338 | 1 f1 |
|
1338 | 1 f1 | |
1339 | 2 f2 |
|
1339 | 2 f2 | |
1340 | 3 f2 |
|
1340 | 3 f2 | |
1341 | 4 f1 |
|
1341 | 4 f1 | |
1342 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 |
|
1342 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 | |
1343 | 1 f1 |
|
1343 | 1 f1 | |
1344 | 2 f2 |
|
1344 | 2 f2 | |
1345 | 3 f2 |
|
1345 | 3 f2 | |
1346 | 4 f1 |
|
1346 | 4 f1 | |
1347 |
|
1347 | |||
1348 | $ cd .. |
|
1348 | $ cd .. | |
1349 |
|
1349 | |||
1350 | User |
|
1350 | User | |
1351 |
|
1351 | |||
1352 | $ hg init usertest |
|
1352 | $ hg init usertest | |
1353 | $ cd usertest |
|
1353 | $ cd usertest | |
1354 |
|
1354 | |||
1355 | $ echo a > a |
|
1355 | $ echo a > a | |
1356 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
1356 | $ hg ci -A -m "a" -u "User One <user1@example.org>" | |
1357 | adding a |
|
1357 | adding a | |
1358 | $ echo b > b |
|
1358 | $ echo b > b | |
1359 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
1359 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" | |
1360 | adding b |
|
1360 | adding b | |
1361 |
|
1361 | |||
1362 | $ hg log -u "User One <user1@example.org>" |
|
1362 | $ hg log -u "User One <user1@example.org>" | |
1363 | changeset: 0:29a4c94f1924 |
|
1363 | changeset: 0:29a4c94f1924 | |
1364 | user: User One <user1@example.org> |
|
1364 | user: User One <user1@example.org> | |
1365 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1365 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1366 | summary: a |
|
1366 | summary: a | |
1367 |
|
1367 | |||
1368 | $ hg log -u "user1" -u "user2" |
|
1368 | $ hg log -u "user1" -u "user2" | |
1369 | changeset: 1:e834b5e69c0e |
|
1369 | changeset: 1:e834b5e69c0e | |
1370 | tag: tip |
|
1370 | tag: tip | |
1371 | user: User Two <user2@example.org> |
|
1371 | user: User Two <user2@example.org> | |
1372 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1372 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1373 | summary: b |
|
1373 | summary: b | |
1374 |
|
1374 | |||
1375 | changeset: 0:29a4c94f1924 |
|
1375 | changeset: 0:29a4c94f1924 | |
1376 | user: User One <user1@example.org> |
|
1376 | user: User One <user1@example.org> | |
1377 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1378 | summary: a |
|
1378 | summary: a | |
1379 |
|
1379 | |||
1380 | $ hg log -u "user3" |
|
1380 | $ hg log -u "user3" | |
1381 |
|
1381 | |||
1382 | "-u USER" shouldn't be overridden by "user(USER)" alias |
|
1382 | "-u USER" shouldn't be overridden by "user(USER)" alias | |
1383 |
|
1383 | |||
1384 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default |
|
1384 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default | |
1385 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 |
|
1385 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 | |
1386 | changeset: 0:29a4c94f1924 |
|
1386 | changeset: 0:29a4c94f1924 | |
1387 | user: User One <user1@example.org> |
|
1387 | user: User One <user1@example.org> | |
1388 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1388 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1389 | summary: a |
|
1389 | summary: a | |
1390 |
|
1390 | |||
1391 |
|
1391 | |||
1392 | $ cd .. |
|
1392 | $ cd .. | |
1393 |
|
1393 | |||
1394 | $ hg init branches |
|
1394 | $ hg init branches | |
1395 | $ cd branches |
|
1395 | $ cd branches | |
1396 |
|
1396 | |||
1397 | $ echo a > a |
|
1397 | $ echo a > a | |
1398 | $ hg ci -A -m "commit on default" |
|
1398 | $ hg ci -A -m "commit on default" | |
1399 | adding a |
|
1399 | adding a | |
1400 | $ hg branch test |
|
1400 | $ hg branch test | |
1401 | marked working directory as branch test |
|
1401 | marked working directory as branch test | |
1402 | (branches are permanent and global, did you want a bookmark?) |
|
1402 | (branches are permanent and global, did you want a bookmark?) | |
1403 | $ echo b > b |
|
1403 | $ echo b > b | |
1404 | $ hg ci -A -m "commit on test" |
|
1404 | $ hg ci -A -m "commit on test" | |
1405 | adding b |
|
1405 | adding b | |
1406 |
|
1406 | |||
1407 | $ hg up default |
|
1407 | $ hg up default | |
1408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1409 | $ echo c > c |
|
1409 | $ echo c > c | |
1410 | $ hg ci -A -m "commit on default" |
|
1410 | $ hg ci -A -m "commit on default" | |
1411 | adding c |
|
1411 | adding c | |
1412 | $ hg up test |
|
1412 | $ hg up test | |
1413 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1413 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1414 | $ echo c > c |
|
1414 | $ echo c > c | |
1415 | $ hg ci -A -m "commit on test" |
|
1415 | $ hg ci -A -m "commit on test" | |
1416 | adding c |
|
1416 | adding c | |
1417 |
|
1417 | |||
1418 |
|
1418 | |||
1419 | log -b default |
|
1419 | log -b default | |
1420 |
|
1420 | |||
1421 | $ hg log -b default |
|
1421 | $ hg log -b default | |
1422 | changeset: 2:c3a4f03cc9a7 |
|
1422 | changeset: 2:c3a4f03cc9a7 | |
1423 | parent: 0:24427303d56f |
|
1423 | parent: 0:24427303d56f | |
1424 | user: test |
|
1424 | user: test | |
1425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1425 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1426 | summary: commit on default |
|
1426 | summary: commit on default | |
1427 |
|
1427 | |||
1428 | changeset: 0:24427303d56f |
|
1428 | changeset: 0:24427303d56f | |
1429 | user: test |
|
1429 | user: test | |
1430 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1430 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1431 | summary: commit on default |
|
1431 | summary: commit on default | |
1432 |
|
1432 | |||
1433 |
|
1433 | |||
1434 |
|
1434 | |||
1435 | log -b test |
|
1435 | log -b test | |
1436 |
|
1436 | |||
1437 | $ hg log -b test |
|
1437 | $ hg log -b test | |
1438 | changeset: 3:f5d8de11c2e2 |
|
1438 | changeset: 3:f5d8de11c2e2 | |
1439 | branch: test |
|
1439 | branch: test | |
1440 | tag: tip |
|
1440 | tag: tip | |
1441 | parent: 1:d32277701ccb |
|
1441 | parent: 1:d32277701ccb | |
1442 | user: test |
|
1442 | user: test | |
1443 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1443 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1444 | summary: commit on test |
|
1444 | summary: commit on test | |
1445 |
|
1445 | |||
1446 | changeset: 1:d32277701ccb |
|
1446 | changeset: 1:d32277701ccb | |
1447 | branch: test |
|
1447 | branch: test | |
1448 | user: test |
|
1448 | user: test | |
1449 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1449 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1450 | summary: commit on test |
|
1450 | summary: commit on test | |
1451 |
|
1451 | |||
1452 |
|
1452 | |||
1453 |
|
1453 | |||
1454 | log -b dummy |
|
1454 | log -b dummy | |
1455 |
|
1455 | |||
1456 | $ hg log -b dummy |
|
1456 | $ hg log -b dummy | |
1457 | abort: unknown revision 'dummy'! |
|
1457 | abort: unknown revision 'dummy'! | |
1458 | [255] |
|
1458 | [255] | |
1459 |
|
1459 | |||
1460 |
|
1460 | |||
1461 | log -b . |
|
1461 | log -b . | |
1462 |
|
1462 | |||
1463 | $ hg log -b . |
|
1463 | $ hg log -b . | |
1464 | changeset: 3:f5d8de11c2e2 |
|
1464 | changeset: 3:f5d8de11c2e2 | |
1465 | branch: test |
|
1465 | branch: test | |
1466 | tag: tip |
|
1466 | tag: tip | |
1467 | parent: 1:d32277701ccb |
|
1467 | parent: 1:d32277701ccb | |
1468 | user: test |
|
1468 | user: test | |
1469 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1469 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1470 | summary: commit on test |
|
1470 | summary: commit on test | |
1471 |
|
1471 | |||
1472 | changeset: 1:d32277701ccb |
|
1472 | changeset: 1:d32277701ccb | |
1473 | branch: test |
|
1473 | branch: test | |
1474 | user: test |
|
1474 | user: test | |
1475 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1475 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1476 | summary: commit on test |
|
1476 | summary: commit on test | |
1477 |
|
1477 | |||
1478 |
|
1478 | |||
1479 |
|
1479 | |||
1480 | log -b default -b test |
|
1480 | log -b default -b test | |
1481 |
|
1481 | |||
1482 | $ hg log -b default -b test |
|
1482 | $ hg log -b default -b test | |
1483 | changeset: 3:f5d8de11c2e2 |
|
1483 | changeset: 3:f5d8de11c2e2 | |
1484 | branch: test |
|
1484 | branch: test | |
1485 | tag: tip |
|
1485 | tag: tip | |
1486 | parent: 1:d32277701ccb |
|
1486 | parent: 1:d32277701ccb | |
1487 | user: test |
|
1487 | user: test | |
1488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1488 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1489 | summary: commit on test |
|
1489 | summary: commit on test | |
1490 |
|
1490 | |||
1491 | changeset: 2:c3a4f03cc9a7 |
|
1491 | changeset: 2:c3a4f03cc9a7 | |
1492 | parent: 0:24427303d56f |
|
1492 | parent: 0:24427303d56f | |
1493 | user: test |
|
1493 | user: test | |
1494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1494 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1495 | summary: commit on default |
|
1495 | summary: commit on default | |
1496 |
|
1496 | |||
1497 | changeset: 1:d32277701ccb |
|
1497 | changeset: 1:d32277701ccb | |
1498 | branch: test |
|
1498 | branch: test | |
1499 | user: test |
|
1499 | user: test | |
1500 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1500 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1501 | summary: commit on test |
|
1501 | summary: commit on test | |
1502 |
|
1502 | |||
1503 | changeset: 0:24427303d56f |
|
1503 | changeset: 0:24427303d56f | |
1504 | user: test |
|
1504 | user: test | |
1505 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1505 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1506 | summary: commit on default |
|
1506 | summary: commit on default | |
1507 |
|
1507 | |||
1508 |
|
1508 | |||
1509 |
|
1509 | |||
1510 | log -b default -b . |
|
1510 | log -b default -b . | |
1511 |
|
1511 | |||
1512 | $ hg log -b default -b . |
|
1512 | $ hg log -b default -b . | |
1513 | changeset: 3:f5d8de11c2e2 |
|
1513 | changeset: 3:f5d8de11c2e2 | |
1514 | branch: test |
|
1514 | branch: test | |
1515 | tag: tip |
|
1515 | tag: tip | |
1516 | parent: 1:d32277701ccb |
|
1516 | parent: 1:d32277701ccb | |
1517 | user: test |
|
1517 | user: test | |
1518 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1518 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1519 | summary: commit on test |
|
1519 | summary: commit on test | |
1520 |
|
1520 | |||
1521 | changeset: 2:c3a4f03cc9a7 |
|
1521 | changeset: 2:c3a4f03cc9a7 | |
1522 | parent: 0:24427303d56f |
|
1522 | parent: 0:24427303d56f | |
1523 | user: test |
|
1523 | user: test | |
1524 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1524 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1525 | summary: commit on default |
|
1525 | summary: commit on default | |
1526 |
|
1526 | |||
1527 | changeset: 1:d32277701ccb |
|
1527 | changeset: 1:d32277701ccb | |
1528 | branch: test |
|
1528 | branch: test | |
1529 | user: test |
|
1529 | user: test | |
1530 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1530 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1531 | summary: commit on test |
|
1531 | summary: commit on test | |
1532 |
|
1532 | |||
1533 | changeset: 0:24427303d56f |
|
1533 | changeset: 0:24427303d56f | |
1534 | user: test |
|
1534 | user: test | |
1535 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1535 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1536 | summary: commit on default |
|
1536 | summary: commit on default | |
1537 |
|
1537 | |||
1538 |
|
1538 | |||
1539 |
|
1539 | |||
1540 | log -b . -b test |
|
1540 | log -b . -b test | |
1541 |
|
1541 | |||
1542 | $ hg log -b . -b test |
|
1542 | $ hg log -b . -b test | |
1543 | changeset: 3:f5d8de11c2e2 |
|
1543 | changeset: 3:f5d8de11c2e2 | |
1544 | branch: test |
|
1544 | branch: test | |
1545 | tag: tip |
|
1545 | tag: tip | |
1546 | parent: 1:d32277701ccb |
|
1546 | parent: 1:d32277701ccb | |
1547 | user: test |
|
1547 | user: test | |
1548 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1548 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1549 | summary: commit on test |
|
1549 | summary: commit on test | |
1550 |
|
1550 | |||
1551 | changeset: 1:d32277701ccb |
|
1551 | changeset: 1:d32277701ccb | |
1552 | branch: test |
|
1552 | branch: test | |
1553 | user: test |
|
1553 | user: test | |
1554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1554 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1555 | summary: commit on test |
|
1555 | summary: commit on test | |
1556 |
|
1556 | |||
1557 |
|
1557 | |||
1558 |
|
1558 | |||
1559 | log -b 2 |
|
1559 | log -b 2 | |
1560 |
|
1560 | |||
1561 | $ hg log -b 2 |
|
1561 | $ hg log -b 2 | |
1562 | changeset: 2:c3a4f03cc9a7 |
|
1562 | changeset: 2:c3a4f03cc9a7 | |
1563 | parent: 0:24427303d56f |
|
1563 | parent: 0:24427303d56f | |
1564 | user: test |
|
1564 | user: test | |
1565 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1565 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1566 | summary: commit on default |
|
1566 | summary: commit on default | |
1567 |
|
1567 | |||
1568 | changeset: 0:24427303d56f |
|
1568 | changeset: 0:24427303d56f | |
1569 | user: test |
|
1569 | user: test | |
1570 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1570 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1571 | summary: commit on default |
|
1571 | summary: commit on default | |
1572 |
|
1572 | |||
1573 | #if gettext |
|
1573 | #if gettext | |
1574 |
|
1574 | |||
1575 | Test that all log names are translated (e.g. branches, bookmarks, tags): |
|
1575 | Test that all log names are translated (e.g. branches, bookmarks, tags): | |
1576 |
|
1576 | |||
1577 | $ hg bookmark babar -r tip |
|
1577 | $ hg bookmark babar -r tip | |
1578 |
|
1578 | |||
1579 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip |
|
1579 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip | |
1580 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) |
|
1580 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) | |
1581 | Zweig: test |
|
1581 | Zweig: test | |
1582 | Lesezeichen: babar |
|
1582 | Lesezeichen: babar | |
1583 | Marke: tip |
|
1583 | Marke: tip | |
1584 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) |
|
1584 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) | |
1585 | Nutzer: test |
|
1585 | Nutzer: test | |
1586 | Datum: Thu Jan 01 00:00:00 1970 +0000 |
|
1586 | Datum: Thu Jan 01 00:00:00 1970 +0000 | |
1587 | Zusammenfassung: commit on test |
|
1587 | Zusammenfassung: commit on test | |
1588 |
|
1588 | |||
1589 | $ hg bookmark -d babar |
|
1589 | $ hg bookmark -d babar | |
1590 |
|
1590 | |||
1591 | #endif |
|
1591 | #endif | |
1592 |
|
1592 | |||
1593 | log -p --cwd dir (in subdir) |
|
1593 | log -p --cwd dir (in subdir) | |
1594 |
|
1594 | |||
1595 | $ mkdir dir |
|
1595 | $ mkdir dir | |
1596 | $ hg log -p --cwd dir |
|
1596 | $ hg log -p --cwd dir | |
1597 | changeset: 3:f5d8de11c2e2 |
|
1597 | changeset: 3:f5d8de11c2e2 | |
1598 | branch: test |
|
1598 | branch: test | |
1599 | tag: tip |
|
1599 | tag: tip | |
1600 | parent: 1:d32277701ccb |
|
1600 | parent: 1:d32277701ccb | |
1601 | user: test |
|
1601 | user: test | |
1602 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1602 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1603 | summary: commit on test |
|
1603 | summary: commit on test | |
1604 |
|
1604 | |||
1605 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
1605 | diff -r d32277701ccb -r f5d8de11c2e2 c | |
1606 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1606 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1607 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1607 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1608 | @@ -0,0 +1,1 @@ |
|
1608 | @@ -0,0 +1,1 @@ | |
1609 | +c |
|
1609 | +c | |
1610 |
|
1610 | |||
1611 | changeset: 2:c3a4f03cc9a7 |
|
1611 | changeset: 2:c3a4f03cc9a7 | |
1612 | parent: 0:24427303d56f |
|
1612 | parent: 0:24427303d56f | |
1613 | user: test |
|
1613 | user: test | |
1614 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1614 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1615 | summary: commit on default |
|
1615 | summary: commit on default | |
1616 |
|
1616 | |||
1617 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
1617 | diff -r 24427303d56f -r c3a4f03cc9a7 c | |
1618 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1618 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1619 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1619 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1620 | @@ -0,0 +1,1 @@ |
|
1620 | @@ -0,0 +1,1 @@ | |
1621 | +c |
|
1621 | +c | |
1622 |
|
1622 | |||
1623 | changeset: 1:d32277701ccb |
|
1623 | changeset: 1:d32277701ccb | |
1624 | branch: test |
|
1624 | branch: test | |
1625 | user: test |
|
1625 | user: test | |
1626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1626 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1627 | summary: commit on test |
|
1627 | summary: commit on test | |
1628 |
|
1628 | |||
1629 | diff -r 24427303d56f -r d32277701ccb b |
|
1629 | diff -r 24427303d56f -r d32277701ccb b | |
1630 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1630 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1631 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1631 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1632 | @@ -0,0 +1,1 @@ |
|
1632 | @@ -0,0 +1,1 @@ | |
1633 | +b |
|
1633 | +b | |
1634 |
|
1634 | |||
1635 | changeset: 0:24427303d56f |
|
1635 | changeset: 0:24427303d56f | |
1636 | user: test |
|
1636 | user: test | |
1637 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1637 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1638 | summary: commit on default |
|
1638 | summary: commit on default | |
1639 |
|
1639 | |||
1640 | diff -r 000000000000 -r 24427303d56f a |
|
1640 | diff -r 000000000000 -r 24427303d56f a | |
1641 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1641 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1642 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1642 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1643 | @@ -0,0 +1,1 @@ |
|
1643 | @@ -0,0 +1,1 @@ | |
1644 | +a |
|
1644 | +a | |
1645 |
|
1645 | |||
1646 |
|
1646 | |||
1647 |
|
1647 | |||
1648 | log -p -R repo |
|
1648 | log -p -R repo | |
1649 |
|
1649 | |||
1650 | $ cd dir |
|
1650 | $ cd dir | |
1651 | $ hg log -p -R .. ../a |
|
1651 | $ hg log -p -R .. ../a | |
1652 | changeset: 0:24427303d56f |
|
1652 | changeset: 0:24427303d56f | |
1653 | user: test |
|
1653 | user: test | |
1654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1655 | summary: commit on default |
|
1655 | summary: commit on default | |
1656 |
|
1656 | |||
1657 | diff -r 000000000000 -r 24427303d56f a |
|
1657 | diff -r 000000000000 -r 24427303d56f a | |
1658 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1658 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1659 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1659 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1660 | @@ -0,0 +1,1 @@ |
|
1660 | @@ -0,0 +1,1 @@ | |
1661 | +a |
|
1661 | +a | |
1662 |
|
1662 | |||
1663 |
|
1663 | |||
1664 | $ cd ../.. |
|
1664 | $ cd ../.. | |
1665 |
|
1665 | |||
1666 | $ hg init follow2 |
|
1666 | $ hg init follow2 | |
1667 | $ cd follow2 |
|
1667 | $ cd follow2 | |
1668 |
|
1668 | |||
1669 | # Build the following history: |
|
1669 | # Build the following history: | |
1670 | # tip - o - x - o - x - x |
|
1670 | # tip - o - x - o - x - x | |
1671 | # \ / |
|
1671 | # \ / | |
1672 | # o - o - o - x |
|
1672 | # o - o - o - x | |
1673 | # \ / |
|
1673 | # \ / | |
1674 | # o |
|
1674 | # o | |
1675 | # |
|
1675 | # | |
1676 | # Where "o" is a revision containing "foo" and |
|
1676 | # Where "o" is a revision containing "foo" and | |
1677 | # "x" is a revision without "foo" |
|
1677 | # "x" is a revision without "foo" | |
1678 |
|
1678 | |||
1679 | $ touch init |
|
1679 | $ touch init | |
1680 | $ hg ci -A -m "init, unrelated" |
|
1680 | $ hg ci -A -m "init, unrelated" | |
1681 | adding init |
|
1681 | adding init | |
1682 | $ echo 'foo' > init |
|
1682 | $ echo 'foo' > init | |
1683 | $ hg ci -m "change, unrelated" |
|
1683 | $ hg ci -m "change, unrelated" | |
1684 | $ echo 'foo' > foo |
|
1684 | $ echo 'foo' > foo | |
1685 | $ hg ci -A -m "add unrelated old foo" |
|
1685 | $ hg ci -A -m "add unrelated old foo" | |
1686 | adding foo |
|
1686 | adding foo | |
1687 | $ hg rm foo |
|
1687 | $ hg rm foo | |
1688 | $ hg ci -m "delete foo, unrelated" |
|
1688 | $ hg ci -m "delete foo, unrelated" | |
1689 | $ echo 'related' > foo |
|
1689 | $ echo 'related' > foo | |
1690 | $ hg ci -A -m "add foo, related" |
|
1690 | $ hg ci -A -m "add foo, related" | |
1691 | adding foo |
|
1691 | adding foo | |
1692 |
|
1692 | |||
1693 | $ hg up 0 |
|
1693 | $ hg up 0 | |
1694 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1694 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1695 | $ touch branch |
|
1695 | $ touch branch | |
1696 | $ hg ci -A -m "first branch, unrelated" |
|
1696 | $ hg ci -A -m "first branch, unrelated" | |
1697 | adding branch |
|
1697 | adding branch | |
1698 | created new head |
|
1698 | created new head | |
1699 | $ touch foo |
|
1699 | $ touch foo | |
1700 | $ hg ci -A -m "create foo, related" |
|
1700 | $ hg ci -A -m "create foo, related" | |
1701 | adding foo |
|
1701 | adding foo | |
1702 | $ echo 'change' > foo |
|
1702 | $ echo 'change' > foo | |
1703 | $ hg ci -m "change foo, related" |
|
1703 | $ hg ci -m "change foo, related" | |
1704 |
|
1704 | |||
1705 | $ hg up 6 |
|
1705 | $ hg up 6 | |
1706 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1706 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1707 | $ echo 'change foo in branch' > foo |
|
1707 | $ echo 'change foo in branch' > foo | |
1708 | $ hg ci -m "change foo in branch, related" |
|
1708 | $ hg ci -m "change foo in branch, related" | |
1709 | created new head |
|
1709 | created new head | |
1710 | $ hg merge 7 |
|
1710 | $ hg merge 7 | |
1711 | merging foo |
|
1711 | merging foo | |
1712 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1712 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1713 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1713 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1714 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1714 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1715 | [1] |
|
1715 | [1] | |
1716 | $ echo 'merge 1' > foo |
|
1716 | $ echo 'merge 1' > foo | |
1717 | $ hg resolve -m foo |
|
1717 | $ hg resolve -m foo | |
1718 | (no more unresolved files) |
|
1718 | (no more unresolved files) | |
1719 | $ hg ci -m "First merge, related" |
|
1719 | $ hg ci -m "First merge, related" | |
1720 |
|
1720 | |||
1721 | $ hg merge 4 |
|
1721 | $ hg merge 4 | |
1722 | merging foo |
|
1722 | merging foo | |
1723 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1723 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1724 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1724 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1725 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1725 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1726 | [1] |
|
1726 | [1] | |
1727 | $ echo 'merge 2' > foo |
|
1727 | $ echo 'merge 2' > foo | |
1728 | $ hg resolve -m foo |
|
1728 | $ hg resolve -m foo | |
1729 | (no more unresolved files) |
|
1729 | (no more unresolved files) | |
1730 | $ hg ci -m "Last merge, related" |
|
1730 | $ hg ci -m "Last merge, related" | |
1731 |
|
1731 | |||
1732 | $ hg log --graph |
|
1732 | $ hg log --graph | |
1733 | @ changeset: 10:4dae8563d2c5 |
|
1733 | @ changeset: 10:4dae8563d2c5 | |
1734 | |\ tag: tip |
|
1734 | |\ tag: tip | |
1735 | | | parent: 9:7b35701b003e |
|
1735 | | | parent: 9:7b35701b003e | |
1736 | | | parent: 4:88176d361b69 |
|
1736 | | | parent: 4:88176d361b69 | |
1737 | | | user: test |
|
1737 | | | user: test | |
1738 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1738 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1739 | | | summary: Last merge, related |
|
1739 | | | summary: Last merge, related | |
1740 | | | |
|
1740 | | | | |
1741 | | o changeset: 9:7b35701b003e |
|
1741 | | o changeset: 9:7b35701b003e | |
1742 | | |\ parent: 8:e5416ad8a855 |
|
1742 | | |\ parent: 8:e5416ad8a855 | |
1743 | | | | parent: 7:87fe3144dcfa |
|
1743 | | | | parent: 7:87fe3144dcfa | |
1744 | | | | user: test |
|
1744 | | | | user: test | |
1745 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1745 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1746 | | | | summary: First merge, related |
|
1746 | | | | summary: First merge, related | |
1747 | | | | |
|
1747 | | | | | |
1748 | | | o changeset: 8:e5416ad8a855 |
|
1748 | | | o changeset: 8:e5416ad8a855 | |
1749 | | | | parent: 6:dc6c325fe5ee |
|
1749 | | | | parent: 6:dc6c325fe5ee | |
1750 | | | | user: test |
|
1750 | | | | user: test | |
1751 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1751 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1752 | | | | summary: change foo in branch, related |
|
1752 | | | | summary: change foo in branch, related | |
1753 | | | | |
|
1753 | | | | | |
1754 | | o | changeset: 7:87fe3144dcfa |
|
1754 | | o | changeset: 7:87fe3144dcfa | |
1755 | | |/ user: test |
|
1755 | | |/ user: test | |
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1757 | | | summary: change foo, related |
|
1757 | | | summary: change foo, related | |
1758 | | | |
|
1758 | | | | |
1759 | | o changeset: 6:dc6c325fe5ee |
|
1759 | | o changeset: 6:dc6c325fe5ee | |
1760 | | | user: test |
|
1760 | | | user: test | |
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1762 | | | summary: create foo, related |
|
1762 | | | summary: create foo, related | |
1763 | | | |
|
1763 | | | | |
1764 | | o changeset: 5:73db34516eb9 |
|
1764 | | o changeset: 5:73db34516eb9 | |
1765 | | | parent: 0:e87515fd044a |
|
1765 | | | parent: 0:e87515fd044a | |
1766 | | | user: test |
|
1766 | | | user: test | |
1767 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1767 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1768 | | | summary: first branch, unrelated |
|
1768 | | | summary: first branch, unrelated | |
1769 | | | |
|
1769 | | | | |
1770 | o | changeset: 4:88176d361b69 |
|
1770 | o | changeset: 4:88176d361b69 | |
1771 | | | user: test |
|
1771 | | | user: test | |
1772 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1772 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1773 | | | summary: add foo, related |
|
1773 | | | summary: add foo, related | |
1774 | | | |
|
1774 | | | | |
1775 | o | changeset: 3:dd78ae4afb56 |
|
1775 | o | changeset: 3:dd78ae4afb56 | |
1776 | | | user: test |
|
1776 | | | user: test | |
1777 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1777 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1778 | | | summary: delete foo, unrelated |
|
1778 | | | summary: delete foo, unrelated | |
1779 | | | |
|
1779 | | | | |
1780 | o | changeset: 2:c4c64aedf0f7 |
|
1780 | o | changeset: 2:c4c64aedf0f7 | |
1781 | | | user: test |
|
1781 | | | user: test | |
1782 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1782 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1783 | | | summary: add unrelated old foo |
|
1783 | | | summary: add unrelated old foo | |
1784 | | | |
|
1784 | | | | |
1785 | o | changeset: 1:e5faa7440653 |
|
1785 | o | changeset: 1:e5faa7440653 | |
1786 | |/ user: test |
|
1786 | |/ user: test | |
1787 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1787 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1788 | | summary: change, unrelated |
|
1788 | | summary: change, unrelated | |
1789 | | |
|
1789 | | | |
1790 | o changeset: 0:e87515fd044a |
|
1790 | o changeset: 0:e87515fd044a | |
1791 | user: test |
|
1791 | user: test | |
1792 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1792 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1793 | summary: init, unrelated |
|
1793 | summary: init, unrelated | |
1794 |
|
1794 | |||
1795 |
|
1795 | |||
1796 | $ hg --traceback log -f foo |
|
1796 | $ hg --traceback log -f foo | |
1797 | changeset: 10:4dae8563d2c5 |
|
1797 | changeset: 10:4dae8563d2c5 | |
1798 | tag: tip |
|
1798 | tag: tip | |
1799 | parent: 9:7b35701b003e |
|
1799 | parent: 9:7b35701b003e | |
1800 | parent: 4:88176d361b69 |
|
1800 | parent: 4:88176d361b69 | |
1801 | user: test |
|
1801 | user: test | |
1802 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1802 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1803 | summary: Last merge, related |
|
1803 | summary: Last merge, related | |
1804 |
|
1804 | |||
1805 | changeset: 9:7b35701b003e |
|
1805 | changeset: 9:7b35701b003e | |
1806 | parent: 8:e5416ad8a855 |
|
1806 | parent: 8:e5416ad8a855 | |
1807 | parent: 7:87fe3144dcfa |
|
1807 | parent: 7:87fe3144dcfa | |
1808 | user: test |
|
1808 | user: test | |
1809 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1809 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1810 | summary: First merge, related |
|
1810 | summary: First merge, related | |
1811 |
|
1811 | |||
1812 | changeset: 8:e5416ad8a855 |
|
1812 | changeset: 8:e5416ad8a855 | |
1813 | parent: 6:dc6c325fe5ee |
|
1813 | parent: 6:dc6c325fe5ee | |
1814 | user: test |
|
1814 | user: test | |
1815 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1815 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1816 | summary: change foo in branch, related |
|
1816 | summary: change foo in branch, related | |
1817 |
|
1817 | |||
1818 | changeset: 7:87fe3144dcfa |
|
1818 | changeset: 7:87fe3144dcfa | |
1819 | user: test |
|
1819 | user: test | |
1820 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1820 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1821 | summary: change foo, related |
|
1821 | summary: change foo, related | |
1822 |
|
1822 | |||
1823 | changeset: 6:dc6c325fe5ee |
|
1823 | changeset: 6:dc6c325fe5ee | |
1824 | user: test |
|
1824 | user: test | |
1825 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1825 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1826 | summary: create foo, related |
|
1826 | summary: create foo, related | |
1827 |
|
1827 | |||
1828 | changeset: 4:88176d361b69 |
|
1828 | changeset: 4:88176d361b69 | |
1829 | user: test |
|
1829 | user: test | |
1830 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1830 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1831 | summary: add foo, related |
|
1831 | summary: add foo, related | |
1832 |
|
1832 | |||
1833 |
|
1833 | |||
1834 | Also check when maxrev < lastrevfilelog |
|
1834 | Also check when maxrev < lastrevfilelog | |
1835 |
|
1835 | |||
1836 | $ hg --traceback log -f -r4 foo |
|
1836 | $ hg --traceback log -f -r4 foo | |
1837 | changeset: 4:88176d361b69 |
|
1837 | changeset: 4:88176d361b69 | |
1838 | user: test |
|
1838 | user: test | |
1839 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1839 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1840 | summary: add foo, related |
|
1840 | summary: add foo, related | |
1841 |
|
1841 | |||
1842 | $ cd .. |
|
1842 | $ cd .. | |
1843 |
|
1843 | |||
1844 | Issue2383: hg log showing _less_ differences than hg diff |
|
1844 | Issue2383: hg log showing _less_ differences than hg diff | |
1845 |
|
1845 | |||
1846 | $ hg init issue2383 |
|
1846 | $ hg init issue2383 | |
1847 | $ cd issue2383 |
|
1847 | $ cd issue2383 | |
1848 |
|
1848 | |||
1849 | Create a test repo: |
|
1849 | Create a test repo: | |
1850 |
|
1850 | |||
1851 | $ echo a > a |
|
1851 | $ echo a > a | |
1852 | $ hg ci -Am0 |
|
1852 | $ hg ci -Am0 | |
1853 | adding a |
|
1853 | adding a | |
1854 | $ echo b > b |
|
1854 | $ echo b > b | |
1855 | $ hg ci -Am1 |
|
1855 | $ hg ci -Am1 | |
1856 | adding b |
|
1856 | adding b | |
1857 | $ hg co 0 |
|
1857 | $ hg co 0 | |
1858 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1858 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1859 | $ echo b > a |
|
1859 | $ echo b > a | |
1860 | $ hg ci -m2 |
|
1860 | $ hg ci -m2 | |
1861 | created new head |
|
1861 | created new head | |
1862 |
|
1862 | |||
1863 | Merge: |
|
1863 | Merge: | |
1864 |
|
1864 | |||
1865 | $ hg merge |
|
1865 | $ hg merge | |
1866 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1866 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1867 | (branch merge, don't forget to commit) |
|
1867 | (branch merge, don't forget to commit) | |
1868 |
|
1868 | |||
1869 | Make sure there's a file listed in the merge to trigger the bug: |
|
1869 | Make sure there's a file listed in the merge to trigger the bug: | |
1870 |
|
1870 | |||
1871 | $ echo c > a |
|
1871 | $ echo c > a | |
1872 | $ hg ci -m3 |
|
1872 | $ hg ci -m3 | |
1873 |
|
1873 | |||
1874 | Two files shown here in diff: |
|
1874 | Two files shown here in diff: | |
1875 |
|
1875 | |||
1876 | $ hg diff --rev 2:3 |
|
1876 | $ hg diff --rev 2:3 | |
1877 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1877 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1878 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1878 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1879 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1879 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1880 | @@ -1,1 +1,1 @@ |
|
1880 | @@ -1,1 +1,1 @@ | |
1881 | -b |
|
1881 | -b | |
1882 | +c |
|
1882 | +c | |
1883 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1883 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1884 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1884 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1885 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1885 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1886 | @@ -0,0 +1,1 @@ |
|
1886 | @@ -0,0 +1,1 @@ | |
1887 | +b |
|
1887 | +b | |
1888 |
|
1888 | |||
1889 | Diff here should be the same: |
|
1889 | Diff here should be the same: | |
1890 |
|
1890 | |||
1891 | $ hg log -vpr 3 |
|
1891 | $ hg log -vpr 3 | |
1892 | changeset: 3:8e07aafe1edc |
|
1892 | changeset: 3:8e07aafe1edc | |
1893 | tag: tip |
|
1893 | tag: tip | |
1894 | parent: 2:b09be438c43a |
|
1894 | parent: 2:b09be438c43a | |
1895 | parent: 1:925d80f479bb |
|
1895 | parent: 1:925d80f479bb | |
1896 | user: test |
|
1896 | user: test | |
1897 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1897 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1898 | files: a |
|
1898 | files: a | |
1899 | description: |
|
1899 | description: | |
1900 | 3 |
|
1900 | 3 | |
1901 |
|
1901 | |||
1902 |
|
1902 | |||
1903 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1903 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1904 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1904 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1905 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1905 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1906 | @@ -1,1 +1,1 @@ |
|
1906 | @@ -1,1 +1,1 @@ | |
1907 | -b |
|
1907 | -b | |
1908 | +c |
|
1908 | +c | |
1909 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1909 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1910 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1910 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1911 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1911 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1912 | @@ -0,0 +1,1 @@ |
|
1912 | @@ -0,0 +1,1 @@ | |
1913 | +b |
|
1913 | +b | |
1914 |
|
1914 | |||
1915 | $ cd .. |
|
1915 | $ cd .. | |
1916 |
|
1916 | |||
1917 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1917 | 'hg log -r rev fn' when last(filelog(fn)) != rev | |
1918 |
|
1918 | |||
1919 | $ hg init simplelog |
|
1919 | $ hg init simplelog | |
1920 | $ cd simplelog |
|
1920 | $ cd simplelog | |
1921 | $ echo f > a |
|
1921 | $ echo f > a | |
1922 | $ hg ci -Am'a' -d '0 0' |
|
1922 | $ hg ci -Am'a' -d '0 0' | |
1923 | adding a |
|
1923 | adding a | |
1924 | $ echo f >> a |
|
1924 | $ echo f >> a | |
1925 | $ hg ci -Am'a bis' -d '1 0' |
|
1925 | $ hg ci -Am'a bis' -d '1 0' | |
1926 |
|
1926 | |||
1927 | $ hg log -r0 a |
|
1927 | $ hg log -r0 a | |
1928 | changeset: 0:9f758d63dcde |
|
1928 | changeset: 0:9f758d63dcde | |
1929 | user: test |
|
1929 | user: test | |
1930 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1930 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1931 | summary: a |
|
1931 | summary: a | |
1932 |
|
1932 | |||
1933 | enable obsolete to test hidden feature |
|
1933 | enable obsolete to test hidden feature | |
1934 |
|
1934 | |||
1935 | $ cat >> $HGRCPATH << EOF |
|
1935 | $ cat >> $HGRCPATH << EOF | |
1936 | > [experimental] |
|
1936 | > [experimental] | |
1937 | > evolution.createmarkers=True |
|
1937 | > evolution.createmarkers=True | |
1938 | > EOF |
|
1938 | > EOF | |
1939 |
|
1939 | |||
1940 | $ hg log --template='{rev}:{node}\n' |
|
1940 | $ hg log --template='{rev}:{node}\n' | |
1941 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1941 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1942 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1942 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1943 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f |
|
1943 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f | |
1944 | 1 new obsolescence markers |
|
1944 | 1 new obsolescence markers | |
1945 | obsoleted 1 changesets |
|
1945 | obsoleted 1 changesets | |
1946 | $ hg up null -q |
|
1946 | $ hg up null -q | |
1947 | $ hg log --template='{rev}:{node}\n' |
|
1947 | $ hg log --template='{rev}:{node}\n' | |
1948 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1948 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1949 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1949 | $ hg log --template='{rev}:{node}\n' --hidden | |
1950 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1950 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1951 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1951 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1952 | $ hg log -r a |
|
1952 | $ hg log -r a | |
1953 | abort: hidden revision 'a' is pruned! |
|
1953 | abort: hidden revision 'a' is pruned! | |
1954 | (use --hidden to access hidden revisions) |
|
1954 | (use --hidden to access hidden revisions) | |
1955 | [255] |
|
1955 | [255] | |
1956 |
|
1956 | |||
1957 | test that parent prevent a changeset to be hidden |
|
1957 | test that parent prevent a changeset to be hidden | |
1958 |
|
1958 | |||
1959 | $ hg up 1 -q --hidden |
|
1959 | $ hg up 1 -q --hidden | |
1960 | updated to hidden changeset a765632148dc |
|
1960 | updated to hidden changeset a765632148dc | |
1961 | (hidden revision 'a765632148dc' is pruned) |
|
1961 | (hidden revision 'a765632148dc' is pruned) | |
1962 | $ hg log --template='{rev}:{node}\n' |
|
1962 | $ hg log --template='{rev}:{node}\n' | |
1963 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1963 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1964 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1964 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1965 |
|
1965 | |||
1966 | test that second parent prevent a changeset to be hidden too |
|
1966 | test that second parent prevent a changeset to be hidden too | |
1967 |
|
1967 | |||
1968 | $ hg debugsetparents 0 1 # nothing suitable to merge here |
|
1968 | $ hg debugsetparents 0 1 # nothing suitable to merge here | |
1969 | $ hg log --template='{rev}:{node}\n' |
|
1969 | $ hg log --template='{rev}:{node}\n' | |
1970 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1970 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1971 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1971 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1972 | $ hg debugsetparents 1 |
|
1972 | $ hg debugsetparents 1 | |
1973 | $ hg up -q null |
|
1973 | $ hg up -q null | |
1974 |
|
1974 | |||
1975 | bookmarks prevent a changeset being hidden |
|
1975 | bookmarks prevent a changeset being hidden | |
1976 |
|
1976 | |||
1977 | $ hg bookmark --hidden -r 1 X |
|
1977 | $ hg bookmark --hidden -r 1 X | |
1978 | bookmarking hidden changeset a765632148dc |
|
1978 | bookmarking hidden changeset a765632148dc | |
1979 | (hidden revision 'a765632148dc' is pruned) |
|
1979 | (hidden revision 'a765632148dc' is pruned) | |
1980 | $ hg log --template '{rev}:{node}\n' |
|
1980 | $ hg log --template '{rev}:{node}\n' | |
1981 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1981 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1982 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1982 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1983 | $ hg bookmark -d X |
|
1983 | $ hg bookmark -d X | |
1984 |
|
1984 | |||
1985 | divergent bookmarks are not hidden |
|
1985 | divergent bookmarks are not hidden | |
1986 |
|
1986 | |||
1987 | $ hg bookmark --hidden -r 1 X@foo |
|
1987 | $ hg bookmark --hidden -r 1 X@foo | |
1988 | bookmarking hidden changeset a765632148dc |
|
1988 | bookmarking hidden changeset a765632148dc | |
1989 | (hidden revision 'a765632148dc' is pruned) |
|
1989 | (hidden revision 'a765632148dc' is pruned) | |
1990 | $ hg log --template '{rev}:{node}\n' |
|
1990 | $ hg log --template '{rev}:{node}\n' | |
1991 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1991 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1992 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1992 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1993 |
|
1993 | |||
1994 | test hidden revision 0 (issue5385) |
|
1994 | test hidden revision 0 (issue5385) | |
1995 |
|
1995 | |||
1996 | $ hg bookmark -d X@foo |
|
1996 | $ hg bookmark -d X@foo | |
1997 | $ hg up null -q |
|
1997 | $ hg up null -q | |
1998 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1998 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1999 | 1 new obsolescence markers |
|
1999 | 1 new obsolescence markers | |
2000 | obsoleted 1 changesets |
|
2000 | obsoleted 1 changesets | |
2001 | $ echo f > b |
|
2001 | $ echo f > b | |
2002 | $ hg ci -Am'b' -d '2 0' |
|
2002 | $ hg ci -Am'b' -d '2 0' | |
2003 | adding b |
|
2003 | adding b | |
2004 | $ echo f >> b |
|
2004 | $ echo f >> b | |
2005 | $ hg ci -m'b bis' -d '3 0' |
|
2005 | $ hg ci -m'b bis' -d '3 0' | |
2006 | $ hg log -T'{rev}:{node}\n' |
|
2006 | $ hg log -T'{rev}:{node}\n' | |
2007 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2007 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2008 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2008 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2009 |
|
2009 | |||
2010 | $ hg log -T'{rev}:{node}\n' -r: |
|
2010 | $ hg log -T'{rev}:{node}\n' -r: | |
2011 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2011 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2012 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2012 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2013 | $ hg log -T'{rev}:{node}\n' -r:tip |
|
2013 | $ hg log -T'{rev}:{node}\n' -r:tip | |
2014 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2014 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2015 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2015 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2016 | $ hg log -T'{rev}:{node}\n' -r:0 |
|
2016 | $ hg log -T'{rev}:{node}\n' -r:0 | |
2017 | abort: hidden revision '0' is pruned! |
|
2017 | abort: hidden revision '0' is pruned! | |
2018 | (use --hidden to access hidden revisions) |
|
2018 | (use --hidden to access hidden revisions) | |
2019 | [255] |
|
2019 | [255] | |
2020 | $ hg log -T'{rev}:{node}\n' -f |
|
2020 | $ hg log -T'{rev}:{node}\n' -f | |
2021 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2021 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2022 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2022 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2023 |
|
2023 | |||
2024 | clear extensions configuration |
|
2024 | clear extensions configuration | |
2025 | $ echo '[extensions]' >> $HGRCPATH |
|
2025 | $ echo '[extensions]' >> $HGRCPATH | |
2026 | $ echo "obs=!" >> $HGRCPATH |
|
2026 | $ echo "obs=!" >> $HGRCPATH | |
2027 | $ cd .. |
|
2027 | $ cd .. | |
2028 |
|
2028 | |||
2029 | test -u/-k for problematic encoding |
|
2029 | test -u/-k for problematic encoding | |
2030 | # unicode: cp932: |
|
2030 | # unicode: cp932: | |
2031 | # u30A2 0x83 0x41(= 'A') |
|
2031 | # u30A2 0x83 0x41(= 'A') | |
2032 | # u30C2 0x83 0x61(= 'a') |
|
2032 | # u30C2 0x83 0x61(= 'a') | |
2033 |
|
2033 | |||
2034 | $ hg init problematicencoding |
|
2034 | $ hg init problematicencoding | |
2035 | $ cd problematicencoding |
|
2035 | $ cd problematicencoding | |
2036 |
|
2036 | |||
2037 | >>> with open('setup.sh', 'wb') as f: |
|
2037 | >>> with open('setup.sh', 'wb') as f: | |
2038 | ... f.write(u''' |
|
2038 | ... f.write(u''' | |
2039 | ... echo a > text |
|
2039 | ... echo a > text | |
2040 | ... hg add text |
|
2040 | ... hg add text | |
2041 | ... hg --encoding utf-8 commit -u '\u30A2' -m none |
|
2041 | ... hg --encoding utf-8 commit -u '\u30A2' -m none | |
2042 | ... echo b > text |
|
2042 | ... echo b > text | |
2043 | ... hg --encoding utf-8 commit -u '\u30C2' -m none |
|
2043 | ... hg --encoding utf-8 commit -u '\u30C2' -m none | |
2044 | ... echo c > text |
|
2044 | ... echo c > text | |
2045 | ... hg --encoding utf-8 commit -u none -m '\u30A2' |
|
2045 | ... hg --encoding utf-8 commit -u none -m '\u30A2' | |
2046 | ... echo d > text |
|
2046 | ... echo d > text | |
2047 | ... hg --encoding utf-8 commit -u none -m '\u30C2' |
|
2047 | ... hg --encoding utf-8 commit -u none -m '\u30C2' | |
2048 | ... '''.encode('utf-8')) and None |
|
2048 | ... '''.encode('utf-8')) and None | |
2049 | $ sh < setup.sh |
|
2049 | $ sh < setup.sh | |
2050 |
|
2050 | |||
2051 | test in problematic encoding |
|
2051 | test in problematic encoding | |
2052 | >>> with open('test.sh', 'wb') as f: |
|
2052 | >>> with open('test.sh', 'wb') as f: | |
2053 | ... f.write(u''' |
|
2053 | ... f.write(u''' | |
2054 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' |
|
2054 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' | |
2055 | ... echo ==== |
|
2055 | ... echo ==== | |
2056 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' |
|
2056 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' | |
2057 | ... echo ==== |
|
2057 | ... echo ==== | |
2058 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' |
|
2058 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' | |
2059 | ... echo ==== |
|
2059 | ... echo ==== | |
2060 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' |
|
2060 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' | |
2061 | ... '''.encode('cp932')) and None |
|
2061 | ... '''.encode('cp932')) and None | |
2062 | $ sh < test.sh |
|
2062 | $ sh < test.sh | |
2063 | 0 |
|
2063 | 0 | |
2064 | ==== |
|
2064 | ==== | |
2065 | 1 |
|
2065 | 1 | |
2066 | ==== |
|
2066 | ==== | |
2067 | 2 |
|
2067 | 2 | |
2068 | 0 |
|
2068 | 0 | |
2069 | ==== |
|
2069 | ==== | |
2070 | 3 |
|
2070 | 3 | |
2071 | 1 |
|
2071 | 1 | |
2072 |
|
2072 | |||
2073 | $ cd .. |
|
2073 | $ cd .. | |
2074 |
|
2074 | |||
2075 | test hg log on non-existent files and on directories |
|
2075 | test hg log on non-existent files and on directories | |
2076 | $ hg init issue1340 |
|
2076 | $ hg init issue1340 | |
2077 | $ cd issue1340 |
|
2077 | $ cd issue1340 | |
2078 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 |
|
2078 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 | |
2079 | $ echo 1 > d1/f1 |
|
2079 | $ echo 1 > d1/f1 | |
2080 | $ echo 1 > D2/f1 |
|
2080 | $ echo 1 > D2/f1 | |
2081 | $ echo 1 > D3.i/f1 |
|
2081 | $ echo 1 > D3.i/f1 | |
2082 | $ echo 1 > d4.hg/f1 |
|
2082 | $ echo 1 > d4.hg/f1 | |
2083 | $ echo 1 > d5.d/f1 |
|
2083 | $ echo 1 > d5.d/f1 | |
2084 | $ echo 1 > .d6/f1 |
|
2084 | $ echo 1 > .d6/f1 | |
2085 | $ hg -q add . |
|
2085 | $ hg -q add . | |
2086 | $ hg commit -m "a bunch of weird directories" |
|
2086 | $ hg commit -m "a bunch of weird directories" | |
2087 | $ hg log -l1 d1/f1 | grep changeset |
|
2087 | $ hg log -l1 d1/f1 | grep changeset | |
2088 | changeset: 0:65624cd9070a |
|
2088 | changeset: 0:65624cd9070a | |
2089 | $ hg log -l1 f1 |
|
2089 | $ hg log -l1 f1 | |
2090 | $ hg log -l1 . | grep changeset |
|
2090 | $ hg log -l1 . | grep changeset | |
2091 | changeset: 0:65624cd9070a |
|
2091 | changeset: 0:65624cd9070a | |
2092 | $ hg log -l1 ./ | grep changeset |
|
2092 | $ hg log -l1 ./ | grep changeset | |
2093 | changeset: 0:65624cd9070a |
|
2093 | changeset: 0:65624cd9070a | |
2094 | $ hg log -l1 d1 | grep changeset |
|
2094 | $ hg log -l1 d1 | grep changeset | |
2095 | changeset: 0:65624cd9070a |
|
2095 | changeset: 0:65624cd9070a | |
2096 | $ hg log -l1 D2 | grep changeset |
|
2096 | $ hg log -l1 D2 | grep changeset | |
2097 | changeset: 0:65624cd9070a |
|
2097 | changeset: 0:65624cd9070a | |
2098 | $ hg log -l1 D2/f1 | grep changeset |
|
2098 | $ hg log -l1 D2/f1 | grep changeset | |
2099 | changeset: 0:65624cd9070a |
|
2099 | changeset: 0:65624cd9070a | |
2100 | $ hg log -l1 D3.i | grep changeset |
|
2100 | $ hg log -l1 D3.i | grep changeset | |
2101 | changeset: 0:65624cd9070a |
|
2101 | changeset: 0:65624cd9070a | |
2102 | $ hg log -l1 D3.i/f1 | grep changeset |
|
2102 | $ hg log -l1 D3.i/f1 | grep changeset | |
2103 | changeset: 0:65624cd9070a |
|
2103 | changeset: 0:65624cd9070a | |
2104 | $ hg log -l1 d4.hg | grep changeset |
|
2104 | $ hg log -l1 d4.hg | grep changeset | |
2105 | changeset: 0:65624cd9070a |
|
2105 | changeset: 0:65624cd9070a | |
2106 | $ hg log -l1 d4.hg/f1 | grep changeset |
|
2106 | $ hg log -l1 d4.hg/f1 | grep changeset | |
2107 | changeset: 0:65624cd9070a |
|
2107 | changeset: 0:65624cd9070a | |
2108 | $ hg log -l1 d5.d | grep changeset |
|
2108 | $ hg log -l1 d5.d | grep changeset | |
2109 | changeset: 0:65624cd9070a |
|
2109 | changeset: 0:65624cd9070a | |
2110 | $ hg log -l1 d5.d/f1 | grep changeset |
|
2110 | $ hg log -l1 d5.d/f1 | grep changeset | |
2111 | changeset: 0:65624cd9070a |
|
2111 | changeset: 0:65624cd9070a | |
2112 | $ hg log -l1 .d6 | grep changeset |
|
2112 | $ hg log -l1 .d6 | grep changeset | |
2113 | changeset: 0:65624cd9070a |
|
2113 | changeset: 0:65624cd9070a | |
2114 | $ hg log -l1 .d6/f1 | grep changeset |
|
2114 | $ hg log -l1 .d6/f1 | grep changeset | |
2115 | changeset: 0:65624cd9070a |
|
2115 | changeset: 0:65624cd9070a | |
2116 |
|
2116 | |||
2117 | issue3772: hg log -r :null showing revision 0 as well |
|
2117 | issue3772: hg log -r :null showing revision 0 as well | |
2118 |
|
2118 | |||
2119 | $ hg log -r :null |
|
2119 | $ hg log -r :null | |
2120 | changeset: 0:65624cd9070a |
|
2120 | changeset: 0:65624cd9070a | |
2121 | tag: tip |
|
2121 | tag: tip | |
2122 | user: test |
|
2122 | user: test | |
2123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2123 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2124 | summary: a bunch of weird directories |
|
2124 | summary: a bunch of weird directories | |
2125 |
|
2125 | |||
2126 | changeset: -1:000000000000 |
|
2126 | changeset: -1:000000000000 | |
2127 | user: |
|
2127 | user: | |
2128 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2128 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2129 |
|
2129 | |||
2130 | $ hg log -r null:null |
|
2130 | $ hg log -r null:null | |
2131 | changeset: -1:000000000000 |
|
2131 | changeset: -1:000000000000 | |
2132 | user: |
|
2132 | user: | |
2133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2133 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2134 |
|
2134 | |||
2135 | working-directory revision requires special treatment |
|
2135 | working-directory revision requires special treatment | |
2136 |
|
2136 | |||
2137 | clean: |
|
2137 | clean: | |
2138 |
|
2138 | |||
2139 | $ hg log -r 'wdir()' --debug |
|
2139 | $ hg log -r 'wdir()' --debug | |
2140 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2140 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2141 | phase: draft |
|
2141 | phase: draft | |
2142 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2142 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2143 | parent: -1:0000000000000000000000000000000000000000 |
|
2143 | parent: -1:0000000000000000000000000000000000000000 | |
2144 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2144 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2145 | user: test |
|
2145 | user: test | |
2146 | date: [A-Za-z0-9:+ ]+ (re) |
|
2146 | date: [A-Za-z0-9:+ ]+ (re) | |
2147 | extra: branch=default |
|
2147 | extra: branch=default | |
2148 |
|
2148 | |||
2149 | $ hg log -r 'wdir()' -p --stat |
|
2149 | $ hg log -r 'wdir()' -p --stat | |
2150 | changeset: 2147483647:ffffffffffff |
|
2150 | changeset: 2147483647:ffffffffffff | |
2151 | parent: 0:65624cd9070a |
|
2151 | parent: 0:65624cd9070a | |
2152 | user: test |
|
2152 | user: test | |
2153 | date: [A-Za-z0-9:+ ]+ (re) |
|
2153 | date: [A-Za-z0-9:+ ]+ (re) | |
2154 |
|
2154 | |||
2155 |
|
2155 | |||
2156 |
|
2156 | |||
2157 |
|
2157 | |||
2158 | dirty: |
|
2158 | dirty: | |
2159 |
|
2159 | |||
2160 | $ echo 2 >> d1/f1 |
|
2160 | $ echo 2 >> d1/f1 | |
2161 | $ echo 2 > d1/f2 |
|
2161 | $ echo 2 > d1/f2 | |
2162 | $ hg add d1/f2 |
|
2162 | $ hg add d1/f2 | |
2163 | $ hg remove .d6/f1 |
|
2163 | $ hg remove .d6/f1 | |
2164 | $ hg status |
|
2164 | $ hg status | |
2165 | M d1/f1 |
|
2165 | M d1/f1 | |
2166 | A d1/f2 |
|
2166 | A d1/f2 | |
2167 | R .d6/f1 |
|
2167 | R .d6/f1 | |
2168 |
|
2168 | |||
2169 | $ hg log -r 'wdir()' |
|
2169 | $ hg log -r 'wdir()' | |
2170 | changeset: 2147483647:ffffffffffff |
|
2170 | changeset: 2147483647:ffffffffffff | |
2171 | parent: 0:65624cd9070a |
|
2171 | parent: 0:65624cd9070a | |
2172 | user: test |
|
2172 | user: test | |
2173 | date: [A-Za-z0-9:+ ]+ (re) |
|
2173 | date: [A-Za-z0-9:+ ]+ (re) | |
2174 |
|
2174 | |||
2175 | $ hg log -r 'wdir()' -q |
|
2175 | $ hg log -r 'wdir()' -q | |
2176 | 2147483647:ffffffffffff |
|
2176 | 2147483647:ffffffffffff | |
2177 |
|
2177 | |||
2178 | $ hg log -r 'wdir()' --debug |
|
2178 | $ hg log -r 'wdir()' --debug | |
2179 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2179 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2180 | phase: draft |
|
2180 | phase: draft | |
2181 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2181 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2182 | parent: -1:0000000000000000000000000000000000000000 |
|
2182 | parent: -1:0000000000000000000000000000000000000000 | |
2183 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2183 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2184 | user: test |
|
2184 | user: test | |
2185 | date: [A-Za-z0-9:+ ]+ (re) |
|
2185 | date: [A-Za-z0-9:+ ]+ (re) | |
2186 | files: d1/f1 |
|
2186 | files: d1/f1 | |
2187 | files+: d1/f2 |
|
2187 | files+: d1/f2 | |
2188 | files-: .d6/f1 |
|
2188 | files-: .d6/f1 | |
2189 | extra: branch=default |
|
2189 | extra: branch=default | |
2190 |
|
2190 | |||
2191 | $ hg log -r 'wdir()' -p --stat --git |
|
2191 | $ hg log -r 'wdir()' -p --stat --git | |
2192 | changeset: 2147483647:ffffffffffff |
|
2192 | changeset: 2147483647:ffffffffffff | |
2193 | parent: 0:65624cd9070a |
|
2193 | parent: 0:65624cd9070a | |
2194 | user: test |
|
2194 | user: test | |
2195 | date: [A-Za-z0-9:+ ]+ (re) |
|
2195 | date: [A-Za-z0-9:+ ]+ (re) | |
2196 |
|
2196 | |||
2197 | .d6/f1 | 1 - |
|
2197 | .d6/f1 | 1 - | |
2198 | d1/f1 | 1 + |
|
2198 | d1/f1 | 1 + | |
2199 | d1/f2 | 1 + |
|
2199 | d1/f2 | 1 + | |
2200 | 3 files changed, 2 insertions(+), 1 deletions(-) |
|
2200 | 3 files changed, 2 insertions(+), 1 deletions(-) | |
2201 |
|
2201 | |||
2202 | diff --git a/.d6/f1 b/.d6/f1 |
|
2202 | diff --git a/.d6/f1 b/.d6/f1 | |
2203 | deleted file mode 100644 |
|
2203 | deleted file mode 100644 | |
2204 | --- a/.d6/f1 |
|
2204 | --- a/.d6/f1 | |
2205 | +++ /dev/null |
|
2205 | +++ /dev/null | |
2206 | @@ -1,1 +0,0 @@ |
|
2206 | @@ -1,1 +0,0 @@ | |
2207 | -1 |
|
2207 | -1 | |
2208 | diff --git a/d1/f1 b/d1/f1 |
|
2208 | diff --git a/d1/f1 b/d1/f1 | |
2209 | --- a/d1/f1 |
|
2209 | --- a/d1/f1 | |
2210 | +++ b/d1/f1 |
|
2210 | +++ b/d1/f1 | |
2211 | @@ -1,1 +1,2 @@ |
|
2211 | @@ -1,1 +1,2 @@ | |
2212 | 1 |
|
2212 | 1 | |
2213 | +2 |
|
2213 | +2 | |
2214 | diff --git a/d1/f2 b/d1/f2 |
|
2214 | diff --git a/d1/f2 b/d1/f2 | |
2215 | new file mode 100644 |
|
2215 | new file mode 100644 | |
2216 | --- /dev/null |
|
2216 | --- /dev/null | |
2217 | +++ b/d1/f2 |
|
2217 | +++ b/d1/f2 | |
2218 | @@ -0,0 +1,1 @@ |
|
2218 | @@ -0,0 +1,1 @@ | |
2219 | +2 |
|
2219 | +2 | |
2220 |
|
2220 | |||
2221 | $ hg log -r 'wdir()' -Tjson |
|
2221 | $ hg log -r 'wdir()' -Tjson | |
2222 | [ |
|
2222 | [ | |
2223 | { |
|
2223 | { | |
2224 | "bookmarks": [], |
|
2224 | "bookmarks": [], | |
2225 | "branch": "default", |
|
2225 | "branch": "default", | |
2226 | "date": [*, 0], (glob) |
|
2226 | "date": [*, 0], (glob) | |
2227 | "desc": "", |
|
2227 | "desc": "", | |
2228 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2228 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2229 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2229 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], | |
2230 | "phase": "draft", |
|
2230 | "phase": "draft", | |
2231 | "rev": 2147483647, |
|
2231 | "rev": 2147483647, | |
2232 | "tags": [], |
|
2232 | "tags": [], | |
2233 | "user": "test" |
|
2233 | "user": "test" | |
2234 | } |
|
2234 | } | |
2235 | ] |
|
2235 | ] | |
2236 |
|
2236 | |||
2237 | $ hg log -r 'wdir()' -Tjson -q |
|
2237 | $ hg log -r 'wdir()' -Tjson -q | |
2238 | [ |
|
2238 | [ | |
2239 | { |
|
2239 | { | |
2240 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2240 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2241 | "rev": 2147483647 |
|
2241 | "rev": 2147483647 | |
2242 | } |
|
2242 | } | |
2243 | ] |
|
2243 | ] | |
2244 |
|
2244 | |||
2245 | $ hg log -r 'wdir()' -Tjson --debug |
|
2245 | $ hg log -r 'wdir()' -Tjson --debug | |
2246 | [ |
|
2246 | [ | |
2247 | { |
|
2247 | { | |
2248 | "added": ["d1/f2"], |
|
2248 | "added": ["d1/f2"], | |
2249 | "bookmarks": [], |
|
2249 | "bookmarks": [], | |
2250 | "branch": "default", |
|
2250 | "branch": "default", | |
2251 | "date": [*, 0], (glob) |
|
2251 | "date": [*, 0], (glob) | |
2252 | "desc": "", |
|
2252 | "desc": "", | |
2253 | "extra": {"branch": "default"}, |
|
2253 | "extra": {"branch": "default"}, | |
2254 | "manifest": "ffffffffffffffffffffffffffffffffffffffff", |
|
2254 | "manifest": "ffffffffffffffffffffffffffffffffffffffff", | |
2255 | "modified": ["d1/f1"], |
|
2255 | "modified": ["d1/f1"], | |
2256 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2256 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2257 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2257 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], | |
2258 | "phase": "draft", |
|
2258 | "phase": "draft", | |
2259 | "removed": [".d6/f1"], |
|
2259 | "removed": [".d6/f1"], | |
2260 | "rev": 2147483647, |
|
2260 | "rev": 2147483647, | |
2261 | "tags": [], |
|
2261 | "tags": [], | |
2262 | "user": "test" |
|
2262 | "user": "test" | |
2263 | } |
|
2263 | } | |
2264 | ] |
|
2264 | ] | |
2265 |
|
2265 | |||
2266 | $ hg revert -aqC |
|
2266 | $ hg revert -aqC | |
2267 |
|
2267 | |||
2268 | Check that adding an arbitrary name shows up in log automatically |
|
2268 | Check that adding an arbitrary name shows up in log automatically | |
2269 |
|
2269 | |||
2270 | $ cat > ../names.py <<EOF |
|
2270 | $ cat > ../names.py <<EOF | |
2271 | > """A small extension to test adding arbitrary names to a repo""" |
|
2271 | > """A small extension to test adding arbitrary names to a repo""" | |
2272 | > from __future__ import absolute_import |
|
2272 | > from __future__ import absolute_import | |
2273 | > from mercurial import namespaces |
|
2273 | > from mercurial import namespaces | |
2274 | > |
|
2274 | > | |
2275 | > def reposetup(ui, repo): |
|
2275 | > def reposetup(ui, repo): | |
|
2276 | > if not repo.local(): | |||
|
2277 | > return | |||
2276 |
|
|
2278 | > foo = {b'foo': repo[0].node()} | |
2277 | > names = lambda r: foo.keys() |
|
2279 | > names = lambda r: foo.keys() | |
2278 | > namemap = lambda r, name: foo.get(name) |
|
2280 | > namemap = lambda r, name: foo.get(name) | |
2279 | > nodemap = lambda r, node: [name for name, n in foo.items() |
|
2281 | > nodemap = lambda r, node: [name for name, n in foo.items() | |
2280 | > if n == node] |
|
2282 | > if n == node] | |
2281 | > ns = namespaces.namespace( |
|
2283 | > ns = namespaces.namespace( | |
2282 | > b"bars", templatename=b"bar", logname=b"barlog", |
|
2284 | > b"bars", templatename=b"bar", logname=b"barlog", | |
2283 | > colorname=b"barcolor", listnames=names, namemap=namemap, |
|
2285 | > colorname=b"barcolor", listnames=names, namemap=namemap, | |
2284 | > nodemap=nodemap) |
|
2286 | > nodemap=nodemap) | |
2285 | > |
|
2287 | > | |
2286 | > repo.names.addnamespace(ns) |
|
2288 | > repo.names.addnamespace(ns) | |
2287 | > EOF |
|
2289 | > EOF | |
2288 |
|
2290 | |||
2289 | $ hg --config extensions.names=../names.py log -r 0 |
|
2291 | $ hg --config extensions.names=../names.py log -r 0 | |
2290 | changeset: 0:65624cd9070a |
|
2292 | changeset: 0:65624cd9070a | |
2291 | tag: tip |
|
2293 | tag: tip | |
2292 | barlog: foo |
|
2294 | barlog: foo | |
2293 | user: test |
|
2295 | user: test | |
2294 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2296 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2295 | summary: a bunch of weird directories |
|
2297 | summary: a bunch of weird directories | |
2296 |
|
2298 | |||
2297 | $ hg --config extensions.names=../names.py \ |
|
2299 | $ hg --config extensions.names=../names.py \ | |
2298 | > --config extensions.color= --config color.log.barcolor=red \ |
|
2300 | > --config extensions.color= --config color.log.barcolor=red \ | |
2299 | > --color=always log -r 0 |
|
2301 | > --color=always log -r 0 | |
2300 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) |
|
2302 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) | |
2301 | tag: tip |
|
2303 | tag: tip | |
2302 | \x1b[0;31mbarlog: foo\x1b[0m (esc) |
|
2304 | \x1b[0;31mbarlog: foo\x1b[0m (esc) | |
2303 | user: test |
|
2305 | user: test | |
2304 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2306 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2305 | summary: a bunch of weird directories |
|
2307 | summary: a bunch of weird directories | |
2306 |
|
2308 | |||
2307 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' |
|
2309 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' | |
2308 | foo |
|
2310 | foo | |
2309 |
|
2311 | |||
2310 | Templater parse errors: |
|
2312 | Templater parse errors: | |
2311 |
|
2313 | |||
2312 | simple error |
|
2314 | simple error | |
2313 | $ hg log -r . -T '{shortest(node}' |
|
2315 | $ hg log -r . -T '{shortest(node}' | |
2314 | hg: parse error at 14: unexpected token: end |
|
2316 | hg: parse error at 14: unexpected token: end | |
2315 | ({shortest(node} |
|
2317 | ({shortest(node} | |
2316 | ^ here) |
|
2318 | ^ here) | |
2317 | [255] |
|
2319 | [255] | |
2318 |
|
2320 | |||
2319 | multi-line template with error |
|
2321 | multi-line template with error | |
2320 | $ hg log -r . -T 'line 1 |
|
2322 | $ hg log -r . -T 'line 1 | |
2321 | > line2 |
|
2323 | > line2 | |
2322 | > {shortest(node} |
|
2324 | > {shortest(node} | |
2323 | > line4\nline5' |
|
2325 | > line4\nline5' | |
2324 | hg: parse error at 27: unexpected token: end |
|
2326 | hg: parse error at 27: unexpected token: end | |
2325 | (line 1\nline2\n{shortest(node}\nline4\nline5 |
|
2327 | (line 1\nline2\n{shortest(node}\nline4\nline5 | |
2326 | ^ here) |
|
2328 | ^ here) | |
2327 | [255] |
|
2329 | [255] | |
2328 |
|
2330 | |||
2329 | $ cd .. |
|
2331 | $ cd .. | |
2330 |
|
2332 | |||
|
2333 | New namespace is registered per repo instance, but the template keyword | |||
|
2334 | is global. So we shouldn't expect the namespace always exists. Using | |||
|
2335 | ssh:// makes sure a bundle repository is created from scratch. (issue6301) | |||
|
2336 | ||||
|
2337 | $ hg clone -e "'$PYTHON' '$TESTDIR/dummyssh'" \ | |||
|
2338 | > -qr0 "ssh://user@dummy/`pwd`/a" a-clone | |||
|
2339 | $ hg incoming --config extensions.names=names.py -R a-clone \ | |||
|
2340 | > -e "'$PYTHON' '$TESTDIR/dummyssh'" -T '{bars}\n' -l1 | |||
|
2341 | comparing with ssh://user@dummy/$TESTTMP/a | |||
|
2342 | searching for changes | |||
|
2343 | ||||
|
2344 | ||||
2331 | hg log -f dir across branches |
|
2345 | hg log -f dir across branches | |
2332 |
|
2346 | |||
2333 | $ hg init acrossbranches |
|
2347 | $ hg init acrossbranches | |
2334 | $ cd acrossbranches |
|
2348 | $ cd acrossbranches | |
2335 | $ mkdir d |
|
2349 | $ mkdir d | |
2336 | $ echo a > d/a && hg ci -Aqm a |
|
2350 | $ echo a > d/a && hg ci -Aqm a | |
2337 | $ echo b > d/a && hg ci -Aqm b |
|
2351 | $ echo b > d/a && hg ci -Aqm b | |
2338 | $ hg up -q 0 |
|
2352 | $ hg up -q 0 | |
2339 | $ echo b > d/a && hg ci -Aqm c |
|
2353 | $ echo b > d/a && hg ci -Aqm c | |
2340 |
$ hg log -f d -T '{desc} |
|
2354 | $ hg log -f d -T '{desc}' -G | |
2341 | @ c |
|
2355 | @ c | |
2342 | | |
|
2356 | | | |
2343 | o a |
|
2357 | o a | |
2344 |
|
2358 | |||
2345 | Ensure that largefiles doesn't interfere with following a normal file |
|
2359 | Ensure that largefiles doesn't interfere with following a normal file | |
2346 |
|
|
2360 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G | |
2347 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
2361 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
2348 | @ c |
|
2362 | @ c | |
2349 | | |
|
2363 | | | |
2350 | o a |
|
2364 | o a | |
2351 |
|
|
2365 | ||
2352 |
|
|
2366 | $ hg log -f d/a -T '{desc}' -G | |
2353 | @ c |
|
2367 | @ c | |
2354 | | |
|
2368 | | | |
2355 | o a |
|
2369 | o a | |
2356 |
|
|
2370 | ||
2357 | $ cd .. |
|
2371 | $ cd .. | |
2358 |
|
2372 | |||
2359 | hg log -f with linkrev pointing to another branch |
|
2373 | hg log -f with linkrev pointing to another branch | |
2360 | ------------------------------------------------- |
|
2374 | ------------------------------------------------- | |
2361 |
|
2375 | |||
2362 | create history with a filerev whose linkrev points to another branch |
|
2376 | create history with a filerev whose linkrev points to another branch | |
2363 |
|
2377 | |||
2364 | $ hg init branchedlinkrev |
|
2378 | $ hg init branchedlinkrev | |
2365 | $ cd branchedlinkrev |
|
2379 | $ cd branchedlinkrev | |
2366 | $ echo 1 > a |
|
2380 | $ echo 1 > a | |
2367 |
|
|
2381 | $ hg commit -Am 'content1' | |
2368 | adding a |
|
2382 | adding a | |
2369 | $ echo 2 > a |
|
2383 | $ echo 2 > a | |
2370 | $ hg commit -m 'content2' |
|
2384 | $ hg commit -m 'content2' | |
2371 | $ hg up --rev 'desc(content1)' |
|
2385 | $ hg up --rev 'desc(content1)' | |
2372 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2386 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2373 | $ echo unrelated > unrelated |
|
2387 | $ echo unrelated > unrelated | |
2374 | $ hg commit -Am 'unrelated' |
|
2388 | $ hg commit -Am 'unrelated' | |
2375 | adding unrelated |
|
2389 | adding unrelated | |
2376 | created new head |
|
2390 | created new head | |
2377 | $ hg graft -r 'desc(content2)' |
|
2391 | $ hg graft -r 'desc(content2)' | |
2378 | grafting 1:2294ae80ad84 "content2" |
|
2392 | grafting 1:2294ae80ad84 "content2" | |
2379 | $ echo 3 > a |
|
2393 | $ echo 3 > a | |
2380 | $ hg commit -m 'content3' |
|
2394 | $ hg commit -m 'content3' | |
2381 | $ hg log -G |
|
2395 | $ hg log -G | |
2382 | @ changeset: 4:50b9b36e9c5d |
|
2396 | @ changeset: 4:50b9b36e9c5d | |
2383 | | tag: tip |
|
2397 | | tag: tip | |
2384 | | user: test |
|
2398 | | user: test | |
2385 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2399 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2386 | | summary: content3 |
|
2400 | | summary: content3 | |
2387 | | |
|
2401 | | | |
2388 | o changeset: 3:15b2327059e5 |
|
2402 | o changeset: 3:15b2327059e5 | |
2389 | | user: test |
|
2403 | | user: test | |
2390 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2404 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2391 | | summary: content2 |
|
2405 | | summary: content2 | |
2392 | | |
|
2406 | | | |
2393 | o changeset: 2:2029acd1168c |
|
2407 | o changeset: 2:2029acd1168c | |
2394 | | parent: 0:ae0a3c9f9e95 |
|
2408 | | parent: 0:ae0a3c9f9e95 | |
2395 | | user: test |
|
2409 | | user: test | |
2396 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2410 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2397 | | summary: unrelated |
|
2411 | | summary: unrelated | |
2398 | | |
|
2412 | | | |
2399 | | o changeset: 1:2294ae80ad84 |
|
2413 | | o changeset: 1:2294ae80ad84 | |
2400 | |/ user: test |
|
2414 | |/ user: test | |
2401 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2415 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2402 | | summary: content2 |
|
2416 | | summary: content2 | |
2403 | | |
|
2417 | | | |
2404 | o changeset: 0:ae0a3c9f9e95 |
|
2418 | o changeset: 0:ae0a3c9f9e95 | |
2405 | user: test |
|
2419 | user: test | |
2406 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2420 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2407 | summary: content1 |
|
2421 | summary: content1 | |
2408 |
|
|
2422 | ||
2409 |
|
2423 | |||
2410 | log -f on the file should list the graft result. |
|
2424 | log -f on the file should list the graft result. | |
2411 |
|
2425 | |||
2412 | $ hg log -Gf a |
|
2426 | $ hg log -Gf a | |
2413 | @ changeset: 4:50b9b36e9c5d |
|
2427 | @ changeset: 4:50b9b36e9c5d | |
2414 | | tag: tip |
|
2428 | | tag: tip | |
2415 | | user: test |
|
2429 | | user: test | |
2416 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2430 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2417 | | summary: content3 |
|
2431 | | summary: content3 | |
2418 | | |
|
2432 | | | |
2419 | o changeset: 3:15b2327059e5 |
|
2433 | o changeset: 3:15b2327059e5 | |
2420 | : user: test |
|
2434 | : user: test | |
2421 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2435 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2422 | : summary: content2 |
|
2436 | : summary: content2 | |
2423 | : |
|
2437 | : | |
2424 | o changeset: 0:ae0a3c9f9e95 |
|
2438 | o changeset: 0:ae0a3c9f9e95 | |
2425 | user: test |
|
2439 | user: test | |
2426 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2440 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2427 | summary: content1 |
|
2441 | summary: content1 | |
2428 |
|
|
2442 | ||
2429 |
|
2443 | |||
2430 | plain log lists the original version |
|
2444 | plain log lists the original version | |
2431 | (XXX we should probably list both) |
|
2445 | (XXX we should probably list both) | |
2432 |
|
2446 | |||
2433 | $ hg log -G a |
|
2447 | $ hg log -G a | |
2434 | @ changeset: 4:50b9b36e9c5d |
|
2448 | @ changeset: 4:50b9b36e9c5d | |
2435 | : tag: tip |
|
2449 | : tag: tip | |
2436 | : user: test |
|
2450 | : user: test | |
2437 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2451 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2438 | : summary: content3 |
|
2452 | : summary: content3 | |
2439 | : |
|
2453 | : | |
2440 | : o changeset: 1:2294ae80ad84 |
|
2454 | : o changeset: 1:2294ae80ad84 | |
2441 | :/ user: test |
|
2455 | :/ user: test | |
2442 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2456 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2443 | : summary: content2 |
|
2457 | : summary: content2 | |
2444 | : |
|
2458 | : | |
2445 | o changeset: 0:ae0a3c9f9e95 |
|
2459 | o changeset: 0:ae0a3c9f9e95 | |
2446 | user: test |
|
2460 | user: test | |
2447 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2461 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2448 | summary: content1 |
|
2462 | summary: content1 | |
2449 |
|
|
2463 | ||
2450 |
|
2464 | |||
2451 | hg log -f from the grafted changeset |
|
2465 | hg log -f from the grafted changeset | |
2452 | (The bootstrap should properly take the topology in account) |
|
2466 | (The bootstrap should properly take the topology in account) | |
2453 |
|
2467 | |||
2454 | $ hg up 'desc(content3)^' |
|
2468 | $ hg up 'desc(content3)^' | |
2455 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2469 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2456 | $ hg log -Gf a |
|
2470 | $ hg log -Gf a | |
2457 | @ changeset: 3:15b2327059e5 |
|
2471 | @ changeset: 3:15b2327059e5 | |
2458 | : user: test |
|
2472 | : user: test | |
2459 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2473 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2460 | : summary: content2 |
|
2474 | : summary: content2 | |
2461 | : |
|
2475 | : | |
2462 | o changeset: 0:ae0a3c9f9e95 |
|
2476 | o changeset: 0:ae0a3c9f9e95 | |
2463 | user: test |
|
2477 | user: test | |
2464 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2478 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2465 | summary: content1 |
|
2479 | summary: content1 | |
2466 |
|
|
2480 | ||
2467 |
|
2481 | |||
2468 | Test that we use the first non-hidden changeset in that case. |
|
2482 | Test that we use the first non-hidden changeset in that case. | |
2469 |
|
2483 | |||
2470 | (hide the changeset) |
|
2484 | (hide the changeset) | |
2471 |
|
2485 | |||
2472 |
|
|
2486 | $ hg log -T '{node}\n' -r 1 | |
2473 | 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2487 | 2294ae80ad8447bc78383182eeac50cb049df623 | |
2474 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2488 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 | |
2475 | 1 new obsolescence markers |
|
2489 | 1 new obsolescence markers | |
2476 | obsoleted 1 changesets |
|
2490 | obsoleted 1 changesets | |
2477 | $ hg log -G |
|
2491 | $ hg log -G | |
2478 | o changeset: 4:50b9b36e9c5d |
|
2492 | o changeset: 4:50b9b36e9c5d | |
2479 | | tag: tip |
|
2493 | | tag: tip | |
2480 | | user: test |
|
2494 | | user: test | |
2481 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2495 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2482 | | summary: content3 |
|
2496 | | summary: content3 | |
2483 | | |
|
2497 | | | |
2484 | @ changeset: 3:15b2327059e5 |
|
2498 | @ changeset: 3:15b2327059e5 | |
2485 | | user: test |
|
2499 | | user: test | |
2486 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2500 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2487 | | summary: content2 |
|
2501 | | summary: content2 | |
2488 | | |
|
2502 | | | |
2489 | o changeset: 2:2029acd1168c |
|
2503 | o changeset: 2:2029acd1168c | |
2490 | | parent: 0:ae0a3c9f9e95 |
|
2504 | | parent: 0:ae0a3c9f9e95 | |
2491 | | user: test |
|
2505 | | user: test | |
2492 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2506 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2493 | | summary: unrelated |
|
2507 | | summary: unrelated | |
2494 | | |
|
2508 | | | |
2495 | o changeset: 0:ae0a3c9f9e95 |
|
2509 | o changeset: 0:ae0a3c9f9e95 | |
2496 | user: test |
|
2510 | user: test | |
2497 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2511 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2498 | summary: content1 |
|
2512 | summary: content1 | |
2499 |
|
|
2513 | ||
2500 |
|
2514 | |||
2501 | Check that log on the file does not drop the file revision. |
|
2515 | Check that log on the file does not drop the file revision. | |
2502 |
|
2516 | |||
2503 | $ hg log -G a |
|
2517 | $ hg log -G a | |
2504 | o changeset: 4:50b9b36e9c5d |
|
2518 | o changeset: 4:50b9b36e9c5d | |
2505 | | tag: tip |
|
2519 | | tag: tip | |
2506 | | user: test |
|
2520 | | user: test | |
2507 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2521 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2508 | | summary: content3 |
|
2522 | | summary: content3 | |
2509 | | |
|
2523 | | | |
2510 | @ changeset: 3:15b2327059e5 |
|
2524 | @ changeset: 3:15b2327059e5 | |
2511 | : user: test |
|
2525 | : user: test | |
2512 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2526 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2513 | : summary: content2 |
|
2527 | : summary: content2 | |
2514 | : |
|
2528 | : | |
2515 | o changeset: 0:ae0a3c9f9e95 |
|
2529 | o changeset: 0:ae0a3c9f9e95 | |
2516 | user: test |
|
2530 | user: test | |
2517 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2531 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2518 | summary: content1 |
|
2532 | summary: content1 | |
2519 |
|
|
2533 | ||
2520 |
|
2534 | |||
2521 | Even when a head revision is linkrev-shadowed. |
|
2535 | Even when a head revision is linkrev-shadowed. | |
2522 |
|
2536 | |||
2523 |
|
|
2537 | $ hg log -T '{node}\n' -r 4 | |
2524 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2538 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2525 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2539 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2526 | 1 new obsolescence markers |
|
2540 | 1 new obsolescence markers | |
2527 | obsoleted 1 changesets |
|
2541 | obsoleted 1 changesets | |
2528 | $ hg log -G a |
|
2542 | $ hg log -G a | |
2529 | @ changeset: 3:15b2327059e5 |
|
2543 | @ changeset: 3:15b2327059e5 | |
2530 | : tag: tip |
|
2544 | : tag: tip | |
2531 | : user: test |
|
2545 | : user: test | |
2532 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2546 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2533 | : summary: content2 |
|
2547 | : summary: content2 | |
2534 | : |
|
2548 | : | |
2535 | o changeset: 0:ae0a3c9f9e95 |
|
2549 | o changeset: 0:ae0a3c9f9e95 | |
2536 | user: test |
|
2550 | user: test | |
2537 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2551 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2538 | summary: content1 |
|
2552 | summary: content1 | |
2539 |
|
|
2553 | ||
2540 |
|
2554 | |||
2541 | $ cd .. |
|
2555 | $ cd .. | |
2542 |
|
2556 | |||
2543 | Even when the file revision is missing from some head: |
|
2557 | Even when the file revision is missing from some head: | |
2544 |
|
2558 | |||
2545 | $ hg init issue4490 |
|
2559 | $ hg init issue4490 | |
2546 | $ cd issue4490 |
|
2560 | $ cd issue4490 | |
2547 | $ echo '[experimental]' >> .hg/hgrc |
|
2561 | $ echo '[experimental]' >> .hg/hgrc | |
2548 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc |
|
2562 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc | |
2549 | $ echo a > a |
|
2563 | $ echo a > a | |
2550 | $ hg ci -Am0 |
|
2564 | $ hg ci -Am0 | |
2551 | adding a |
|
2565 | adding a | |
2552 | $ echo b > b |
|
2566 | $ echo b > b | |
2553 | $ hg ci -Am1 |
|
2567 | $ hg ci -Am1 | |
2554 | adding b |
|
2568 | adding b | |
2555 | $ echo B > b |
|
2569 | $ echo B > b | |
2556 | $ hg ci --amend -m 1 |
|
2570 | $ hg ci --amend -m 1 | |
2557 | $ hg up 0 |
|
2571 | $ hg up 0 | |
2558 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2572 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2559 | $ echo c > c |
|
2573 | $ echo c > c | |
2560 | $ hg ci -Am2 |
|
2574 | $ hg ci -Am2 | |
2561 | adding c |
|
2575 | adding c | |
2562 | created new head |
|
2576 | created new head | |
2563 |
$ |
|
2577 | $ hg up 'head() and not .' | |
2564 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2578 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2565 | $ hg log -G |
|
2579 | $ hg log -G | |
2566 | o changeset: 3:db815d6d32e6 |
|
2580 | o changeset: 3:db815d6d32e6 | |
2567 | | tag: tip |
|
2581 | | tag: tip | |
2568 | | parent: 0:f7b1eb17ad24 |
|
2582 | | parent: 0:f7b1eb17ad24 | |
2569 | | user: test |
|
2583 | | user: test | |
2570 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2584 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2571 | | summary: 2 |
|
2585 | | summary: 2 | |
2572 | | |
|
2586 | | | |
2573 | | @ changeset: 2:9bc8ce7f9356 |
|
2587 | | @ changeset: 2:9bc8ce7f9356 | |
2574 | |/ parent: 0:f7b1eb17ad24 |
|
2588 | |/ parent: 0:f7b1eb17ad24 | |
2575 | | user: test |
|
2589 | | user: test | |
2576 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2590 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2577 | | summary: 1 |
|
2591 | | summary: 1 | |
2578 | | |
|
2592 | | | |
2579 | o changeset: 0:f7b1eb17ad24 |
|
2593 | o changeset: 0:f7b1eb17ad24 | |
2580 | user: test |
|
2594 | user: test | |
2581 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2595 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2582 | summary: 0 |
|
2596 | summary: 0 | |
2583 |
|
|
2597 | ||
2584 | $ hg log -f -G b |
|
2598 | $ hg log -f -G b | |
2585 | @ changeset: 2:9bc8ce7f9356 |
|
2599 | @ changeset: 2:9bc8ce7f9356 | |
2586 | | parent: 0:f7b1eb17ad24 |
|
2600 | | parent: 0:f7b1eb17ad24 | |
2587 | ~ user: test |
|
2601 | ~ user: test | |
2588 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2602 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2589 | summary: 1 |
|
2603 | summary: 1 | |
2590 |
|
|
2604 | ||
2591 | $ hg log -G b |
|
2605 | $ hg log -G b | |
2592 | @ changeset: 2:9bc8ce7f9356 |
|
2606 | @ changeset: 2:9bc8ce7f9356 | |
2593 | | parent: 0:f7b1eb17ad24 |
|
2607 | | parent: 0:f7b1eb17ad24 | |
2594 | ~ user: test |
|
2608 | ~ user: test | |
2595 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2609 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2596 | summary: 1 |
|
2610 | summary: 1 | |
2597 |
|
|
2611 | ||
2598 | $ cd .. |
|
2612 | $ cd .. | |
2599 |
|
2613 | |||
2600 | Check proper report when the manifest changes but not the file issue4499 |
|
2614 | Check proper report when the manifest changes but not the file issue4499 | |
2601 | ------------------------------------------------------------------------ |
|
2615 | ------------------------------------------------------------------------ | |
2602 |
|
2616 | |||
2603 | $ hg init issue4499 |
|
2617 | $ hg init issue4499 | |
2604 | $ cd issue4499 |
|
2618 | $ cd issue4499 | |
2605 | $ for f in A B C D F E G H I J K L M N O P Q R S T U; do |
|
2619 | $ for f in A B C D F E G H I J K L M N O P Q R S T U; do | |
2606 | > echo 1 > $f; |
|
2620 | > echo 1 > $f; | |
2607 | > hg add $f; |
|
2621 | > hg add $f; | |
2608 | > done |
|
2622 | > done | |
2609 | $ hg commit -m 'A1B1C1' |
|
2623 | $ hg commit -m 'A1B1C1' | |
2610 | $ echo 2 > A |
|
2624 | $ echo 2 > A | |
2611 | $ echo 2 > B |
|
2625 | $ echo 2 > B | |
2612 | $ echo 2 > C |
|
2626 | $ echo 2 > C | |
2613 | $ hg commit -m 'A2B2C2' |
|
2627 | $ hg commit -m 'A2B2C2' | |
2614 | $ hg up 0 |
|
2628 | $ hg up 0 | |
2615 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2629 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2616 | $ echo 3 > A |
|
2630 | $ echo 3 > A | |
2617 | $ echo 2 > B |
|
2631 | $ echo 2 > B | |
2618 | $ echo 2 > C |
|
2632 | $ echo 2 > C | |
2619 | $ hg commit -m 'A3B2C2' |
|
2633 | $ hg commit -m 'A3B2C2' | |
2620 | created new head |
|
2634 | created new head | |
2621 |
|
2635 | |||
2622 | $ hg log -G |
|
2636 | $ hg log -G | |
2623 | @ changeset: 2:fe5fc3d0eb17 |
|
2637 | @ changeset: 2:fe5fc3d0eb17 | |
2624 | | tag: tip |
|
2638 | | tag: tip | |
2625 | | parent: 0:abf4f0e38563 |
|
2639 | | parent: 0:abf4f0e38563 | |
2626 | | user: test |
|
2640 | | user: test | |
2627 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2641 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2628 | | summary: A3B2C2 |
|
2642 | | summary: A3B2C2 | |
2629 | | |
|
2643 | | | |
2630 | | o changeset: 1:07dcc6b312c0 |
|
2644 | | o changeset: 1:07dcc6b312c0 | |
2631 | |/ user: test |
|
2645 | |/ user: test | |
2632 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2646 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2633 | | summary: A2B2C2 |
|
2647 | | summary: A2B2C2 | |
2634 | | |
|
2648 | | | |
2635 | o changeset: 0:abf4f0e38563 |
|
2649 | o changeset: 0:abf4f0e38563 | |
2636 | user: test |
|
2650 | user: test | |
2637 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2651 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2638 | summary: A1B1C1 |
|
2652 | summary: A1B1C1 | |
2639 |
|
|
2653 | ||
2640 |
|
2654 | |||
2641 | Log -f on B should reports current changesets |
|
2655 | Log -f on B should reports current changesets | |
2642 |
|
2656 | |||
2643 | $ hg log -fG B |
|
2657 | $ hg log -fG B | |
2644 | @ changeset: 2:fe5fc3d0eb17 |
|
2658 | @ changeset: 2:fe5fc3d0eb17 | |
2645 | | tag: tip |
|
2659 | | tag: tip | |
2646 | | parent: 0:abf4f0e38563 |
|
2660 | | parent: 0:abf4f0e38563 | |
2647 | | user: test |
|
2661 | | user: test | |
2648 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2662 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2649 | | summary: A3B2C2 |
|
2663 | | summary: A3B2C2 | |
2650 | | |
|
2664 | | | |
2651 | o changeset: 0:abf4f0e38563 |
|
2665 | o changeset: 0:abf4f0e38563 | |
2652 | user: test |
|
2666 | user: test | |
2653 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2667 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2654 | summary: A1B1C1 |
|
2668 | summary: A1B1C1 | |
2655 |
|
|
2669 | ||
2656 | $ cd .. |
|
2670 | $ cd .. | |
2657 |
|
2671 | |||
2658 | --- going to test line wrap fix on using both --stat and -G (issue5800) |
|
2672 | --- going to test line wrap fix on using both --stat and -G (issue5800) | |
2659 | $ hg init issue5800 |
|
2673 | $ hg init issue5800 | |
2660 | $ cd issue5800 |
|
2674 | $ cd issue5800 | |
2661 | $ touch a |
|
2675 | $ touch a | |
2662 |
$ |
|
2676 | $ hg ci -Am 'add a' | |
2663 | adding a |
|
2677 | adding a | |
2664 | ---- now we are going to add 300 lines to a |
|
2678 | ---- now we are going to add 300 lines to a | |
2665 | $ for i in `$TESTDIR/seq.py 1 300`; do echo $i >> a; done |
|
2679 | $ for i in `$TESTDIR/seq.py 1 300`; do echo $i >> a; done | |
2666 |
$ |
|
2680 | $ hg ci -m 'modify a' | |
2667 | $ hg log |
|
2681 | $ hg log | |
2668 | changeset: 1:a98683e6a834 |
|
2682 | changeset: 1:a98683e6a834 | |
2669 | tag: tip |
|
2683 | tag: tip | |
2670 | user: test |
|
2684 | user: test | |
2671 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2685 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2672 | summary: modify a |
|
2686 | summary: modify a | |
2673 |
|
|
2687 | ||
2674 | changeset: 0:ac82d8b1f7c4 |
|
2688 | changeset: 0:ac82d8b1f7c4 | |
2675 | user: test |
|
2689 | user: test | |
2676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2690 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2677 | summary: add a |
|
2691 | summary: add a | |
2678 |
|
|
2692 | ||
2679 | ---- now visualise the changes we made without template |
|
2693 | ---- now visualise the changes we made without template | |
2680 | $ hg log -l1 -r a98683e6a834 --stat -G |
|
2694 | $ hg log -l1 -r a98683e6a834 --stat -G | |
2681 | @ changeset: 1:a98683e6a834 |
|
2695 | @ changeset: 1:a98683e6a834 | |
2682 | | tag: tip |
|
2696 | | tag: tip | |
2683 | ~ user: test |
|
2697 | ~ user: test | |
2684 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2698 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2685 | summary: modify a |
|
2699 | summary: modify a | |
2686 |
|
|
2700 | ||
2687 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2701 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2688 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2702 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2689 |
|
|
2703 | ||
2690 | ---- with template |
|
2704 | ---- with template | |
2691 | $ hg log -l1 -r a98683e6a834 --stat -G -T bisect |
|
2705 | $ hg log -l1 -r a98683e6a834 --stat -G -T bisect | |
2692 | @ changeset: 1:a98683e6a834 |
|
2706 | @ changeset: 1:a98683e6a834 | |
2693 | | bisect: |
|
2707 | | bisect: | |
2694 | ~ tag: tip |
|
2708 | ~ tag: tip | |
2695 | user: test |
|
2709 | user: test | |
2696 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2710 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2697 | summary: modify a |
|
2711 | summary: modify a | |
2698 |
|
|
2712 | ||
2699 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2713 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2700 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2714 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2701 |
|
|
2715 | ||
2702 | $ hg log -l1 -r a98683e6a834 --stat -G -T changelog |
|
2716 | $ hg log -l1 -r a98683e6a834 --stat -G -T changelog | |
2703 | 1970-01-01 test <test> |
|
2717 | 1970-01-01 test <test> | |
2704 |
|
|
2718 | ||
2705 | @ * a: |
|
2719 | @ * a: | |
2706 | | modify a |
|
2720 | | modify a | |
2707 | ~ [a98683e6a834] [tip] |
|
2721 | ~ [a98683e6a834] [tip] | |
2708 |
|
|
2722 | ||
2709 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2723 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2710 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2724 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2711 |
|
|
2725 | ||
2712 | $ hg log -l1 -r a98683e6a834 --stat -G -T compact |
|
2726 | $ hg log -l1 -r a98683e6a834 --stat -G -T compact | |
2713 | @ 1[tip] a98683e6a834 1970-01-01 00:00 +0000 test |
|
2727 | @ 1[tip] a98683e6a834 1970-01-01 00:00 +0000 test | |
2714 | | modify a |
|
2728 | | modify a | |
2715 | ~ |
|
2729 | ~ | |
2716 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2730 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2717 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2731 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2718 |
|
|
2732 | ||
2719 | $ hg log -l1 -r a98683e6a834 --stat -G -T default |
|
2733 | $ hg log -l1 -r a98683e6a834 --stat -G -T default | |
2720 | @ changeset: 1:a98683e6a834 |
|
2734 | @ changeset: 1:a98683e6a834 | |
2721 | | tag: tip |
|
2735 | | tag: tip | |
2722 | ~ user: test |
|
2736 | ~ user: test | |
2723 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2737 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2724 | summary: modify a |
|
2738 | summary: modify a | |
2725 |
|
|
2739 | ||
2726 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2740 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2727 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2741 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2728 |
|
|
2742 | ||
2729 | $ hg log -l1 -r a98683e6a834 --stat -G -T phases |
|
2743 | $ hg log -l1 -r a98683e6a834 --stat -G -T phases | |
2730 | @ changeset: 1:a98683e6a834 |
|
2744 | @ changeset: 1:a98683e6a834 | |
2731 | | tag: tip |
|
2745 | | tag: tip | |
2732 | ~ phase: draft |
|
2746 | ~ phase: draft | |
2733 | user: test |
|
2747 | user: test | |
2734 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2748 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2735 | summary: modify a |
|
2749 | summary: modify a | |
2736 |
|
|
2750 | ||
2737 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2751 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2738 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2752 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2739 |
|
|
2753 | ||
2740 | $ hg log -l1 -r a98683e6a834 --stat -G -T show |
|
2754 | $ hg log -l1 -r a98683e6a834 --stat -G -T show | |
2741 | @ changeset: 1:a98683e6a834 |
|
2755 | @ changeset: 1:a98683e6a834 | |
2742 | | tag: tip |
|
2756 | | tag: tip | |
2743 | ~ user: test |
|
2757 | ~ user: test | |
2744 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2758 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2745 | summary: modify a |
|
2759 | summary: modify a | |
2746 |
|
|
2760 | ||
2747 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2761 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2748 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2762 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2749 |
|
|
2763 | ||
2750 | $ hg log -l1 -r a98683e6a834 --stat -G -T status |
|
2764 | $ hg log -l1 -r a98683e6a834 --stat -G -T status | |
2751 | @ changeset: 1:a98683e6a834 |
|
2765 | @ changeset: 1:a98683e6a834 | |
2752 | | tag: tip |
|
2766 | | tag: tip | |
2753 | ~ user: test |
|
2767 | ~ user: test | |
2754 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2768 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2755 | summary: modify a |
|
2769 | summary: modify a | |
2756 | files: |
|
2770 | files: | |
2757 | M a |
|
2771 | M a | |
2758 |
|
|
2772 | ||
2759 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2773 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2760 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2774 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2761 |
|
|
2775 | ||
2762 | $ hg log -l1 -r a98683e6a834 --stat -G -T xml |
|
2776 | $ hg log -l1 -r a98683e6a834 --stat -G -T xml | |
2763 |
|
|
2777 | <?xml version="1.0"?> | |
2764 |
|
|
2778 | <log> | |
2765 | @ <logentry revision="1" node="a98683e6a8340830a7683909768b62871e84bc9d"> |
|
2779 | @ <logentry revision="1" node="a98683e6a8340830a7683909768b62871e84bc9d"> | |
2766 | | <tag>tip</tag> |
|
2780 | | <tag>tip</tag> | |
2767 | ~ <author email="test">test</author> |
|
2781 | ~ <author email="test">test</author> | |
2768 |
|
|
2782 | <date>1970-01-01T00:00:00+00:00</date> | |
2769 |
|
|
2783 | <msg xml:space="preserve">modify a</msg> | |
2770 |
|
|
2784 | </logentry> | |
2771 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2785 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2772 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2786 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2773 |
|
|
2787 | ||
2774 |
|
|
2788 | </log> | |
2775 |
|
2789 | |||
2776 | $ cd .. |
|
2790 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now