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