Show More
@@ -1,1085 +1,1093 b'' | |||||
1 | # logcmdutil.py - utility for log-like commands |
|
1 | # logcmdutil.py - utility for log-like commands | |
2 | # |
|
2 | # | |
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import itertools |
|
10 | import itertools | |
11 | import os |
|
11 | import os | |
12 | import posixpath |
|
12 | import posixpath | |
13 |
|
13 | |||
14 | from .i18n import _ |
|
14 | from .i18n import _ | |
15 | from .node import ( |
|
15 | from .node import ( | |
16 | nullid, |
|
16 | nullid, | |
17 | wdirid, |
|
17 | wdirid, | |
18 | wdirrev, |
|
18 | wdirrev, | |
19 | ) |
|
19 | ) | |
20 |
|
20 | |||
21 | from . import ( |
|
21 | from . import ( | |
22 | dagop, |
|
22 | dagop, | |
23 | error, |
|
23 | error, | |
24 | formatter, |
|
24 | formatter, | |
25 | graphmod, |
|
25 | graphmod, | |
26 | match as matchmod, |
|
26 | match as matchmod, | |
27 | mdiff, |
|
27 | mdiff, | |
28 | patch, |
|
28 | patch, | |
29 | pathutil, |
|
29 | pathutil, | |
30 | pycompat, |
|
30 | pycompat, | |
31 | revset, |
|
31 | revset, | |
32 | revsetlang, |
|
32 | revsetlang, | |
33 | scmutil, |
|
33 | scmutil, | |
34 | smartset, |
|
34 | smartset, | |
35 | templatekw, |
|
35 | templatekw, | |
36 | templater, |
|
36 | templater, | |
37 | util, |
|
37 | util, | |
38 | ) |
|
38 | ) | |
39 | from .utils import ( |
|
39 | from .utils import ( | |
40 | dateutil, |
|
40 | dateutil, | |
41 | stringutil, |
|
41 | stringutil, | |
42 | ) |
|
42 | ) | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | if pycompat.TYPE_CHECKING: |
|
45 | if pycompat.TYPE_CHECKING: | |
46 | from typing import ( |
|
46 | from typing import ( | |
47 | Any, |
|
47 | Any, | |
48 | Optional, |
|
48 | Optional, | |
49 | Tuple, |
|
49 | Tuple, | |
50 | ) |
|
50 | ) | |
51 |
|
51 | |||
52 | for t in (Any, Optional, Tuple): |
|
52 | for t in (Any, Optional, Tuple): | |
53 | assert t |
|
53 | assert t | |
54 |
|
54 | |||
55 |
|
55 | |||
56 | def getlimit(opts): |
|
56 | def getlimit(opts): | |
57 | """get the log limit according to option -l/--limit""" |
|
57 | """get the log limit according to option -l/--limit""" | |
58 | limit = opts.get(b'limit') |
|
58 | limit = opts.get(b'limit') | |
59 | if limit: |
|
59 | if limit: | |
60 | try: |
|
60 | try: | |
61 | limit = int(limit) |
|
61 | limit = int(limit) | |
62 | except ValueError: |
|
62 | except ValueError: | |
63 | raise error.Abort(_(b'limit must be a positive integer')) |
|
63 | raise error.Abort(_(b'limit must be a positive integer')) | |
64 | if limit <= 0: |
|
64 | if limit <= 0: | |
65 | raise error.Abort(_(b'limit must be positive')) |
|
65 | raise error.Abort(_(b'limit must be positive')) | |
66 | else: |
|
66 | else: | |
67 | limit = None |
|
67 | limit = None | |
68 | return limit |
|
68 | return limit | |
69 |
|
69 | |||
70 |
|
70 | |||
71 | def diffordiffstat( |
|
71 | def diffordiffstat( | |
72 | ui, |
|
72 | ui, | |
73 | repo, |
|
73 | repo, | |
74 | diffopts, |
|
74 | diffopts, | |
75 | ctx1, |
|
75 | ctx1, | |
76 | ctx2, |
|
76 | ctx2, | |
77 | match, |
|
77 | match, | |
78 | changes=None, |
|
78 | changes=None, | |
79 | stat=False, |
|
79 | stat=False, | |
80 | fp=None, |
|
80 | fp=None, | |
81 | graphwidth=0, |
|
81 | graphwidth=0, | |
82 | prefix=b'', |
|
82 | prefix=b'', | |
83 | root=b'', |
|
83 | root=b'', | |
84 | listsubrepos=False, |
|
84 | listsubrepos=False, | |
85 | hunksfilterfn=None, |
|
85 | hunksfilterfn=None, | |
86 | ): |
|
86 | ): | |
87 | '''show diff or diffstat.''' |
|
87 | '''show diff or diffstat.''' | |
88 | if root: |
|
88 | if root: | |
89 | relroot = pathutil.canonpath(repo.root, repo.getcwd(), root) |
|
89 | relroot = pathutil.canonpath(repo.root, repo.getcwd(), root) | |
90 | else: |
|
90 | else: | |
91 | relroot = b'' |
|
91 | relroot = b'' | |
92 | copysourcematch = None |
|
92 | copysourcematch = None | |
93 |
|
93 | |||
94 | def compose(f, g): |
|
94 | def compose(f, g): | |
95 | return lambda x: f(g(x)) |
|
95 | return lambda x: f(g(x)) | |
96 |
|
96 | |||
97 | def pathfn(f): |
|
97 | def pathfn(f): | |
98 | return posixpath.join(prefix, f) |
|
98 | return posixpath.join(prefix, f) | |
99 |
|
99 | |||
100 | if relroot != b'': |
|
100 | if relroot != b'': | |
101 | # XXX relative roots currently don't work if the root is within a |
|
101 | # XXX relative roots currently don't work if the root is within a | |
102 | # subrepo |
|
102 | # subrepo | |
103 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) |
|
103 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True) | |
104 | uirelroot = uipathfn(pathfn(relroot)) |
|
104 | uirelroot = uipathfn(pathfn(relroot)) | |
105 | relroot += b'/' |
|
105 | relroot += b'/' | |
106 | for matchroot in match.files(): |
|
106 | for matchroot in match.files(): | |
107 | if not matchroot.startswith(relroot): |
|
107 | if not matchroot.startswith(relroot): | |
108 | ui.warn( |
|
108 | ui.warn( | |
109 | _(b'warning: %s not inside relative root %s\n') |
|
109 | _(b'warning: %s not inside relative root %s\n') | |
110 | % (uipathfn(pathfn(matchroot)), uirelroot) |
|
110 | % (uipathfn(pathfn(matchroot)), uirelroot) | |
111 | ) |
|
111 | ) | |
112 |
|
112 | |||
113 | relrootmatch = scmutil.match(ctx2, pats=[relroot], default=b'path') |
|
113 | relrootmatch = scmutil.match(ctx2, pats=[relroot], default=b'path') | |
114 | match = matchmod.intersectmatchers(match, relrootmatch) |
|
114 | match = matchmod.intersectmatchers(match, relrootmatch) | |
115 | copysourcematch = relrootmatch |
|
115 | copysourcematch = relrootmatch | |
116 |
|
116 | |||
117 | checkroot = repo.ui.configbool( |
|
117 | checkroot = repo.ui.configbool( | |
118 | b'devel', b'all-warnings' |
|
118 | b'devel', b'all-warnings' | |
119 | ) or repo.ui.configbool(b'devel', b'check-relroot') |
|
119 | ) or repo.ui.configbool(b'devel', b'check-relroot') | |
120 |
|
120 | |||
121 | def relrootpathfn(f): |
|
121 | def relrootpathfn(f): | |
122 | if checkroot and not f.startswith(relroot): |
|
122 | if checkroot and not f.startswith(relroot): | |
123 | raise AssertionError( |
|
123 | raise AssertionError( | |
124 | b"file %s doesn't start with relroot %s" % (f, relroot) |
|
124 | b"file %s doesn't start with relroot %s" % (f, relroot) | |
125 | ) |
|
125 | ) | |
126 | return f[len(relroot) :] |
|
126 | return f[len(relroot) :] | |
127 |
|
127 | |||
128 | pathfn = compose(relrootpathfn, pathfn) |
|
128 | pathfn = compose(relrootpathfn, pathfn) | |
129 |
|
129 | |||
130 | if stat: |
|
130 | if stat: | |
131 | diffopts = diffopts.copy(context=0, noprefix=False) |
|
131 | diffopts = diffopts.copy(context=0, noprefix=False) | |
132 | width = 80 |
|
132 | width = 80 | |
133 | if not ui.plain(): |
|
133 | if not ui.plain(): | |
134 | width = ui.termwidth() - graphwidth |
|
134 | width = ui.termwidth() - graphwidth | |
135 | # If an explicit --root was given, don't respect ui.relative-paths |
|
135 | # If an explicit --root was given, don't respect ui.relative-paths | |
136 | if not relroot: |
|
136 | if not relroot: | |
137 | pathfn = compose(scmutil.getuipathfn(repo), pathfn) |
|
137 | pathfn = compose(scmutil.getuipathfn(repo), pathfn) | |
138 |
|
138 | |||
139 | chunks = ctx2.diff( |
|
139 | chunks = ctx2.diff( | |
140 | ctx1, |
|
140 | ctx1, | |
141 | match, |
|
141 | match, | |
142 | changes, |
|
142 | changes, | |
143 | opts=diffopts, |
|
143 | opts=diffopts, | |
144 | pathfn=pathfn, |
|
144 | pathfn=pathfn, | |
145 | copysourcematch=copysourcematch, |
|
145 | copysourcematch=copysourcematch, | |
146 | hunksfilterfn=hunksfilterfn, |
|
146 | hunksfilterfn=hunksfilterfn, | |
147 | ) |
|
147 | ) | |
148 |
|
148 | |||
149 | if fp is not None or ui.canwritewithoutlabels(): |
|
149 | if fp is not None or ui.canwritewithoutlabels(): | |
150 | out = fp or ui |
|
150 | out = fp or ui | |
151 | if stat: |
|
151 | if stat: | |
152 | chunks = [patch.diffstat(util.iterlines(chunks), width=width)] |
|
152 | chunks = [patch.diffstat(util.iterlines(chunks), width=width)] | |
153 | for chunk in util.filechunkiter(util.chunkbuffer(chunks)): |
|
153 | for chunk in util.filechunkiter(util.chunkbuffer(chunks)): | |
154 | out.write(chunk) |
|
154 | out.write(chunk) | |
155 | else: |
|
155 | else: | |
156 | if stat: |
|
156 | if stat: | |
157 | chunks = patch.diffstatui(util.iterlines(chunks), width=width) |
|
157 | chunks = patch.diffstatui(util.iterlines(chunks), width=width) | |
158 | else: |
|
158 | else: | |
159 | chunks = patch.difflabel( |
|
159 | chunks = patch.difflabel( | |
160 | lambda chunks, **kwargs: chunks, chunks, opts=diffopts |
|
160 | lambda chunks, **kwargs: chunks, chunks, opts=diffopts | |
161 | ) |
|
161 | ) | |
162 | if ui.canbatchlabeledwrites(): |
|
162 | if ui.canbatchlabeledwrites(): | |
163 |
|
163 | |||
164 | def gen(): |
|
164 | def gen(): | |
165 | for chunk, label in chunks: |
|
165 | for chunk, label in chunks: | |
166 | yield ui.label(chunk, label=label) |
|
166 | yield ui.label(chunk, label=label) | |
167 |
|
167 | |||
168 | for chunk in util.filechunkiter(util.chunkbuffer(gen())): |
|
168 | for chunk in util.filechunkiter(util.chunkbuffer(gen())): | |
169 | ui.write(chunk) |
|
169 | ui.write(chunk) | |
170 | else: |
|
170 | else: | |
171 | for chunk, label in chunks: |
|
171 | for chunk, label in chunks: | |
172 | ui.write(chunk, label=label) |
|
172 | ui.write(chunk, label=label) | |
173 |
|
173 | |||
174 | node2 = ctx2.node() |
|
174 | node2 = ctx2.node() | |
175 | for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): |
|
175 | for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): | |
176 | tempnode2 = node2 |
|
176 | tempnode2 = node2 | |
177 | try: |
|
177 | try: | |
178 | if node2 is not None: |
|
178 | if node2 is not None: | |
179 | tempnode2 = ctx2.substate[subpath][1] |
|
179 | tempnode2 = ctx2.substate[subpath][1] | |
180 | except KeyError: |
|
180 | except KeyError: | |
181 | # A subrepo that existed in node1 was deleted between node1 and |
|
181 | # A subrepo that existed in node1 was deleted between node1 and | |
182 | # node2 (inclusive). Thus, ctx2's substate won't contain that |
|
182 | # node2 (inclusive). Thus, ctx2's substate won't contain that | |
183 | # subpath. The best we can do is to ignore it. |
|
183 | # subpath. The best we can do is to ignore it. | |
184 | tempnode2 = None |
|
184 | tempnode2 = None | |
185 | submatch = matchmod.subdirmatcher(subpath, match) |
|
185 | submatch = matchmod.subdirmatcher(subpath, match) | |
186 | subprefix = repo.wvfs.reljoin(prefix, subpath) |
|
186 | subprefix = repo.wvfs.reljoin(prefix, subpath) | |
187 | if listsubrepos or match.exact(subpath) or any(submatch.files()): |
|
187 | if listsubrepos or match.exact(subpath) or any(submatch.files()): | |
188 | sub.diff( |
|
188 | sub.diff( | |
189 | ui, |
|
189 | ui, | |
190 | diffopts, |
|
190 | diffopts, | |
191 | tempnode2, |
|
191 | tempnode2, | |
192 | submatch, |
|
192 | submatch, | |
193 | changes=changes, |
|
193 | changes=changes, | |
194 | stat=stat, |
|
194 | stat=stat, | |
195 | fp=fp, |
|
195 | fp=fp, | |
196 | prefix=subprefix, |
|
196 | prefix=subprefix, | |
197 | ) |
|
197 | ) | |
198 |
|
198 | |||
199 |
|
199 | |||
200 | class changesetdiffer(object): |
|
200 | class changesetdiffer(object): | |
201 | """Generate diff of changeset with pre-configured filtering functions""" |
|
201 | """Generate diff of changeset with pre-configured filtering functions""" | |
202 |
|
202 | |||
203 | def _makefilematcher(self, ctx): |
|
203 | def _makefilematcher(self, ctx): | |
204 | return scmutil.matchall(ctx.repo()) |
|
204 | return scmutil.matchall(ctx.repo()) | |
205 |
|
205 | |||
206 | def _makehunksfilter(self, ctx): |
|
206 | def _makehunksfilter(self, ctx): | |
207 | return None |
|
207 | return None | |
208 |
|
208 | |||
209 | def showdiff(self, ui, ctx, diffopts, graphwidth=0, stat=False): |
|
209 | def showdiff(self, ui, ctx, diffopts, graphwidth=0, stat=False): | |
210 | diffordiffstat( |
|
210 | diffordiffstat( | |
211 | ui, |
|
211 | ui, | |
212 | ctx.repo(), |
|
212 | ctx.repo(), | |
213 | diffopts, |
|
213 | diffopts, | |
214 | ctx.p1(), |
|
214 | ctx.p1(), | |
215 | ctx, |
|
215 | ctx, | |
216 | match=self._makefilematcher(ctx), |
|
216 | match=self._makefilematcher(ctx), | |
217 | stat=stat, |
|
217 | stat=stat, | |
218 | graphwidth=graphwidth, |
|
218 | graphwidth=graphwidth, | |
219 | hunksfilterfn=self._makehunksfilter(ctx), |
|
219 | hunksfilterfn=self._makehunksfilter(ctx), | |
220 | ) |
|
220 | ) | |
221 |
|
221 | |||
222 |
|
222 | |||
223 | def changesetlabels(ctx): |
|
223 | def changesetlabels(ctx): | |
224 | labels = [b'log.changeset', b'changeset.%s' % ctx.phasestr()] |
|
224 | labels = [b'log.changeset', b'changeset.%s' % ctx.phasestr()] | |
225 | if ctx.obsolete(): |
|
225 | if ctx.obsolete(): | |
226 | labels.append(b'changeset.obsolete') |
|
226 | labels.append(b'changeset.obsolete') | |
227 | if ctx.isunstable(): |
|
227 | if ctx.isunstable(): | |
228 | labels.append(b'changeset.unstable') |
|
228 | labels.append(b'changeset.unstable') | |
229 | for instability in ctx.instabilities(): |
|
229 | for instability in ctx.instabilities(): | |
230 | labels.append(b'instability.%s' % instability) |
|
230 | labels.append(b'instability.%s' % instability) | |
231 | return b' '.join(labels) |
|
231 | return b' '.join(labels) | |
232 |
|
232 | |||
233 |
|
233 | |||
234 | class changesetprinter(object): |
|
234 | class changesetprinter(object): | |
235 | '''show changeset information when templating not requested.''' |
|
235 | '''show changeset information when templating not requested.''' | |
236 |
|
236 | |||
237 | def __init__(self, ui, repo, differ=None, diffopts=None, buffered=False): |
|
237 | def __init__(self, ui, repo, differ=None, diffopts=None, buffered=False): | |
238 | self.ui = ui |
|
238 | self.ui = ui | |
239 | self.repo = repo |
|
239 | self.repo = repo | |
240 | self.buffered = buffered |
|
240 | self.buffered = buffered | |
241 | self._differ = differ or changesetdiffer() |
|
241 | self._differ = differ or changesetdiffer() | |
242 | self._diffopts = patch.diffallopts(ui, diffopts) |
|
242 | self._diffopts = patch.diffallopts(ui, diffopts) | |
243 | self._includestat = diffopts and diffopts.get(b'stat') |
|
243 | self._includestat = diffopts and diffopts.get(b'stat') | |
244 | self._includediff = diffopts and diffopts.get(b'patch') |
|
244 | self._includediff = diffopts and diffopts.get(b'patch') | |
245 | self.header = {} |
|
245 | self.header = {} | |
246 | self.hunk = {} |
|
246 | self.hunk = {} | |
247 | self.lastheader = None |
|
247 | self.lastheader = None | |
248 | self.footer = None |
|
248 | self.footer = None | |
249 | self._columns = templatekw.getlogcolumns() |
|
249 | self._columns = templatekw.getlogcolumns() | |
250 |
|
250 | |||
251 | def flush(self, ctx): |
|
251 | def flush(self, ctx): | |
252 | rev = ctx.rev() |
|
252 | rev = ctx.rev() | |
253 | if rev in self.header: |
|
253 | if rev in self.header: | |
254 | h = self.header[rev] |
|
254 | h = self.header[rev] | |
255 | if h != self.lastheader: |
|
255 | if h != self.lastheader: | |
256 | self.lastheader = h |
|
256 | self.lastheader = h | |
257 | self.ui.write(h) |
|
257 | self.ui.write(h) | |
258 | del self.header[rev] |
|
258 | del self.header[rev] | |
259 | if rev in self.hunk: |
|
259 | if rev in self.hunk: | |
260 | self.ui.write(self.hunk[rev]) |
|
260 | self.ui.write(self.hunk[rev]) | |
261 | del self.hunk[rev] |
|
261 | del self.hunk[rev] | |
262 |
|
262 | |||
263 | def close(self): |
|
263 | def close(self): | |
264 | if self.footer: |
|
264 | if self.footer: | |
265 | self.ui.write(self.footer) |
|
265 | self.ui.write(self.footer) | |
266 |
|
266 | |||
267 | def show(self, ctx, copies=None, **props): |
|
267 | def show(self, ctx, copies=None, **props): | |
268 | props = pycompat.byteskwargs(props) |
|
268 | props = pycompat.byteskwargs(props) | |
269 | if self.buffered: |
|
269 | if self.buffered: | |
270 | self.ui.pushbuffer(labeled=True) |
|
270 | self.ui.pushbuffer(labeled=True) | |
271 | self._show(ctx, copies, props) |
|
271 | self._show(ctx, copies, props) | |
272 | self.hunk[ctx.rev()] = self.ui.popbuffer() |
|
272 | self.hunk[ctx.rev()] = self.ui.popbuffer() | |
273 | else: |
|
273 | else: | |
274 | self._show(ctx, copies, props) |
|
274 | self._show(ctx, copies, props) | |
275 |
|
275 | |||
276 | def _show(self, ctx, copies, props): |
|
276 | def _show(self, ctx, copies, props): | |
277 | '''show a single changeset or file revision''' |
|
277 | '''show a single changeset or file revision''' | |
278 | changenode = ctx.node() |
|
278 | changenode = ctx.node() | |
279 | graphwidth = props.get(b'graphwidth', 0) |
|
279 | graphwidth = props.get(b'graphwidth', 0) | |
280 |
|
280 | |||
281 | if self.ui.quiet: |
|
281 | if self.ui.quiet: | |
282 | self.ui.write( |
|
282 | self.ui.write( | |
283 | b"%s\n" % scmutil.formatchangeid(ctx), label=b'log.node' |
|
283 | b"%s\n" % scmutil.formatchangeid(ctx), label=b'log.node' | |
284 | ) |
|
284 | ) | |
285 | return |
|
285 | return | |
286 |
|
286 | |||
287 | columns = self._columns |
|
287 | columns = self._columns | |
288 | self.ui.write( |
|
288 | self.ui.write( | |
289 | columns[b'changeset'] % scmutil.formatchangeid(ctx), |
|
289 | columns[b'changeset'] % scmutil.formatchangeid(ctx), | |
290 | label=changesetlabels(ctx), |
|
290 | label=changesetlabels(ctx), | |
291 | ) |
|
291 | ) | |
292 |
|
292 | |||
293 | # branches are shown first before any other names due to backwards |
|
293 | # branches are shown first before any other names due to backwards | |
294 | # compatibility |
|
294 | # compatibility | |
295 | branch = ctx.branch() |
|
295 | branch = ctx.branch() | |
296 | # don't show the default branch name |
|
296 | # don't show the default branch name | |
297 | if branch != b'default': |
|
297 | if branch != b'default': | |
298 | self.ui.write(columns[b'branch'] % branch, label=b'log.branch') |
|
298 | self.ui.write(columns[b'branch'] % branch, label=b'log.branch') | |
299 |
|
299 | |||
300 | for nsname, ns in pycompat.iteritems(self.repo.names): |
|
300 | for nsname, ns in pycompat.iteritems(self.repo.names): | |
301 | # branches has special logic already handled above, so here we just |
|
301 | # branches has special logic already handled above, so here we just | |
302 | # skip it |
|
302 | # skip it | |
303 | if nsname == b'branches': |
|
303 | if nsname == b'branches': | |
304 | continue |
|
304 | continue | |
305 | # we will use the templatename as the color name since those two |
|
305 | # we will use the templatename as the color name since those two | |
306 | # should be the same |
|
306 | # should be the same | |
307 | for name in ns.names(self.repo, changenode): |
|
307 | for name in ns.names(self.repo, changenode): | |
308 | self.ui.write(ns.logfmt % name, label=b'log.%s' % ns.colorname) |
|
308 | self.ui.write(ns.logfmt % name, label=b'log.%s' % ns.colorname) | |
309 | if self.ui.debugflag: |
|
309 | if self.ui.debugflag: | |
310 | self.ui.write( |
|
310 | self.ui.write( | |
311 | columns[b'phase'] % ctx.phasestr(), label=b'log.phase' |
|
311 | columns[b'phase'] % ctx.phasestr(), label=b'log.phase' | |
312 | ) |
|
312 | ) | |
313 | for pctx in scmutil.meaningfulparents(self.repo, ctx): |
|
313 | for pctx in scmutil.meaningfulparents(self.repo, ctx): | |
314 | label = b'log.parent changeset.%s' % pctx.phasestr() |
|
314 | label = b'log.parent changeset.%s' % pctx.phasestr() | |
315 | self.ui.write( |
|
315 | self.ui.write( | |
316 | columns[b'parent'] % scmutil.formatchangeid(pctx), label=label |
|
316 | columns[b'parent'] % scmutil.formatchangeid(pctx), label=label | |
317 | ) |
|
317 | ) | |
318 |
|
318 | |||
319 | if self.ui.debugflag: |
|
319 | if self.ui.debugflag: | |
320 | mnode = ctx.manifestnode() |
|
320 | mnode = ctx.manifestnode() | |
321 | if mnode is None: |
|
321 | if mnode is None: | |
322 | mnode = wdirid |
|
322 | mnode = wdirid | |
323 | mrev = wdirrev |
|
323 | mrev = wdirrev | |
324 | else: |
|
324 | else: | |
325 | mrev = self.repo.manifestlog.rev(mnode) |
|
325 | mrev = self.repo.manifestlog.rev(mnode) | |
326 | self.ui.write( |
|
326 | self.ui.write( | |
327 | columns[b'manifest'] |
|
327 | columns[b'manifest'] | |
328 | % scmutil.formatrevnode(self.ui, mrev, mnode), |
|
328 | % scmutil.formatrevnode(self.ui, mrev, mnode), | |
329 | label=b'ui.debug log.manifest', |
|
329 | label=b'ui.debug log.manifest', | |
330 | ) |
|
330 | ) | |
331 | self.ui.write(columns[b'user'] % ctx.user(), label=b'log.user') |
|
331 | self.ui.write(columns[b'user'] % ctx.user(), label=b'log.user') | |
332 | self.ui.write( |
|
332 | self.ui.write( | |
333 | columns[b'date'] % dateutil.datestr(ctx.date()), label=b'log.date' |
|
333 | columns[b'date'] % dateutil.datestr(ctx.date()), label=b'log.date' | |
334 | ) |
|
334 | ) | |
335 |
|
335 | |||
336 | if ctx.isunstable(): |
|
336 | if ctx.isunstable(): | |
337 | instabilities = ctx.instabilities() |
|
337 | instabilities = ctx.instabilities() | |
338 | self.ui.write( |
|
338 | self.ui.write( | |
339 | columns[b'instability'] % b', '.join(instabilities), |
|
339 | columns[b'instability'] % b', '.join(instabilities), | |
340 | label=b'log.instability', |
|
340 | label=b'log.instability', | |
341 | ) |
|
341 | ) | |
342 |
|
342 | |||
343 | elif ctx.obsolete(): |
|
343 | elif ctx.obsolete(): | |
344 | self._showobsfate(ctx) |
|
344 | self._showobsfate(ctx) | |
345 |
|
345 | |||
346 | self._exthook(ctx) |
|
346 | self._exthook(ctx) | |
347 |
|
347 | |||
348 | if self.ui.debugflag: |
|
348 | if self.ui.debugflag: | |
349 | files = ctx.p1().status(ctx) |
|
349 | files = ctx.p1().status(ctx) | |
350 | for key, value in zip( |
|
350 | for key, value in zip( | |
351 | [b'files', b'files+', b'files-'], |
|
351 | [b'files', b'files+', b'files-'], | |
352 | [files.modified, files.added, files.removed], |
|
352 | [files.modified, files.added, files.removed], | |
353 | ): |
|
353 | ): | |
354 | if value: |
|
354 | if value: | |
355 | self.ui.write( |
|
355 | self.ui.write( | |
356 | columns[key] % b" ".join(value), |
|
356 | columns[key] % b" ".join(value), | |
357 | label=b'ui.debug log.files', |
|
357 | label=b'ui.debug log.files', | |
358 | ) |
|
358 | ) | |
359 | elif ctx.files() and self.ui.verbose: |
|
359 | elif ctx.files() and self.ui.verbose: | |
360 | self.ui.write( |
|
360 | self.ui.write( | |
361 | columns[b'files'] % b" ".join(ctx.files()), |
|
361 | columns[b'files'] % b" ".join(ctx.files()), | |
362 | label=b'ui.note log.files', |
|
362 | label=b'ui.note log.files', | |
363 | ) |
|
363 | ) | |
364 | if copies and self.ui.verbose: |
|
364 | if copies and self.ui.verbose: | |
365 | copies = [b'%s (%s)' % c for c in copies] |
|
365 | copies = [b'%s (%s)' % c for c in copies] | |
366 | self.ui.write( |
|
366 | self.ui.write( | |
367 | columns[b'copies'] % b' '.join(copies), |
|
367 | columns[b'copies'] % b' '.join(copies), | |
368 | label=b'ui.note log.copies', |
|
368 | label=b'ui.note log.copies', | |
369 | ) |
|
369 | ) | |
370 |
|
370 | |||
371 | extra = ctx.extra() |
|
371 | extra = ctx.extra() | |
372 | if extra and self.ui.debugflag: |
|
372 | if extra and self.ui.debugflag: | |
373 | for key, value in sorted(extra.items()): |
|
373 | for key, value in sorted(extra.items()): | |
374 | self.ui.write( |
|
374 | self.ui.write( | |
375 | columns[b'extra'] % (key, stringutil.escapestr(value)), |
|
375 | columns[b'extra'] % (key, stringutil.escapestr(value)), | |
376 | label=b'ui.debug log.extra', |
|
376 | label=b'ui.debug log.extra', | |
377 | ) |
|
377 | ) | |
378 |
|
378 | |||
379 | description = ctx.description().strip() |
|
379 | description = ctx.description().strip() | |
380 | if description: |
|
380 | if description: | |
381 | if self.ui.verbose: |
|
381 | if self.ui.verbose: | |
382 | self.ui.write( |
|
382 | self.ui.write( | |
383 | _(b"description:\n"), label=b'ui.note log.description' |
|
383 | _(b"description:\n"), label=b'ui.note log.description' | |
384 | ) |
|
384 | ) | |
385 | self.ui.write(description, label=b'ui.note log.description') |
|
385 | self.ui.write(description, label=b'ui.note log.description') | |
386 | self.ui.write(b"\n\n") |
|
386 | self.ui.write(b"\n\n") | |
387 | else: |
|
387 | else: | |
388 | self.ui.write( |
|
388 | self.ui.write( | |
389 | columns[b'summary'] % description.splitlines()[0], |
|
389 | columns[b'summary'] % description.splitlines()[0], | |
390 | label=b'log.summary', |
|
390 | label=b'log.summary', | |
391 | ) |
|
391 | ) | |
392 | self.ui.write(b"\n") |
|
392 | self.ui.write(b"\n") | |
393 |
|
393 | |||
394 | self._showpatch(ctx, graphwidth) |
|
394 | self._showpatch(ctx, graphwidth) | |
395 |
|
395 | |||
396 | def _showobsfate(self, ctx): |
|
396 | def _showobsfate(self, ctx): | |
397 | # TODO: do not depend on templater |
|
397 | # TODO: do not depend on templater | |
398 | tres = formatter.templateresources(self.repo.ui, self.repo) |
|
398 | tres = formatter.templateresources(self.repo.ui, self.repo) | |
399 | t = formatter.maketemplater( |
|
399 | t = formatter.maketemplater( | |
400 | self.repo.ui, |
|
400 | self.repo.ui, | |
401 | b'{join(obsfate, "\n")}', |
|
401 | b'{join(obsfate, "\n")}', | |
402 | defaults=templatekw.keywords, |
|
402 | defaults=templatekw.keywords, | |
403 | resources=tres, |
|
403 | resources=tres, | |
404 | ) |
|
404 | ) | |
405 | obsfate = t.renderdefault({b'ctx': ctx}).splitlines() |
|
405 | obsfate = t.renderdefault({b'ctx': ctx}).splitlines() | |
406 |
|
406 | |||
407 | if obsfate: |
|
407 | if obsfate: | |
408 | for obsfateline in obsfate: |
|
408 | for obsfateline in obsfate: | |
409 | self.ui.write( |
|
409 | self.ui.write( | |
410 | self._columns[b'obsolete'] % obsfateline, |
|
410 | self._columns[b'obsolete'] % obsfateline, | |
411 | label=b'log.obsfate', |
|
411 | label=b'log.obsfate', | |
412 | ) |
|
412 | ) | |
413 |
|
413 | |||
414 | def _exthook(self, ctx): |
|
414 | def _exthook(self, ctx): | |
415 | '''empty method used by extension as a hook point |
|
415 | '''empty method used by extension as a hook point | |
416 | ''' |
|
416 | ''' | |
417 |
|
417 | |||
418 | def _showpatch(self, ctx, graphwidth=0): |
|
418 | def _showpatch(self, ctx, graphwidth=0): | |
419 | if self._includestat: |
|
419 | if self._includestat: | |
420 | self._differ.showdiff( |
|
420 | self._differ.showdiff( | |
421 | self.ui, ctx, self._diffopts, graphwidth, stat=True |
|
421 | self.ui, ctx, self._diffopts, graphwidth, stat=True | |
422 | ) |
|
422 | ) | |
423 | if self._includestat and self._includediff: |
|
423 | if self._includestat and self._includediff: | |
424 | self.ui.write(b"\n") |
|
424 | self.ui.write(b"\n") | |
425 | if self._includediff: |
|
425 | if self._includediff: | |
426 | self._differ.showdiff( |
|
426 | self._differ.showdiff( | |
427 | self.ui, ctx, self._diffopts, graphwidth, stat=False |
|
427 | self.ui, ctx, self._diffopts, graphwidth, stat=False | |
428 | ) |
|
428 | ) | |
429 | if self._includestat or self._includediff: |
|
429 | if self._includestat or self._includediff: | |
430 | self.ui.write(b"\n") |
|
430 | self.ui.write(b"\n") | |
431 |
|
431 | |||
432 |
|
432 | |||
433 | class changesetformatter(changesetprinter): |
|
433 | class changesetformatter(changesetprinter): | |
434 | """Format changeset information by generic formatter""" |
|
434 | """Format changeset information by generic formatter""" | |
435 |
|
435 | |||
436 | def __init__( |
|
436 | def __init__( | |
437 | self, ui, repo, fm, differ=None, diffopts=None, buffered=False |
|
437 | self, ui, repo, fm, differ=None, diffopts=None, buffered=False | |
438 | ): |
|
438 | ): | |
439 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) |
|
439 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) | |
440 | self._diffopts = patch.difffeatureopts(ui, diffopts, git=True) |
|
440 | self._diffopts = patch.difffeatureopts(ui, diffopts, git=True) | |
441 | self._fm = fm |
|
441 | self._fm = fm | |
442 |
|
442 | |||
443 | def close(self): |
|
443 | def close(self): | |
444 | self._fm.end() |
|
444 | self._fm.end() | |
445 |
|
445 | |||
446 | def _show(self, ctx, copies, props): |
|
446 | def _show(self, ctx, copies, props): | |
447 | '''show a single changeset or file revision''' |
|
447 | '''show a single changeset or file revision''' | |
448 | fm = self._fm |
|
448 | fm = self._fm | |
449 | fm.startitem() |
|
449 | fm.startitem() | |
450 | fm.context(ctx=ctx) |
|
450 | fm.context(ctx=ctx) | |
451 | fm.data(rev=scmutil.intrev(ctx), node=fm.hexfunc(scmutil.binnode(ctx))) |
|
451 | fm.data(rev=scmutil.intrev(ctx), node=fm.hexfunc(scmutil.binnode(ctx))) | |
452 |
|
452 | |||
453 | datahint = fm.datahint() |
|
453 | datahint = fm.datahint() | |
454 | if self.ui.quiet and not datahint: |
|
454 | if self.ui.quiet and not datahint: | |
455 | return |
|
455 | return | |
456 |
|
456 | |||
457 | fm.data( |
|
457 | fm.data( | |
458 | branch=ctx.branch(), |
|
458 | branch=ctx.branch(), | |
459 | phase=ctx.phasestr(), |
|
459 | phase=ctx.phasestr(), | |
460 | user=ctx.user(), |
|
460 | user=ctx.user(), | |
461 | date=fm.formatdate(ctx.date()), |
|
461 | date=fm.formatdate(ctx.date()), | |
462 | desc=ctx.description(), |
|
462 | desc=ctx.description(), | |
463 | bookmarks=fm.formatlist(ctx.bookmarks(), name=b'bookmark'), |
|
463 | bookmarks=fm.formatlist(ctx.bookmarks(), name=b'bookmark'), | |
464 | tags=fm.formatlist(ctx.tags(), name=b'tag'), |
|
464 | tags=fm.formatlist(ctx.tags(), name=b'tag'), | |
465 | parents=fm.formatlist( |
|
465 | parents=fm.formatlist( | |
466 | [fm.hexfunc(c.node()) for c in ctx.parents()], name=b'node' |
|
466 | [fm.hexfunc(c.node()) for c in ctx.parents()], name=b'node' | |
467 | ), |
|
467 | ), | |
468 | ) |
|
468 | ) | |
469 |
|
469 | |||
470 | if self.ui.debugflag or b'manifest' in datahint: |
|
470 | if self.ui.debugflag or b'manifest' in datahint: | |
471 | fm.data(manifest=fm.hexfunc(ctx.manifestnode() or wdirid)) |
|
471 | fm.data(manifest=fm.hexfunc(ctx.manifestnode() or wdirid)) | |
472 | if self.ui.debugflag or b'extra' in datahint: |
|
472 | if self.ui.debugflag or b'extra' in datahint: | |
473 | fm.data(extra=fm.formatdict(ctx.extra())) |
|
473 | fm.data(extra=fm.formatdict(ctx.extra())) | |
474 |
|
474 | |||
475 | if ( |
|
475 | if ( | |
476 | self.ui.debugflag |
|
476 | self.ui.debugflag | |
477 | or b'modified' in datahint |
|
477 | or b'modified' in datahint | |
478 | or b'added' in datahint |
|
478 | or b'added' in datahint | |
479 | or b'removed' in datahint |
|
479 | or b'removed' in datahint | |
480 | ): |
|
480 | ): | |
481 | files = ctx.p1().status(ctx) |
|
481 | files = ctx.p1().status(ctx) | |
482 | fm.data( |
|
482 | fm.data( | |
483 | modified=fm.formatlist(files.modified, name=b'file'), |
|
483 | modified=fm.formatlist(files.modified, name=b'file'), | |
484 | added=fm.formatlist(files.added, name=b'file'), |
|
484 | added=fm.formatlist(files.added, name=b'file'), | |
485 | removed=fm.formatlist(files.removed, name=b'file'), |
|
485 | removed=fm.formatlist(files.removed, name=b'file'), | |
486 | ) |
|
486 | ) | |
487 |
|
487 | |||
488 | verbose = not self.ui.debugflag and self.ui.verbose |
|
488 | verbose = not self.ui.debugflag and self.ui.verbose | |
489 | if verbose or b'files' in datahint: |
|
489 | if verbose or b'files' in datahint: | |
490 | fm.data(files=fm.formatlist(ctx.files(), name=b'file')) |
|
490 | fm.data(files=fm.formatlist(ctx.files(), name=b'file')) | |
491 | if verbose and copies or b'copies' in datahint: |
|
491 | if verbose and copies or b'copies' in datahint: | |
492 | fm.data( |
|
492 | fm.data( | |
493 | copies=fm.formatdict(copies or {}, key=b'name', value=b'source') |
|
493 | copies=fm.formatdict(copies or {}, key=b'name', value=b'source') | |
494 | ) |
|
494 | ) | |
495 |
|
495 | |||
496 | if self._includestat or b'diffstat' in datahint: |
|
496 | if self._includestat or b'diffstat' in datahint: | |
497 | self.ui.pushbuffer() |
|
497 | self.ui.pushbuffer() | |
498 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=True) |
|
498 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=True) | |
499 | fm.data(diffstat=self.ui.popbuffer()) |
|
499 | fm.data(diffstat=self.ui.popbuffer()) | |
500 | if self._includediff or b'diff' in datahint: |
|
500 | if self._includediff or b'diff' in datahint: | |
501 | self.ui.pushbuffer() |
|
501 | self.ui.pushbuffer() | |
502 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=False) |
|
502 | self._differ.showdiff(self.ui, ctx, self._diffopts, stat=False) | |
503 | fm.data(diff=self.ui.popbuffer()) |
|
503 | fm.data(diff=self.ui.popbuffer()) | |
504 |
|
504 | |||
505 |
|
505 | |||
506 | class changesettemplater(changesetprinter): |
|
506 | class changesettemplater(changesetprinter): | |
507 | '''format changeset information. |
|
507 | '''format changeset information. | |
508 |
|
508 | |||
509 | Note: there are a variety of convenience functions to build a |
|
509 | Note: there are a variety of convenience functions to build a | |
510 | changesettemplater for common cases. See functions such as: |
|
510 | changesettemplater for common cases. See functions such as: | |
511 | maketemplater, changesetdisplayer, buildcommittemplate, or other |
|
511 | maketemplater, changesetdisplayer, buildcommittemplate, or other | |
512 | functions that use changesest_templater. |
|
512 | functions that use changesest_templater. | |
513 | ''' |
|
513 | ''' | |
514 |
|
514 | |||
515 | # Arguments before "buffered" used to be positional. Consider not |
|
515 | # Arguments before "buffered" used to be positional. Consider not | |
516 | # adding/removing arguments before "buffered" to not break callers. |
|
516 | # adding/removing arguments before "buffered" to not break callers. | |
517 | def __init__( |
|
517 | def __init__( | |
518 | self, ui, repo, tmplspec, differ=None, diffopts=None, buffered=False |
|
518 | self, ui, repo, tmplspec, differ=None, diffopts=None, buffered=False | |
519 | ): |
|
519 | ): | |
520 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) |
|
520 | changesetprinter.__init__(self, ui, repo, differ, diffopts, buffered) | |
521 | # tres is shared with _graphnodeformatter() |
|
521 | # tres is shared with _graphnodeformatter() | |
522 | self._tresources = tres = formatter.templateresources(ui, repo) |
|
522 | self._tresources = tres = formatter.templateresources(ui, repo) | |
523 | self.t = formatter.loadtemplater( |
|
523 | self.t = formatter.loadtemplater( | |
524 | ui, |
|
524 | ui, | |
525 | tmplspec, |
|
525 | tmplspec, | |
526 | defaults=templatekw.keywords, |
|
526 | defaults=templatekw.keywords, | |
527 | resources=tres, |
|
527 | resources=tres, | |
528 | cache=templatekw.defaulttempl, |
|
528 | cache=templatekw.defaulttempl, | |
529 | ) |
|
529 | ) | |
530 | self._counter = itertools.count() |
|
530 | self._counter = itertools.count() | |
531 |
|
531 | |||
532 | self._tref = tmplspec.ref |
|
532 | self._tref = tmplspec.ref | |
533 | self._parts = { |
|
533 | self._parts = { | |
534 | b'header': b'', |
|
534 | b'header': b'', | |
535 | b'footer': b'', |
|
535 | b'footer': b'', | |
536 | tmplspec.ref: tmplspec.ref, |
|
536 | tmplspec.ref: tmplspec.ref, | |
537 | b'docheader': b'', |
|
537 | b'docheader': b'', | |
538 | b'docfooter': b'', |
|
538 | b'docfooter': b'', | |
539 | b'separator': b'', |
|
539 | b'separator': b'', | |
540 | } |
|
540 | } | |
541 | if tmplspec.mapfile: |
|
541 | if tmplspec.mapfile: | |
542 | # find correct templates for current mode, for backward |
|
542 | # find correct templates for current mode, for backward | |
543 | # compatibility with 'log -v/-q/--debug' using a mapfile |
|
543 | # compatibility with 'log -v/-q/--debug' using a mapfile | |
544 | tmplmodes = [ |
|
544 | tmplmodes = [ | |
545 | (True, b''), |
|
545 | (True, b''), | |
546 | (self.ui.verbose, b'_verbose'), |
|
546 | (self.ui.verbose, b'_verbose'), | |
547 | (self.ui.quiet, b'_quiet'), |
|
547 | (self.ui.quiet, b'_quiet'), | |
548 | (self.ui.debugflag, b'_debug'), |
|
548 | (self.ui.debugflag, b'_debug'), | |
549 | ] |
|
549 | ] | |
550 | for mode, postfix in tmplmodes: |
|
550 | for mode, postfix in tmplmodes: | |
551 | for t in self._parts: |
|
551 | for t in self._parts: | |
552 | cur = t + postfix |
|
552 | cur = t + postfix | |
553 | if mode and cur in self.t: |
|
553 | if mode and cur in self.t: | |
554 | self._parts[t] = cur |
|
554 | self._parts[t] = cur | |
555 | else: |
|
555 | else: | |
556 | partnames = [p for p in self._parts.keys() if p != tmplspec.ref] |
|
556 | partnames = [p for p in self._parts.keys() if p != tmplspec.ref] | |
557 | m = formatter.templatepartsmap(tmplspec, self.t, partnames) |
|
557 | m = formatter.templatepartsmap(tmplspec, self.t, partnames) | |
558 | self._parts.update(m) |
|
558 | self._parts.update(m) | |
559 |
|
559 | |||
560 | if self._parts[b'docheader']: |
|
560 | if self._parts[b'docheader']: | |
561 | self.ui.write(self.t.render(self._parts[b'docheader'], {})) |
|
561 | self.ui.write(self.t.render(self._parts[b'docheader'], {})) | |
562 |
|
562 | |||
563 | def close(self): |
|
563 | def close(self): | |
564 | if self._parts[b'docfooter']: |
|
564 | if self._parts[b'docfooter']: | |
565 | if not self.footer: |
|
565 | if not self.footer: | |
566 | self.footer = b"" |
|
566 | self.footer = b"" | |
567 | self.footer += self.t.render(self._parts[b'docfooter'], {}) |
|
567 | self.footer += self.t.render(self._parts[b'docfooter'], {}) | |
568 | return super(changesettemplater, self).close() |
|
568 | return super(changesettemplater, self).close() | |
569 |
|
569 | |||
570 | def _show(self, ctx, copies, props): |
|
570 | def _show(self, ctx, copies, props): | |
571 | '''show a single changeset or file revision''' |
|
571 | '''show a single changeset or file revision''' | |
572 | props = props.copy() |
|
572 | props = props.copy() | |
573 | props[b'ctx'] = ctx |
|
573 | props[b'ctx'] = ctx | |
574 | props[b'index'] = index = next(self._counter) |
|
574 | props[b'index'] = index = next(self._counter) | |
575 | props[b'revcache'] = {b'copies': copies} |
|
575 | props[b'revcache'] = {b'copies': copies} | |
576 | graphwidth = props.get(b'graphwidth', 0) |
|
576 | graphwidth = props.get(b'graphwidth', 0) | |
577 |
|
577 | |||
578 | # write separator, which wouldn't work well with the header part below |
|
578 | # write separator, which wouldn't work well with the header part below | |
579 | # since there's inherently a conflict between header (across items) and |
|
579 | # since there's inherently a conflict between header (across items) and | |
580 | # separator (per item) |
|
580 | # separator (per item) | |
581 | if self._parts[b'separator'] and index > 0: |
|
581 | if self._parts[b'separator'] and index > 0: | |
582 | self.ui.write(self.t.render(self._parts[b'separator'], {})) |
|
582 | self.ui.write(self.t.render(self._parts[b'separator'], {})) | |
583 |
|
583 | |||
584 | # write header |
|
584 | # write header | |
585 | if self._parts[b'header']: |
|
585 | if self._parts[b'header']: | |
586 | h = self.t.render(self._parts[b'header'], props) |
|
586 | h = self.t.render(self._parts[b'header'], props) | |
587 | if self.buffered: |
|
587 | if self.buffered: | |
588 | self.header[ctx.rev()] = h |
|
588 | self.header[ctx.rev()] = h | |
589 | else: |
|
589 | else: | |
590 | if self.lastheader != h: |
|
590 | if self.lastheader != h: | |
591 | self.lastheader = h |
|
591 | self.lastheader = h | |
592 | self.ui.write(h) |
|
592 | self.ui.write(h) | |
593 |
|
593 | |||
594 | # write changeset metadata, then patch if requested |
|
594 | # write changeset metadata, then patch if requested | |
595 | key = self._parts[self._tref] |
|
595 | key = self._parts[self._tref] | |
596 | self.ui.write(self.t.render(key, props)) |
|
596 | self.ui.write(self.t.render(key, props)) | |
597 | self._exthook(ctx) |
|
597 | self._exthook(ctx) | |
598 | self._showpatch(ctx, graphwidth) |
|
598 | self._showpatch(ctx, graphwidth) | |
599 |
|
599 | |||
600 | if self._parts[b'footer']: |
|
600 | if self._parts[b'footer']: | |
601 | if not self.footer: |
|
601 | if not self.footer: | |
602 | self.footer = self.t.render(self._parts[b'footer'], props) |
|
602 | self.footer = self.t.render(self._parts[b'footer'], props) | |
603 |
|
603 | |||
604 |
|
604 | |||
605 | def templatespec(tmpl, mapfile): |
|
605 | def templatespec(tmpl, mapfile): | |
606 | assert not (tmpl and mapfile) |
|
606 | assert not (tmpl and mapfile) | |
607 | if mapfile: |
|
607 | if mapfile: | |
608 | return formatter.mapfile_templatespec(b'changeset', mapfile) |
|
608 | return formatter.mapfile_templatespec(b'changeset', mapfile) | |
609 | else: |
|
609 | else: | |
610 | return formatter.literal_templatespec(tmpl) |
|
610 | return formatter.literal_templatespec(tmpl) | |
611 |
|
611 | |||
612 |
|
612 | |||
613 | def _lookuptemplate(ui, tmpl, style): |
|
613 | def _lookuptemplate(ui, tmpl, style): | |
614 | """Find the template matching the given template spec or style |
|
614 | """Find the template matching the given template spec or style | |
615 |
|
615 | |||
616 | See formatter.lookuptemplate() for details. |
|
616 | See formatter.lookuptemplate() for details. | |
617 | """ |
|
617 | """ | |
618 |
|
618 | |||
619 | # ui settings |
|
619 | # ui settings | |
620 | if not tmpl and not style: # template are stronger than style |
|
620 | if not tmpl and not style: # template are stronger than style | |
621 | tmpl = ui.config(b'ui', b'logtemplate') |
|
621 | tmpl = ui.config(b'ui', b'logtemplate') | |
622 | if tmpl: |
|
622 | if tmpl: | |
623 | return formatter.literal_templatespec(templater.unquotestring(tmpl)) |
|
623 | return formatter.literal_templatespec(templater.unquotestring(tmpl)) | |
624 | else: |
|
624 | else: | |
625 | style = util.expandpath(ui.config(b'ui', b'style')) |
|
625 | style = util.expandpath(ui.config(b'ui', b'style')) | |
626 |
|
626 | |||
627 | if not tmpl and style: |
|
627 | if not tmpl and style: | |
628 | mapfile = style |
|
628 | mapfile = style | |
629 | fp = None |
|
629 | fp = None | |
630 | if not os.path.split(mapfile)[0]: |
|
630 | if not os.path.split(mapfile)[0]: | |
631 | (mapname, fp) = templater.try_open_template( |
|
631 | (mapname, fp) = templater.try_open_template( | |
632 | b'map-cmdline.' + mapfile |
|
632 | b'map-cmdline.' + mapfile | |
633 | ) or templater.try_open_template(mapfile) |
|
633 | ) or templater.try_open_template(mapfile) | |
634 | if mapname: |
|
634 | if mapname: | |
635 | mapfile = mapname |
|
635 | mapfile = mapname | |
636 | return formatter.mapfile_templatespec(b'changeset', mapfile, fp) |
|
636 | return formatter.mapfile_templatespec(b'changeset', mapfile, fp) | |
637 |
|
637 | |||
638 | return formatter.lookuptemplate(ui, b'changeset', tmpl) |
|
638 | return formatter.lookuptemplate(ui, b'changeset', tmpl) | |
639 |
|
639 | |||
640 |
|
640 | |||
641 | def maketemplater(ui, repo, tmpl, buffered=False): |
|
641 | def maketemplater(ui, repo, tmpl, buffered=False): | |
642 | """Create a changesettemplater from a literal template 'tmpl' |
|
642 | """Create a changesettemplater from a literal template 'tmpl' | |
643 | byte-string.""" |
|
643 | byte-string.""" | |
644 | spec = formatter.literal_templatespec(tmpl) |
|
644 | spec = formatter.literal_templatespec(tmpl) | |
645 | return changesettemplater(ui, repo, spec, buffered=buffered) |
|
645 | return changesettemplater(ui, repo, spec, buffered=buffered) | |
646 |
|
646 | |||
647 |
|
647 | |||
648 | def changesetdisplayer(ui, repo, opts, differ=None, buffered=False): |
|
648 | def changesetdisplayer(ui, repo, opts, differ=None, buffered=False): | |
649 | """show one changeset using template or regular display. |
|
649 | """show one changeset using template or regular display. | |
650 |
|
650 | |||
651 | Display format will be the first non-empty hit of: |
|
651 | Display format will be the first non-empty hit of: | |
652 | 1. option 'template' |
|
652 | 1. option 'template' | |
653 | 2. option 'style' |
|
653 | 2. option 'style' | |
654 | 3. [ui] setting 'logtemplate' |
|
654 | 3. [ui] setting 'logtemplate' | |
655 | 4. [ui] setting 'style' |
|
655 | 4. [ui] setting 'style' | |
656 | If all of these values are either the unset or the empty string, |
|
656 | If all of these values are either the unset or the empty string, | |
657 | regular display via changesetprinter() is done. |
|
657 | regular display via changesetprinter() is done. | |
658 | """ |
|
658 | """ | |
659 | postargs = (differ, opts, buffered) |
|
659 | postargs = (differ, opts, buffered) | |
660 | spec = _lookuptemplate(ui, opts.get(b'template'), opts.get(b'style')) |
|
660 | spec = _lookuptemplate(ui, opts.get(b'template'), opts.get(b'style')) | |
661 |
|
661 | |||
662 | # machine-readable formats have slightly different keyword set than |
|
662 | # machine-readable formats have slightly different keyword set than | |
663 | # plain templates, which are handled by changesetformatter. |
|
663 | # plain templates, which are handled by changesetformatter. | |
664 | # note that {b'pickle', b'debug'} can also be added to the list if needed. |
|
664 | # note that {b'pickle', b'debug'} can also be added to the list if needed. | |
665 | if spec.ref in {b'cbor', b'json'}: |
|
665 | if spec.ref in {b'cbor', b'json'}: | |
666 | fm = ui.formatter(b'log', opts) |
|
666 | fm = ui.formatter(b'log', opts) | |
667 | return changesetformatter(ui, repo, fm, *postargs) |
|
667 | return changesetformatter(ui, repo, fm, *postargs) | |
668 |
|
668 | |||
669 | if not spec.ref and not spec.tmpl and not spec.mapfile: |
|
669 | if not spec.ref and not spec.tmpl and not spec.mapfile: | |
670 | return changesetprinter(ui, repo, *postargs) |
|
670 | return changesetprinter(ui, repo, *postargs) | |
671 |
|
671 | |||
672 | return changesettemplater(ui, repo, spec, *postargs) |
|
672 | return changesettemplater(ui, repo, spec, *postargs) | |
673 |
|
673 | |||
674 |
|
674 | |||
675 | def _makematcher(repo, revs, pats, opts): |
|
675 | def _makematcher(repo, revs, pats, opts): | |
676 | """Build matcher and expanded patterns from log options |
|
676 | """Build matcher and expanded patterns from log options | |
677 |
|
677 | |||
678 | If --follow, revs are the revisions to follow from. |
|
678 | If --follow, revs are the revisions to follow from. | |
679 |
|
679 | |||
680 | Returns (match, pats, slowpath) where |
|
680 | Returns (match, pats, slowpath) where | |
681 | - match: a matcher built from the given pats and -I/-X opts |
|
681 | - match: a matcher built from the given pats and -I/-X opts | |
682 | - pats: patterns used (globs are expanded on Windows) |
|
682 | - pats: patterns used (globs are expanded on Windows) | |
683 | - slowpath: True if patterns aren't as simple as scanning filelogs |
|
683 | - slowpath: True if patterns aren't as simple as scanning filelogs | |
684 | """ |
|
684 | """ | |
685 | # pats/include/exclude are passed to match.match() directly in |
|
685 | # pats/include/exclude are passed to match.match() directly in | |
686 | # _matchfiles() revset but walkchangerevs() builds its matcher with |
|
686 | # _matchfiles() revset but walkchangerevs() builds its matcher with | |
687 | # scmutil.match(). The difference is input pats are globbed on |
|
687 | # scmutil.match(). The difference is input pats are globbed on | |
688 | # platforms without shell expansion (windows). |
|
688 | # platforms without shell expansion (windows). | |
689 | wctx = repo[None] |
|
689 | wctx = repo[None] | |
690 | match, pats = scmutil.matchandpats(wctx, pats, opts) |
|
690 | match, pats = scmutil.matchandpats(wctx, pats, opts) | |
691 | slowpath = match.anypats() or (not match.always() and opts.get(b'removed')) |
|
691 | slowpath = match.anypats() or (not match.always() and opts.get(b'removed')) | |
692 | if not slowpath: |
|
692 | if not slowpath: | |
693 | follow = opts.get(b'follow') or opts.get(b'follow_first') |
|
693 | follow = opts.get(b'follow') or opts.get(b'follow_first') | |
694 | startctxs = [] |
|
|||
695 | if follow and opts.get(b'rev'): |
|
694 | if follow and opts.get(b'rev'): | |
696 | startctxs = [repo[r] for r in revs] |
|
695 | startctxs = [repo[r] for r in revs] | |
697 | for f in match.files(): |
|
696 | for f in match.files(): | |
698 | if follow and startctxs: |
|
|||
699 | # No idea if the path was a directory at that revision, so |
|
697 | # No idea if the path was a directory at that revision, so | |
700 | # take the slow path. |
|
698 | # take the slow path. | |
701 | if any(f not in c for c in startctxs): |
|
699 | if any(f not in c for c in startctxs): | |
702 | slowpath = True |
|
700 | slowpath = True | |
703 | continue |
|
701 | continue | |
704 | elif follow and f not in wctx: |
|
702 | filelog = repo.file(f) | |
705 | # If the file exists, it may be a directory, so let it |
|
703 | if not filelog: | |
706 | # take the slow path. |
|
|||
707 | if os.path.exists(repo.wjoin(f)): |
|
|||
708 | slowpath = True |
|
|||
709 | continue |
|
|||
710 | else: |
|
|||
711 | raise error.Abort( |
|
|||
712 | _( |
|
|||
713 | b'cannot follow file not in parent ' |
|
|||
714 | b'revision: "%s"' |
|
|||
715 | ) |
|
|||
716 | % f |
|
|||
717 | ) |
|
|||
718 | filelog = repo.file(f) |
|
|||
719 | if not filelog: |
|
|||
720 | # A zero count may be a directory or deleted file, so |
|
|||
721 | # try to find matching entries on the slow path. |
|
|||
722 | if follow: |
|
|||
723 | raise error.Abort( |
|
704 | raise error.Abort( | |
724 | _(b'cannot follow nonexistent file: "%s"') % f |
|
705 | _(b'cannot follow nonexistent file: "%s"') % f | |
725 | ) |
|
706 | ) | |
726 | slowpath = True |
|
707 | elif follow: | |
|
708 | for f in match.files(): | |||
|
709 | if f not in wctx: | |||
|
710 | # If the file exists, it may be a directory, so let it | |||
|
711 | # take the slow path. | |||
|
712 | if os.path.exists(repo.wjoin(f)): | |||
|
713 | slowpath = True | |||
|
714 | continue | |||
|
715 | else: | |||
|
716 | raise error.Abort( | |||
|
717 | _( | |||
|
718 | b'cannot follow file not in parent ' | |||
|
719 | b'revision: "%s"' | |||
|
720 | ) | |||
|
721 | % f | |||
|
722 | ) | |||
|
723 | filelog = repo.file(f) | |||
|
724 | if not filelog: | |||
|
725 | raise error.Abort( | |||
|
726 | _(b'cannot follow nonexistent file: "%s"') % f | |||
|
727 | ) | |||
|
728 | else: | |||
|
729 | for f in match.files(): | |||
|
730 | filelog = repo.file(f) | |||
|
731 | if not filelog: | |||
|
732 | # A zero count may be a directory or deleted file, so | |||
|
733 | # try to find matching entries on the slow path. | |||
|
734 | slowpath = True | |||
727 |
|
735 | |||
728 | # We decided to fall back to the slowpath because at least one |
|
736 | # We decided to fall back to the slowpath because at least one | |
729 | # of the paths was not a file. Check to see if at least one of them |
|
737 | # of the paths was not a file. Check to see if at least one of them | |
730 | # existed in history - in that case, we'll continue down the |
|
738 | # existed in history - in that case, we'll continue down the | |
731 | # slowpath; otherwise, we can turn off the slowpath |
|
739 | # slowpath; otherwise, we can turn off the slowpath | |
732 | if slowpath: |
|
740 | if slowpath: | |
733 | for path in match.files(): |
|
741 | for path in match.files(): | |
734 | if path == b'.' or path in repo.store: |
|
742 | if path == b'.' or path in repo.store: | |
735 | break |
|
743 | break | |
736 | else: |
|
744 | else: | |
737 | slowpath = False |
|
745 | slowpath = False | |
738 |
|
746 | |||
739 | return match, pats, slowpath |
|
747 | return match, pats, slowpath | |
740 |
|
748 | |||
741 |
|
749 | |||
742 | def _fileancestors(repo, revs, match, followfirst): |
|
750 | def _fileancestors(repo, revs, match, followfirst): | |
743 | fctxs = [] |
|
751 | fctxs = [] | |
744 | for r in revs: |
|
752 | for r in revs: | |
745 | ctx = repo[r] |
|
753 | ctx = repo[r] | |
746 | fctxs.extend(ctx[f].introfilectx() for f in ctx.walk(match)) |
|
754 | fctxs.extend(ctx[f].introfilectx() for f in ctx.walk(match)) | |
747 |
|
755 | |||
748 | # When displaying a revision with --patch --follow FILE, we have |
|
756 | # When displaying a revision with --patch --follow FILE, we have | |
749 | # to know which file of the revision must be diffed. With |
|
757 | # to know which file of the revision must be diffed. With | |
750 | # --follow, we want the names of the ancestors of FILE in the |
|
758 | # --follow, we want the names of the ancestors of FILE in the | |
751 | # revision, stored in "fcache". "fcache" is populated as a side effect |
|
759 | # revision, stored in "fcache". "fcache" is populated as a side effect | |
752 | # of the graph traversal. |
|
760 | # of the graph traversal. | |
753 | fcache = {} |
|
761 | fcache = {} | |
754 |
|
762 | |||
755 | def filematcher(ctx): |
|
763 | def filematcher(ctx): | |
756 | return scmutil.matchfiles(repo, fcache.get(scmutil.intrev(ctx), [])) |
|
764 | return scmutil.matchfiles(repo, fcache.get(scmutil.intrev(ctx), [])) | |
757 |
|
765 | |||
758 | def revgen(): |
|
766 | def revgen(): | |
759 | for rev, cs in dagop.filectxancestors(fctxs, followfirst=followfirst): |
|
767 | for rev, cs in dagop.filectxancestors(fctxs, followfirst=followfirst): | |
760 | fcache[rev] = [c.path() for c in cs] |
|
768 | fcache[rev] = [c.path() for c in cs] | |
761 | yield rev |
|
769 | yield rev | |
762 |
|
770 | |||
763 | return smartset.generatorset(revgen(), iterasc=False), filematcher |
|
771 | return smartset.generatorset(revgen(), iterasc=False), filematcher | |
764 |
|
772 | |||
765 |
|
773 | |||
766 | def _makenofollowfilematcher(repo, pats, opts): |
|
774 | def _makenofollowfilematcher(repo, pats, opts): | |
767 | '''hook for extensions to override the filematcher for non-follow cases''' |
|
775 | '''hook for extensions to override the filematcher for non-follow cases''' | |
768 | return None |
|
776 | return None | |
769 |
|
777 | |||
770 |
|
778 | |||
771 | _opt2logrevset = { |
|
779 | _opt2logrevset = { | |
772 | b'no_merges': (b'not merge()', None), |
|
780 | b'no_merges': (b'not merge()', None), | |
773 | b'only_merges': (b'merge()', None), |
|
781 | b'only_merges': (b'merge()', None), | |
774 | b'_matchfiles': (None, b'_matchfiles(%ps)'), |
|
782 | b'_matchfiles': (None, b'_matchfiles(%ps)'), | |
775 | b'date': (b'date(%s)', None), |
|
783 | b'date': (b'date(%s)', None), | |
776 | b'branch': (b'branch(%s)', b'%lr'), |
|
784 | b'branch': (b'branch(%s)', b'%lr'), | |
777 | b'_patslog': (b'filelog(%s)', b'%lr'), |
|
785 | b'_patslog': (b'filelog(%s)', b'%lr'), | |
778 | b'keyword': (b'keyword(%s)', b'%lr'), |
|
786 | b'keyword': (b'keyword(%s)', b'%lr'), | |
779 | b'prune': (b'ancestors(%s)', b'not %lr'), |
|
787 | b'prune': (b'ancestors(%s)', b'not %lr'), | |
780 | b'user': (b'user(%s)', b'%lr'), |
|
788 | b'user': (b'user(%s)', b'%lr'), | |
781 | } |
|
789 | } | |
782 |
|
790 | |||
783 |
|
791 | |||
784 | def _makerevset(repo, match, pats, slowpath, opts): |
|
792 | def _makerevset(repo, match, pats, slowpath, opts): | |
785 | """Return a revset string built from log options and file patterns""" |
|
793 | """Return a revset string built from log options and file patterns""" | |
786 | opts = dict(opts) |
|
794 | opts = dict(opts) | |
787 | # follow or not follow? |
|
795 | # follow or not follow? | |
788 | follow = opts.get(b'follow') or opts.get(b'follow_first') |
|
796 | follow = opts.get(b'follow') or opts.get(b'follow_first') | |
789 |
|
797 | |||
790 | # branch and only_branch are really aliases and must be handled at |
|
798 | # branch and only_branch are really aliases and must be handled at | |
791 | # the same time |
|
799 | # the same time | |
792 | opts[b'branch'] = opts.get(b'branch', []) + opts.get(b'only_branch', []) |
|
800 | opts[b'branch'] = opts.get(b'branch', []) + opts.get(b'only_branch', []) | |
793 | opts[b'branch'] = [repo.lookupbranch(b) for b in opts[b'branch']] |
|
801 | opts[b'branch'] = [repo.lookupbranch(b) for b in opts[b'branch']] | |
794 |
|
802 | |||
795 | if slowpath: |
|
803 | if slowpath: | |
796 | # See walkchangerevs() slow path. |
|
804 | # See walkchangerevs() slow path. | |
797 | # |
|
805 | # | |
798 | # pats/include/exclude cannot be represented as separate |
|
806 | # pats/include/exclude cannot be represented as separate | |
799 | # revset expressions as their filtering logic applies at file |
|
807 | # revset expressions as their filtering logic applies at file | |
800 | # level. For instance "-I a -X b" matches a revision touching |
|
808 | # level. For instance "-I a -X b" matches a revision touching | |
801 | # "a" and "b" while "file(a) and not file(b)" does |
|
809 | # "a" and "b" while "file(a) and not file(b)" does | |
802 | # not. Besides, filesets are evaluated against the working |
|
810 | # not. Besides, filesets are evaluated against the working | |
803 | # directory. |
|
811 | # directory. | |
804 | matchargs = [b'r:', b'd:relpath'] |
|
812 | matchargs = [b'r:', b'd:relpath'] | |
805 | for p in pats: |
|
813 | for p in pats: | |
806 | matchargs.append(b'p:' + p) |
|
814 | matchargs.append(b'p:' + p) | |
807 | for p in opts.get(b'include', []): |
|
815 | for p in opts.get(b'include', []): | |
808 | matchargs.append(b'i:' + p) |
|
816 | matchargs.append(b'i:' + p) | |
809 | for p in opts.get(b'exclude', []): |
|
817 | for p in opts.get(b'exclude', []): | |
810 | matchargs.append(b'x:' + p) |
|
818 | matchargs.append(b'x:' + p) | |
811 | opts[b'_matchfiles'] = matchargs |
|
819 | opts[b'_matchfiles'] = matchargs | |
812 | elif not follow: |
|
820 | elif not follow: | |
813 | opts[b'_patslog'] = list(pats) |
|
821 | opts[b'_patslog'] = list(pats) | |
814 |
|
822 | |||
815 | expr = [] |
|
823 | expr = [] | |
816 | for op, val in sorted(pycompat.iteritems(opts)): |
|
824 | for op, val in sorted(pycompat.iteritems(opts)): | |
817 | if not val: |
|
825 | if not val: | |
818 | continue |
|
826 | continue | |
819 | if op not in _opt2logrevset: |
|
827 | if op not in _opt2logrevset: | |
820 | continue |
|
828 | continue | |
821 | revop, listop = _opt2logrevset[op] |
|
829 | revop, listop = _opt2logrevset[op] | |
822 | if revop and b'%' not in revop: |
|
830 | if revop and b'%' not in revop: | |
823 | expr.append(revop) |
|
831 | expr.append(revop) | |
824 | elif not listop: |
|
832 | elif not listop: | |
825 | expr.append(revsetlang.formatspec(revop, val)) |
|
833 | expr.append(revsetlang.formatspec(revop, val)) | |
826 | else: |
|
834 | else: | |
827 | if revop: |
|
835 | if revop: | |
828 | val = [revsetlang.formatspec(revop, v) for v in val] |
|
836 | val = [revsetlang.formatspec(revop, v) for v in val] | |
829 | expr.append(revsetlang.formatspec(listop, val)) |
|
837 | expr.append(revsetlang.formatspec(listop, val)) | |
830 |
|
838 | |||
831 | if expr: |
|
839 | if expr: | |
832 | expr = b'(' + b' and '.join(expr) + b')' |
|
840 | expr = b'(' + b' and '.join(expr) + b')' | |
833 | else: |
|
841 | else: | |
834 | expr = None |
|
842 | expr = None | |
835 | return expr |
|
843 | return expr | |
836 |
|
844 | |||
837 |
|
845 | |||
838 | def _initialrevs(repo, opts): |
|
846 | def _initialrevs(repo, opts): | |
839 | """Return the initial set of revisions to be filtered or followed""" |
|
847 | """Return the initial set of revisions to be filtered or followed""" | |
840 | follow = opts.get(b'follow') or opts.get(b'follow_first') |
|
848 | follow = opts.get(b'follow') or opts.get(b'follow_first') | |
841 | if opts.get(b'rev'): |
|
849 | if opts.get(b'rev'): | |
842 | revs = scmutil.revrange(repo, opts[b'rev']) |
|
850 | revs = scmutil.revrange(repo, opts[b'rev']) | |
843 | elif follow and repo.dirstate.p1() == nullid: |
|
851 | elif follow and repo.dirstate.p1() == nullid: | |
844 | revs = smartset.baseset() |
|
852 | revs = smartset.baseset() | |
845 | elif follow: |
|
853 | elif follow: | |
846 | revs = repo.revs(b'.') |
|
854 | revs = repo.revs(b'.') | |
847 | else: |
|
855 | else: | |
848 | revs = smartset.spanset(repo) |
|
856 | revs = smartset.spanset(repo) | |
849 | revs.reverse() |
|
857 | revs.reverse() | |
850 | return revs |
|
858 | return revs | |
851 |
|
859 | |||
852 |
|
860 | |||
853 | def getrevs(repo, pats, opts): |
|
861 | def getrevs(repo, pats, opts): | |
854 | # type: (Any, Any, Any) -> Tuple[smartset.abstractsmartset, Optional[changesetdiffer]] |
|
862 | # type: (Any, Any, Any) -> Tuple[smartset.abstractsmartset, Optional[changesetdiffer]] | |
855 | """Return (revs, differ) where revs is a smartset |
|
863 | """Return (revs, differ) where revs is a smartset | |
856 |
|
864 | |||
857 | differ is a changesetdiffer with pre-configured file matcher. |
|
865 | differ is a changesetdiffer with pre-configured file matcher. | |
858 | """ |
|
866 | """ | |
859 | follow = opts.get(b'follow') or opts.get(b'follow_first') |
|
867 | follow = opts.get(b'follow') or opts.get(b'follow_first') | |
860 | followfirst = opts.get(b'follow_first') |
|
868 | followfirst = opts.get(b'follow_first') | |
861 | limit = getlimit(opts) |
|
869 | limit = getlimit(opts) | |
862 | revs = _initialrevs(repo, opts) |
|
870 | revs = _initialrevs(repo, opts) | |
863 | if not revs: |
|
871 | if not revs: | |
864 | return smartset.baseset(), None |
|
872 | return smartset.baseset(), None | |
865 | match, pats, slowpath = _makematcher(repo, revs, pats, opts) |
|
873 | match, pats, slowpath = _makematcher(repo, revs, pats, opts) | |
866 | filematcher = None |
|
874 | filematcher = None | |
867 | if follow: |
|
875 | if follow: | |
868 | if slowpath or match.always(): |
|
876 | if slowpath or match.always(): | |
869 | revs = dagop.revancestors(repo, revs, followfirst=followfirst) |
|
877 | revs = dagop.revancestors(repo, revs, followfirst=followfirst) | |
870 | else: |
|
878 | else: | |
871 | revs, filematcher = _fileancestors(repo, revs, match, followfirst) |
|
879 | revs, filematcher = _fileancestors(repo, revs, match, followfirst) | |
872 | revs.reverse() |
|
880 | revs.reverse() | |
873 | if filematcher is None: |
|
881 | if filematcher is None: | |
874 | filematcher = _makenofollowfilematcher(repo, pats, opts) |
|
882 | filematcher = _makenofollowfilematcher(repo, pats, opts) | |
875 | if filematcher is None: |
|
883 | if filematcher is None: | |
876 |
|
884 | |||
877 | def filematcher(ctx): |
|
885 | def filematcher(ctx): | |
878 | return match |
|
886 | return match | |
879 |
|
887 | |||
880 | expr = _makerevset(repo, match, pats, slowpath, opts) |
|
888 | expr = _makerevset(repo, match, pats, slowpath, opts) | |
881 | if opts.get(b'graph'): |
|
889 | if opts.get(b'graph'): | |
882 | # User-specified revs might be unsorted, but don't sort before |
|
890 | # User-specified revs might be unsorted, but don't sort before | |
883 | # _makerevset because it might depend on the order of revs |
|
891 | # _makerevset because it might depend on the order of revs | |
884 | if repo.ui.configbool(b'experimental', b'log.topo'): |
|
892 | if repo.ui.configbool(b'experimental', b'log.topo'): | |
885 | if not revs.istopo(): |
|
893 | if not revs.istopo(): | |
886 | revs = dagop.toposort(revs, repo.changelog.parentrevs) |
|
894 | revs = dagop.toposort(revs, repo.changelog.parentrevs) | |
887 | # TODO: try to iterate the set lazily |
|
895 | # TODO: try to iterate the set lazily | |
888 | revs = revset.baseset(list(revs), istopo=True) |
|
896 | revs = revset.baseset(list(revs), istopo=True) | |
889 | elif not (revs.isdescending() or revs.istopo()): |
|
897 | elif not (revs.isdescending() or revs.istopo()): | |
890 | revs.sort(reverse=True) |
|
898 | revs.sort(reverse=True) | |
891 | if expr: |
|
899 | if expr: | |
892 | matcher = revset.match(None, expr) |
|
900 | matcher = revset.match(None, expr) | |
893 | revs = matcher(repo, revs) |
|
901 | revs = matcher(repo, revs) | |
894 | if limit is not None: |
|
902 | if limit is not None: | |
895 | revs = revs.slice(0, limit) |
|
903 | revs = revs.slice(0, limit) | |
896 |
|
904 | |||
897 | differ = changesetdiffer() |
|
905 | differ = changesetdiffer() | |
898 | differ._makefilematcher = filematcher |
|
906 | differ._makefilematcher = filematcher | |
899 | return revs, differ |
|
907 | return revs, differ | |
900 |
|
908 | |||
901 |
|
909 | |||
902 | def _parselinerangeopt(repo, opts): |
|
910 | def _parselinerangeopt(repo, opts): | |
903 | """Parse --line-range log option and return a list of tuples (filename, |
|
911 | """Parse --line-range log option and return a list of tuples (filename, | |
904 | (fromline, toline)). |
|
912 | (fromline, toline)). | |
905 | """ |
|
913 | """ | |
906 | linerangebyfname = [] |
|
914 | linerangebyfname = [] | |
907 | for pat in opts.get(b'line_range', []): |
|
915 | for pat in opts.get(b'line_range', []): | |
908 | try: |
|
916 | try: | |
909 | pat, linerange = pat.rsplit(b',', 1) |
|
917 | pat, linerange = pat.rsplit(b',', 1) | |
910 | except ValueError: |
|
918 | except ValueError: | |
911 | raise error.Abort(_(b'malformatted line-range pattern %s') % pat) |
|
919 | raise error.Abort(_(b'malformatted line-range pattern %s') % pat) | |
912 | try: |
|
920 | try: | |
913 | fromline, toline = map(int, linerange.split(b':')) |
|
921 | fromline, toline = map(int, linerange.split(b':')) | |
914 | except ValueError: |
|
922 | except ValueError: | |
915 | raise error.Abort(_(b"invalid line range for %s") % pat) |
|
923 | raise error.Abort(_(b"invalid line range for %s") % pat) | |
916 | msg = _(b"line range pattern '%s' must match exactly one file") % pat |
|
924 | msg = _(b"line range pattern '%s' must match exactly one file") % pat | |
917 | fname = scmutil.parsefollowlinespattern(repo, None, pat, msg) |
|
925 | fname = scmutil.parsefollowlinespattern(repo, None, pat, msg) | |
918 | linerangebyfname.append( |
|
926 | linerangebyfname.append( | |
919 | (fname, util.processlinerange(fromline, toline)) |
|
927 | (fname, util.processlinerange(fromline, toline)) | |
920 | ) |
|
928 | ) | |
921 | return linerangebyfname |
|
929 | return linerangebyfname | |
922 |
|
930 | |||
923 |
|
931 | |||
924 | def getlinerangerevs(repo, userrevs, opts): |
|
932 | def getlinerangerevs(repo, userrevs, opts): | |
925 | """Return (revs, differ). |
|
933 | """Return (revs, differ). | |
926 |
|
934 | |||
927 | "revs" are revisions obtained by processing "line-range" log options and |
|
935 | "revs" are revisions obtained by processing "line-range" log options and | |
928 | walking block ancestors of each specified file/line-range. |
|
936 | walking block ancestors of each specified file/line-range. | |
929 |
|
937 | |||
930 | "differ" is a changesetdiffer with pre-configured file matcher and hunks |
|
938 | "differ" is a changesetdiffer with pre-configured file matcher and hunks | |
931 | filter. |
|
939 | filter. | |
932 | """ |
|
940 | """ | |
933 | wctx = repo[None] |
|
941 | wctx = repo[None] | |
934 |
|
942 | |||
935 | # Two-levels map of "rev -> file ctx -> [line range]". |
|
943 | # Two-levels map of "rev -> file ctx -> [line range]". | |
936 | linerangesbyrev = {} |
|
944 | linerangesbyrev = {} | |
937 | for fname, (fromline, toline) in _parselinerangeopt(repo, opts): |
|
945 | for fname, (fromline, toline) in _parselinerangeopt(repo, opts): | |
938 | if fname not in wctx: |
|
946 | if fname not in wctx: | |
939 | raise error.Abort( |
|
947 | raise error.Abort( | |
940 | _(b'cannot follow file not in parent revision: "%s"') % fname |
|
948 | _(b'cannot follow file not in parent revision: "%s"') % fname | |
941 | ) |
|
949 | ) | |
942 | fctx = wctx.filectx(fname) |
|
950 | fctx = wctx.filectx(fname) | |
943 | for fctx, linerange in dagop.blockancestors(fctx, fromline, toline): |
|
951 | for fctx, linerange in dagop.blockancestors(fctx, fromline, toline): | |
944 | rev = fctx.introrev() |
|
952 | rev = fctx.introrev() | |
945 | if rev is None: |
|
953 | if rev is None: | |
946 | rev = wdirrev |
|
954 | rev = wdirrev | |
947 | if rev not in userrevs: |
|
955 | if rev not in userrevs: | |
948 | continue |
|
956 | continue | |
949 | linerangesbyrev.setdefault(rev, {}).setdefault( |
|
957 | linerangesbyrev.setdefault(rev, {}).setdefault( | |
950 | fctx.path(), [] |
|
958 | fctx.path(), [] | |
951 | ).append(linerange) |
|
959 | ).append(linerange) | |
952 |
|
960 | |||
953 | def nofilterhunksfn(fctx, hunks): |
|
961 | def nofilterhunksfn(fctx, hunks): | |
954 | return hunks |
|
962 | return hunks | |
955 |
|
963 | |||
956 | def hunksfilter(ctx): |
|
964 | def hunksfilter(ctx): | |
957 | fctxlineranges = linerangesbyrev.get(scmutil.intrev(ctx)) |
|
965 | fctxlineranges = linerangesbyrev.get(scmutil.intrev(ctx)) | |
958 | if fctxlineranges is None: |
|
966 | if fctxlineranges is None: | |
959 | return nofilterhunksfn |
|
967 | return nofilterhunksfn | |
960 |
|
968 | |||
961 | def filterfn(fctx, hunks): |
|
969 | def filterfn(fctx, hunks): | |
962 | lineranges = fctxlineranges.get(fctx.path()) |
|
970 | lineranges = fctxlineranges.get(fctx.path()) | |
963 | if lineranges is not None: |
|
971 | if lineranges is not None: | |
964 | for hr, lines in hunks: |
|
972 | for hr, lines in hunks: | |
965 | if hr is None: # binary |
|
973 | if hr is None: # binary | |
966 | yield hr, lines |
|
974 | yield hr, lines | |
967 | continue |
|
975 | continue | |
968 | if any(mdiff.hunkinrange(hr[2:], lr) for lr in lineranges): |
|
976 | if any(mdiff.hunkinrange(hr[2:], lr) for lr in lineranges): | |
969 | yield hr, lines |
|
977 | yield hr, lines | |
970 | else: |
|
978 | else: | |
971 | for hunk in hunks: |
|
979 | for hunk in hunks: | |
972 | yield hunk |
|
980 | yield hunk | |
973 |
|
981 | |||
974 | return filterfn |
|
982 | return filterfn | |
975 |
|
983 | |||
976 | def filematcher(ctx): |
|
984 | def filematcher(ctx): | |
977 | files = list(linerangesbyrev.get(scmutil.intrev(ctx), [])) |
|
985 | files = list(linerangesbyrev.get(scmutil.intrev(ctx), [])) | |
978 | return scmutil.matchfiles(repo, files) |
|
986 | return scmutil.matchfiles(repo, files) | |
979 |
|
987 | |||
980 | revs = sorted(linerangesbyrev, reverse=True) |
|
988 | revs = sorted(linerangesbyrev, reverse=True) | |
981 |
|
989 | |||
982 | differ = changesetdiffer() |
|
990 | differ = changesetdiffer() | |
983 | differ._makefilematcher = filematcher |
|
991 | differ._makefilematcher = filematcher | |
984 | differ._makehunksfilter = hunksfilter |
|
992 | differ._makehunksfilter = hunksfilter | |
985 | return smartset.baseset(revs), differ |
|
993 | return smartset.baseset(revs), differ | |
986 |
|
994 | |||
987 |
|
995 | |||
988 | def _graphnodeformatter(ui, displayer): |
|
996 | def _graphnodeformatter(ui, displayer): | |
989 | spec = ui.config(b'ui', b'graphnodetemplate') |
|
997 | spec = ui.config(b'ui', b'graphnodetemplate') | |
990 | if not spec: |
|
998 | if not spec: | |
991 | return templatekw.getgraphnode # fast path for "{graphnode}" |
|
999 | return templatekw.getgraphnode # fast path for "{graphnode}" | |
992 |
|
1000 | |||
993 | spec = templater.unquotestring(spec) |
|
1001 | spec = templater.unquotestring(spec) | |
994 | if isinstance(displayer, changesettemplater): |
|
1002 | if isinstance(displayer, changesettemplater): | |
995 | # reuse cache of slow templates |
|
1003 | # reuse cache of slow templates | |
996 | tres = displayer._tresources |
|
1004 | tres = displayer._tresources | |
997 | else: |
|
1005 | else: | |
998 | tres = formatter.templateresources(ui) |
|
1006 | tres = formatter.templateresources(ui) | |
999 | templ = formatter.maketemplater( |
|
1007 | templ = formatter.maketemplater( | |
1000 | ui, spec, defaults=templatekw.keywords, resources=tres |
|
1008 | ui, spec, defaults=templatekw.keywords, resources=tres | |
1001 | ) |
|
1009 | ) | |
1002 |
|
1010 | |||
1003 | def formatnode(repo, ctx, cache): |
|
1011 | def formatnode(repo, ctx, cache): | |
1004 | props = {b'ctx': ctx, b'repo': repo} |
|
1012 | props = {b'ctx': ctx, b'repo': repo} | |
1005 | return templ.renderdefault(props) |
|
1013 | return templ.renderdefault(props) | |
1006 |
|
1014 | |||
1007 | return formatnode |
|
1015 | return formatnode | |
1008 |
|
1016 | |||
1009 |
|
1017 | |||
1010 | def displaygraph(ui, repo, dag, displayer, edgefn, getcopies=None, props=None): |
|
1018 | def displaygraph(ui, repo, dag, displayer, edgefn, getcopies=None, props=None): | |
1011 | props = props or {} |
|
1019 | props = props or {} | |
1012 | formatnode = _graphnodeformatter(ui, displayer) |
|
1020 | formatnode = _graphnodeformatter(ui, displayer) | |
1013 | state = graphmod.asciistate() |
|
1021 | state = graphmod.asciistate() | |
1014 | styles = state.styles |
|
1022 | styles = state.styles | |
1015 |
|
1023 | |||
1016 | # only set graph styling if HGPLAIN is not set. |
|
1024 | # only set graph styling if HGPLAIN is not set. | |
1017 | if ui.plain(b'graph'): |
|
1025 | if ui.plain(b'graph'): | |
1018 | # set all edge styles to |, the default pre-3.8 behaviour |
|
1026 | # set all edge styles to |, the default pre-3.8 behaviour | |
1019 | styles.update(dict.fromkeys(styles, b'|')) |
|
1027 | styles.update(dict.fromkeys(styles, b'|')) | |
1020 | else: |
|
1028 | else: | |
1021 | edgetypes = { |
|
1029 | edgetypes = { | |
1022 | b'parent': graphmod.PARENT, |
|
1030 | b'parent': graphmod.PARENT, | |
1023 | b'grandparent': graphmod.GRANDPARENT, |
|
1031 | b'grandparent': graphmod.GRANDPARENT, | |
1024 | b'missing': graphmod.MISSINGPARENT, |
|
1032 | b'missing': graphmod.MISSINGPARENT, | |
1025 | } |
|
1033 | } | |
1026 | for name, key in edgetypes.items(): |
|
1034 | for name, key in edgetypes.items(): | |
1027 | # experimental config: experimental.graphstyle.* |
|
1035 | # experimental config: experimental.graphstyle.* | |
1028 | styles[key] = ui.config( |
|
1036 | styles[key] = ui.config( | |
1029 | b'experimental', b'graphstyle.%s' % name, styles[key] |
|
1037 | b'experimental', b'graphstyle.%s' % name, styles[key] | |
1030 | ) |
|
1038 | ) | |
1031 | if not styles[key]: |
|
1039 | if not styles[key]: | |
1032 | styles[key] = None |
|
1040 | styles[key] = None | |
1033 |
|
1041 | |||
1034 | # experimental config: experimental.graphshorten |
|
1042 | # experimental config: experimental.graphshorten | |
1035 | state.graphshorten = ui.configbool(b'experimental', b'graphshorten') |
|
1043 | state.graphshorten = ui.configbool(b'experimental', b'graphshorten') | |
1036 |
|
1044 | |||
1037 | formatnode_cache = {} |
|
1045 | formatnode_cache = {} | |
1038 | for rev, type, ctx, parents in dag: |
|
1046 | for rev, type, ctx, parents in dag: | |
1039 | char = formatnode(repo, ctx, formatnode_cache) |
|
1047 | char = formatnode(repo, ctx, formatnode_cache) | |
1040 | copies = getcopies(ctx) if getcopies else None |
|
1048 | copies = getcopies(ctx) if getcopies else None | |
1041 | edges = edgefn(type, char, state, rev, parents) |
|
1049 | edges = edgefn(type, char, state, rev, parents) | |
1042 | firstedge = next(edges) |
|
1050 | firstedge = next(edges) | |
1043 | width = firstedge[2] |
|
1051 | width = firstedge[2] | |
1044 | displayer.show( |
|
1052 | displayer.show( | |
1045 | ctx, copies=copies, graphwidth=width, **pycompat.strkwargs(props) |
|
1053 | ctx, copies=copies, graphwidth=width, **pycompat.strkwargs(props) | |
1046 | ) |
|
1054 | ) | |
1047 | lines = displayer.hunk.pop(rev).split(b'\n') |
|
1055 | lines = displayer.hunk.pop(rev).split(b'\n') | |
1048 | if not lines[-1]: |
|
1056 | if not lines[-1]: | |
1049 | del lines[-1] |
|
1057 | del lines[-1] | |
1050 | displayer.flush(ctx) |
|
1058 | displayer.flush(ctx) | |
1051 | for type, char, width, coldata in itertools.chain([firstedge], edges): |
|
1059 | for type, char, width, coldata in itertools.chain([firstedge], edges): | |
1052 | graphmod.ascii(ui, state, type, char, lines, coldata) |
|
1060 | graphmod.ascii(ui, state, type, char, lines, coldata) | |
1053 | lines = [] |
|
1061 | lines = [] | |
1054 | displayer.close() |
|
1062 | displayer.close() | |
1055 |
|
1063 | |||
1056 |
|
1064 | |||
1057 | def displaygraphrevs(ui, repo, revs, displayer, getrenamed): |
|
1065 | def displaygraphrevs(ui, repo, revs, displayer, getrenamed): | |
1058 | revdag = graphmod.dagwalker(repo, revs) |
|
1066 | revdag = graphmod.dagwalker(repo, revs) | |
1059 | displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed) |
|
1067 | displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges, getrenamed) | |
1060 |
|
1068 | |||
1061 |
|
1069 | |||
1062 | def displayrevs(ui, repo, revs, displayer, getcopies): |
|
1070 | def displayrevs(ui, repo, revs, displayer, getcopies): | |
1063 | for rev in revs: |
|
1071 | for rev in revs: | |
1064 | ctx = repo[rev] |
|
1072 | ctx = repo[rev] | |
1065 | copies = getcopies(ctx) if getcopies else None |
|
1073 | copies = getcopies(ctx) if getcopies else None | |
1066 | displayer.show(ctx, copies=copies) |
|
1074 | displayer.show(ctx, copies=copies) | |
1067 | displayer.flush(ctx) |
|
1075 | displayer.flush(ctx) | |
1068 | displayer.close() |
|
1076 | displayer.close() | |
1069 |
|
1077 | |||
1070 |
|
1078 | |||
1071 | def checkunsupportedgraphflags(pats, opts): |
|
1079 | def checkunsupportedgraphflags(pats, opts): | |
1072 | for op in [b"newest_first"]: |
|
1080 | for op in [b"newest_first"]: | |
1073 | if op in opts and opts[op]: |
|
1081 | if op in opts and opts[op]: | |
1074 | raise error.Abort( |
|
1082 | raise error.Abort( | |
1075 | _(b"-G/--graph option is incompatible with --%s") |
|
1083 | _(b"-G/--graph option is incompatible with --%s") | |
1076 | % op.replace(b"_", b"-") |
|
1084 | % op.replace(b"_", b"-") | |
1077 | ) |
|
1085 | ) | |
1078 |
|
1086 | |||
1079 |
|
1087 | |||
1080 | def graphrevs(repo, nodes, opts): |
|
1088 | def graphrevs(repo, nodes, opts): | |
1081 | limit = getlimit(opts) |
|
1089 | limit = getlimit(opts) | |
1082 | nodes.reverse() |
|
1090 | nodes.reverse() | |
1083 | if limit is not None: |
|
1091 | if limit is not None: | |
1084 | nodes = nodes[:limit] |
|
1092 | nodes = nodes[:limit] | |
1085 | return graphmod.nodes(repo, nodes) |
|
1093 | return graphmod.nodes(repo, nodes) |
@@ -1,2835 +1,2849 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 | [255] |
|
8 | [255] | |
9 | $ hg log -r -1:0 |
|
9 | $ hg log -r -1:0 | |
10 | abort: unknown revision '-1'! |
|
10 | abort: unknown revision '-1'! | |
11 | [255] |
|
11 | [255] | |
12 | $ hg log -r 'branch(name)' |
|
12 | $ hg log -r 'branch(name)' | |
13 | abort: unknown revision 'name'! |
|
13 | abort: unknown revision 'name'! | |
14 | [255] |
|
14 | [255] | |
15 | $ hg log -r null -q |
|
15 | $ hg log -r null -q | |
16 | -1:000000000000 |
|
16 | -1:000000000000 | |
17 |
|
17 | |||
18 | $ cd .. |
|
18 | $ cd .. | |
19 |
|
19 | |||
20 | The g is crafted to have 2 filelog topological heads in a linear |
|
20 | The g is crafted to have 2 filelog topological heads in a linear | |
21 | changeset graph |
|
21 | changeset graph | |
22 |
|
22 | |||
23 | $ hg init a |
|
23 | $ hg init a | |
24 | $ cd a |
|
24 | $ cd a | |
25 | $ echo a > a |
|
25 | $ echo a > a | |
26 | $ echo f > f |
|
26 | $ echo f > f | |
27 | $ hg ci -Ama -d '1 0' |
|
27 | $ hg ci -Ama -d '1 0' | |
28 | adding a |
|
28 | adding a | |
29 | adding f |
|
29 | adding f | |
30 |
|
30 | |||
31 | $ hg cp a b |
|
31 | $ hg cp a b | |
32 | $ hg cp f g |
|
32 | $ hg cp f g | |
33 | $ hg ci -mb -d '2 0' |
|
33 | $ hg ci -mb -d '2 0' | |
34 |
|
34 | |||
35 | $ mkdir dir |
|
35 | $ mkdir dir | |
36 | $ hg mv b dir |
|
36 | $ hg mv b dir | |
37 | $ echo g >> g |
|
37 | $ echo g >> g | |
38 | $ echo f >> f |
|
38 | $ echo f >> f | |
39 | $ hg ci -mc -d '3 0' |
|
39 | $ hg ci -mc -d '3 0' | |
40 |
|
40 | |||
41 | $ hg mv a b |
|
41 | $ hg mv a b | |
42 | $ hg cp -f f g |
|
42 | $ hg cp -f f g | |
43 | $ echo a > d |
|
43 | $ echo a > d | |
44 | $ hg add d |
|
44 | $ hg add d | |
45 | $ hg ci -md -d '4 0' |
|
45 | $ hg ci -md -d '4 0' | |
46 |
|
46 | |||
47 | $ hg mv dir/b e |
|
47 | $ hg mv dir/b e | |
48 | $ hg ci -me -d '5 0' |
|
48 | $ hg ci -me -d '5 0' | |
49 |
|
49 | |||
50 | Make sure largefiles doesn't interfere with logging a regular file |
|
50 | Make sure largefiles doesn't interfere with logging a regular file | |
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
51 | $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles= | |
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
52 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
53 | updated patterns: .hglf/a, a |
|
53 | updated patterns: .hglf/a, a | |
54 | 0: a |
|
54 | 0: a | |
55 | $ hg log a |
|
55 | $ hg log a | |
56 | changeset: 0:9161b9aeaf16 |
|
56 | changeset: 0:9161b9aeaf16 | |
57 | user: test |
|
57 | user: test | |
58 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
58 | date: Thu Jan 01 00:00:01 1970 +0000 | |
59 | summary: a |
|
59 | summary: a | |
60 |
|
60 | |||
61 | $ hg log glob:a* |
|
61 | $ hg log glob:a* | |
62 | changeset: 3:2ca5ba701980 |
|
62 | changeset: 3:2ca5ba701980 | |
63 | user: test |
|
63 | user: test | |
64 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
64 | date: Thu Jan 01 00:00:04 1970 +0000 | |
65 | summary: d |
|
65 | summary: d | |
66 |
|
66 | |||
67 | changeset: 0:9161b9aeaf16 |
|
67 | changeset: 0:9161b9aeaf16 | |
68 | user: test |
|
68 | user: test | |
69 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
69 | date: Thu Jan 01 00:00:01 1970 +0000 | |
70 | summary: a |
|
70 | summary: a | |
71 |
|
71 | |||
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= |
|
72 | $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles= | |
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
73 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
74 | updated patterns: glob:.hglf/a*, glob:a* |
|
74 | updated patterns: glob:.hglf/a*, glob:a* | |
75 | 3: d |
|
75 | 3: d | |
76 | 0: a |
|
76 | 0: a | |
77 |
|
77 | |||
78 | log on directory |
|
78 | log on directory | |
79 |
|
79 | |||
80 | $ hg log dir |
|
80 | $ hg log dir | |
81 | changeset: 4:7e4639b4691b |
|
81 | changeset: 4:7e4639b4691b | |
82 | tag: tip |
|
82 | tag: tip | |
83 | user: test |
|
83 | user: test | |
84 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
84 | date: Thu Jan 01 00:00:05 1970 +0000 | |
85 | summary: e |
|
85 | summary: e | |
86 |
|
86 | |||
87 | changeset: 2:f8954cd4dc1f |
|
87 | changeset: 2:f8954cd4dc1f | |
88 | user: test |
|
88 | user: test | |
89 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
89 | date: Thu Jan 01 00:00:03 1970 +0000 | |
90 | summary: c |
|
90 | summary: c | |
91 |
|
91 | |||
92 | $ hg log somethingthatdoesntexist dir |
|
92 | $ hg log somethingthatdoesntexist dir | |
93 | changeset: 4:7e4639b4691b |
|
93 | changeset: 4:7e4639b4691b | |
94 | tag: tip |
|
94 | tag: tip | |
95 | user: test |
|
95 | user: test | |
96 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
96 | date: Thu Jan 01 00:00:05 1970 +0000 | |
97 | summary: e |
|
97 | summary: e | |
98 |
|
98 | |||
99 | changeset: 2:f8954cd4dc1f |
|
99 | changeset: 2:f8954cd4dc1f | |
100 | user: test |
|
100 | user: test | |
101 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
101 | date: Thu Jan 01 00:00:03 1970 +0000 | |
102 | summary: c |
|
102 | summary: c | |
103 |
|
103 | |||
104 |
|
104 | |||
105 | -X, with explicit path |
|
105 | -X, with explicit path | |
106 |
|
106 | |||
107 | $ hg log a -X a |
|
107 | $ hg log a -X a | |
108 |
|
108 | |||
109 | -f, non-existent directory |
|
109 | -f, non-existent directory | |
110 |
|
110 | |||
111 | $ hg log -f dir |
|
111 | $ hg log -f dir | |
112 | abort: cannot follow file not in parent revision: "dir" |
|
112 | abort: cannot follow file not in parent revision: "dir" | |
113 | [255] |
|
113 | [255] | |
114 |
|
114 | |||
115 | -f, directory |
|
115 | -f, directory | |
116 |
|
116 | |||
117 | $ hg up -q 3 |
|
117 | $ hg up -q 3 | |
118 | $ hg log -f dir |
|
118 | $ hg log -f dir | |
119 | changeset: 2:f8954cd4dc1f |
|
119 | changeset: 2:f8954cd4dc1f | |
120 | user: test |
|
120 | user: test | |
121 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
121 | date: Thu Jan 01 00:00:03 1970 +0000 | |
122 | summary: c |
|
122 | summary: c | |
123 |
|
123 | |||
124 | -f, directory with --patch |
|
124 | -f, directory with --patch | |
125 |
|
125 | |||
126 | $ hg log -f dir -p |
|
126 | $ hg log -f dir -p | |
127 | changeset: 2:f8954cd4dc1f |
|
127 | changeset: 2:f8954cd4dc1f | |
128 | user: test |
|
128 | user: test | |
129 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
129 | date: Thu Jan 01 00:00:03 1970 +0000 | |
130 | summary: c |
|
130 | summary: c | |
131 |
|
131 | |||
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
132 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
133 | --- /dev/null* (glob) |
|
133 | --- /dev/null* (glob) | |
134 | +++ b/dir/b* (glob) |
|
134 | +++ b/dir/b* (glob) | |
135 | @@ -0,0 +1,1 @@ |
|
135 | @@ -0,0 +1,1 @@ | |
136 | +a |
|
136 | +a | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | -f, pattern |
|
139 | -f, pattern | |
140 |
|
140 | |||
141 | $ hg log -f -I 'dir**' -p |
|
141 | $ hg log -f -I 'dir**' -p | |
142 | changeset: 2:f8954cd4dc1f |
|
142 | changeset: 2:f8954cd4dc1f | |
143 | user: test |
|
143 | user: test | |
144 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
144 | date: Thu Jan 01 00:00:03 1970 +0000 | |
145 | summary: c |
|
145 | summary: c | |
146 |
|
146 | |||
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
147 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
148 | --- /dev/null* (glob) |
|
148 | --- /dev/null* (glob) | |
149 | +++ b/dir/b* (glob) |
|
149 | +++ b/dir/b* (glob) | |
150 | @@ -0,0 +1,1 @@ |
|
150 | @@ -0,0 +1,1 @@ | |
151 | +a |
|
151 | +a | |
152 |
|
152 | |||
153 | $ hg up -q 4 |
|
153 | $ hg up -q 4 | |
154 |
|
154 | |||
155 | -f, a wrong style |
|
155 | -f, a wrong style | |
156 |
|
156 | |||
157 | $ hg log -f -l1 --style something |
|
157 | $ hg log -f -l1 --style something | |
158 | abort: style 'something' not found |
|
158 | abort: style 'something' not found | |
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) |
|
159 | (available styles: bisect, changelog, compact, default, phases, show, status, xml) | |
160 | [255] |
|
160 | [255] | |
161 |
|
161 | |||
162 | -f, phases style |
|
162 | -f, phases style | |
163 |
|
163 | |||
164 |
|
164 | |||
165 | $ hg log -f -l1 --style phases |
|
165 | $ hg log -f -l1 --style phases | |
166 | changeset: 4:7e4639b4691b |
|
166 | changeset: 4:7e4639b4691b | |
167 | tag: tip |
|
167 | tag: tip | |
168 | phase: draft |
|
168 | phase: draft | |
169 | user: test |
|
169 | user: test | |
170 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
170 | date: Thu Jan 01 00:00:05 1970 +0000 | |
171 | summary: e |
|
171 | summary: e | |
172 |
|
172 | |||
173 |
|
173 | |||
174 | $ hg log -f -l1 --style phases -q |
|
174 | $ hg log -f -l1 --style phases -q | |
175 | 4:7e4639b4691b |
|
175 | 4:7e4639b4691b | |
176 |
|
176 | |||
177 | -f, but no args |
|
177 | -f, but no args | |
178 |
|
178 | |||
179 | $ hg log -f |
|
179 | $ hg log -f | |
180 | changeset: 4:7e4639b4691b |
|
180 | changeset: 4:7e4639b4691b | |
181 | tag: tip |
|
181 | tag: tip | |
182 | user: test |
|
182 | user: test | |
183 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
183 | date: Thu Jan 01 00:00:05 1970 +0000 | |
184 | summary: e |
|
184 | summary: e | |
185 |
|
185 | |||
186 | changeset: 3:2ca5ba701980 |
|
186 | changeset: 3:2ca5ba701980 | |
187 | user: test |
|
187 | user: test | |
188 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
188 | date: Thu Jan 01 00:00:04 1970 +0000 | |
189 | summary: d |
|
189 | summary: d | |
190 |
|
190 | |||
191 | changeset: 2:f8954cd4dc1f |
|
191 | changeset: 2:f8954cd4dc1f | |
192 | user: test |
|
192 | user: test | |
193 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
193 | date: Thu Jan 01 00:00:03 1970 +0000 | |
194 | summary: c |
|
194 | summary: c | |
195 |
|
195 | |||
196 | changeset: 1:d89b0a12d229 |
|
196 | changeset: 1:d89b0a12d229 | |
197 | user: test |
|
197 | user: test | |
198 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
198 | date: Thu Jan 01 00:00:02 1970 +0000 | |
199 | summary: b |
|
199 | summary: b | |
200 |
|
200 | |||
201 | changeset: 0:9161b9aeaf16 |
|
201 | changeset: 0:9161b9aeaf16 | |
202 | user: test |
|
202 | user: test | |
203 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
203 | date: Thu Jan 01 00:00:01 1970 +0000 | |
204 | summary: a |
|
204 | summary: a | |
205 |
|
205 | |||
206 |
|
206 | |||
207 | one rename |
|
207 | one rename | |
208 |
|
208 | |||
209 | $ hg up -q 2 |
|
209 | $ hg up -q 2 | |
210 | $ hg log -vf a |
|
210 | $ hg log -vf a | |
211 | changeset: 0:9161b9aeaf16 |
|
211 | changeset: 0:9161b9aeaf16 | |
212 | user: test |
|
212 | user: test | |
213 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
213 | date: Thu Jan 01 00:00:01 1970 +0000 | |
214 | files: a f |
|
214 | files: a f | |
215 | description: |
|
215 | description: | |
216 | a |
|
216 | a | |
217 |
|
217 | |||
218 |
|
218 | |||
219 |
|
219 | |||
220 | many renames |
|
220 | many renames | |
221 |
|
221 | |||
222 | $ hg up -q tip |
|
222 | $ hg up -q tip | |
223 | $ hg log -vf e |
|
223 | $ hg log -vf e | |
224 | changeset: 4:7e4639b4691b |
|
224 | changeset: 4:7e4639b4691b | |
225 | tag: tip |
|
225 | tag: tip | |
226 | user: test |
|
226 | user: test | |
227 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
227 | date: Thu Jan 01 00:00:05 1970 +0000 | |
228 | files: dir/b e |
|
228 | files: dir/b e | |
229 | description: |
|
229 | description: | |
230 | e |
|
230 | e | |
231 |
|
231 | |||
232 |
|
232 | |||
233 | changeset: 2:f8954cd4dc1f |
|
233 | changeset: 2:f8954cd4dc1f | |
234 | user: test |
|
234 | user: test | |
235 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
235 | date: Thu Jan 01 00:00:03 1970 +0000 | |
236 | files: b dir/b f g |
|
236 | files: b dir/b f g | |
237 | description: |
|
237 | description: | |
238 | c |
|
238 | c | |
239 |
|
239 | |||
240 |
|
240 | |||
241 | changeset: 1:d89b0a12d229 |
|
241 | changeset: 1:d89b0a12d229 | |
242 | user: test |
|
242 | user: test | |
243 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
243 | date: Thu Jan 01 00:00:02 1970 +0000 | |
244 | files: b g |
|
244 | files: b g | |
245 | description: |
|
245 | description: | |
246 | b |
|
246 | b | |
247 |
|
247 | |||
248 |
|
248 | |||
249 | changeset: 0:9161b9aeaf16 |
|
249 | changeset: 0:9161b9aeaf16 | |
250 | user: test |
|
250 | user: test | |
251 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
251 | date: Thu Jan 01 00:00:01 1970 +0000 | |
252 | files: a f |
|
252 | files: a f | |
253 | description: |
|
253 | description: | |
254 | a |
|
254 | a | |
255 |
|
255 | |||
256 |
|
256 | |||
257 |
|
257 | |||
258 |
|
258 | |||
259 | log -pf dir/b |
|
259 | log -pf dir/b | |
260 |
|
260 | |||
261 | $ hg up -q 3 |
|
261 | $ hg up -q 3 | |
262 | $ hg log -pf dir/b |
|
262 | $ hg log -pf dir/b | |
263 | changeset: 2:f8954cd4dc1f |
|
263 | changeset: 2:f8954cd4dc1f | |
264 | user: test |
|
264 | user: test | |
265 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
265 | date: Thu Jan 01 00:00:03 1970 +0000 | |
266 | summary: c |
|
266 | summary: c | |
267 |
|
267 | |||
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
268 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
269 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
270 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
271 | @@ -0,0 +1,1 @@ |
|
271 | @@ -0,0 +1,1 @@ | |
272 | +a |
|
272 | +a | |
273 |
|
273 | |||
274 | changeset: 1:d89b0a12d229 |
|
274 | changeset: 1:d89b0a12d229 | |
275 | user: test |
|
275 | user: test | |
276 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
276 | date: Thu Jan 01 00:00:02 1970 +0000 | |
277 | summary: b |
|
277 | summary: b | |
278 |
|
278 | |||
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
279 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
280 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
281 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
282 | @@ -0,0 +1,1 @@ |
|
282 | @@ -0,0 +1,1 @@ | |
283 | +a |
|
283 | +a | |
284 |
|
284 | |||
285 | changeset: 0:9161b9aeaf16 |
|
285 | changeset: 0:9161b9aeaf16 | |
286 | user: test |
|
286 | user: test | |
287 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
287 | date: Thu Jan 01 00:00:01 1970 +0000 | |
288 | summary: a |
|
288 | summary: a | |
289 |
|
289 | |||
290 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
290 | diff -r 000000000000 -r 9161b9aeaf16 a | |
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
291 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
292 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
293 | @@ -0,0 +1,1 @@ |
|
293 | @@ -0,0 +1,1 @@ | |
294 | +a |
|
294 | +a | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | log -pf b inside dir |
|
297 | log -pf b inside dir | |
298 |
|
298 | |||
299 | $ hg --cwd=dir log -pf b |
|
299 | $ hg --cwd=dir log -pf b | |
300 | changeset: 2:f8954cd4dc1f |
|
300 | changeset: 2:f8954cd4dc1f | |
301 | user: test |
|
301 | user: test | |
302 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
302 | date: Thu Jan 01 00:00:03 1970 +0000 | |
303 | summary: c |
|
303 | summary: c | |
304 |
|
304 | |||
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
305 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
306 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
307 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
308 | @@ -0,0 +1,1 @@ |
|
308 | @@ -0,0 +1,1 @@ | |
309 | +a |
|
309 | +a | |
310 |
|
310 | |||
311 | changeset: 1:d89b0a12d229 |
|
311 | changeset: 1:d89b0a12d229 | |
312 | user: test |
|
312 | user: test | |
313 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
313 | date: Thu Jan 01 00:00:02 1970 +0000 | |
314 | summary: b |
|
314 | summary: b | |
315 |
|
315 | |||
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
316 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
317 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
318 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
319 | @@ -0,0 +1,1 @@ |
|
319 | @@ -0,0 +1,1 @@ | |
320 | +a |
|
320 | +a | |
321 |
|
321 | |||
322 | changeset: 0:9161b9aeaf16 |
|
322 | changeset: 0:9161b9aeaf16 | |
323 | user: test |
|
323 | user: test | |
324 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
324 | date: Thu Jan 01 00:00:01 1970 +0000 | |
325 | summary: a |
|
325 | summary: a | |
326 |
|
326 | |||
327 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
327 | diff -r 000000000000 -r 9161b9aeaf16 a | |
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
328 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
329 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
330 | @@ -0,0 +1,1 @@ |
|
330 | @@ -0,0 +1,1 @@ | |
331 | +a |
|
331 | +a | |
332 |
|
332 | |||
333 |
|
333 | |||
334 | log -pf, but no args |
|
334 | log -pf, but no args | |
335 |
|
335 | |||
336 | $ hg log -pf |
|
336 | $ hg log -pf | |
337 | changeset: 3:2ca5ba701980 |
|
337 | changeset: 3:2ca5ba701980 | |
338 | user: test |
|
338 | user: test | |
339 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
339 | date: Thu Jan 01 00:00:04 1970 +0000 | |
340 | summary: d |
|
340 | summary: d | |
341 |
|
341 | |||
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a |
|
342 | diff -r f8954cd4dc1f -r 2ca5ba701980 a | |
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 |
|
343 | --- a/a Thu Jan 01 00:00:03 1970 +0000 | |
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
344 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
345 | @@ -1,1 +0,0 @@ |
|
345 | @@ -1,1 +0,0 @@ | |
346 | -a |
|
346 | -a | |
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b |
|
347 | diff -r f8954cd4dc1f -r 2ca5ba701980 b | |
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
348 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 |
|
349 | +++ b/b Thu Jan 01 00:00:04 1970 +0000 | |
350 | @@ -0,0 +1,1 @@ |
|
350 | @@ -0,0 +1,1 @@ | |
351 | +a |
|
351 | +a | |
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
352 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
353 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
354 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
355 | @@ -0,0 +1,1 @@ |
|
355 | @@ -0,0 +1,1 @@ | |
356 | +a |
|
356 | +a | |
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
357 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
358 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
359 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
360 | @@ -1,2 +1,2 @@ |
|
360 | @@ -1,2 +1,2 @@ | |
361 | f |
|
361 | f | |
362 | -g |
|
362 | -g | |
363 | +f |
|
363 | +f | |
364 |
|
364 | |||
365 | changeset: 2:f8954cd4dc1f |
|
365 | changeset: 2:f8954cd4dc1f | |
366 | user: test |
|
366 | user: test | |
367 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
367 | date: Thu Jan 01 00:00:03 1970 +0000 | |
368 | summary: c |
|
368 | summary: c | |
369 |
|
369 | |||
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b |
|
370 | diff -r d89b0a12d229 -r f8954cd4dc1f b | |
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 |
|
371 | --- a/b Thu Jan 01 00:00:02 1970 +0000 | |
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
372 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
373 | @@ -1,1 +0,0 @@ |
|
373 | @@ -1,1 +0,0 @@ | |
374 | -a |
|
374 | -a | |
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
375 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
376 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
377 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
378 | @@ -0,0 +1,1 @@ |
|
378 | @@ -0,0 +1,1 @@ | |
379 | +a |
|
379 | +a | |
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
380 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
381 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
382 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
383 | @@ -1,1 +1,2 @@ |
|
383 | @@ -1,1 +1,2 @@ | |
384 | f |
|
384 | f | |
385 | +f |
|
385 | +f | |
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g |
|
386 | diff -r d89b0a12d229 -r f8954cd4dc1f g | |
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 |
|
387 | --- a/g Thu Jan 01 00:00:02 1970 +0000 | |
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 |
|
388 | +++ b/g Thu Jan 01 00:00:03 1970 +0000 | |
389 | @@ -1,1 +1,2 @@ |
|
389 | @@ -1,1 +1,2 @@ | |
390 | f |
|
390 | f | |
391 | +g |
|
391 | +g | |
392 |
|
392 | |||
393 | changeset: 1:d89b0a12d229 |
|
393 | changeset: 1:d89b0a12d229 | |
394 | user: test |
|
394 | user: test | |
395 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
395 | date: Thu Jan 01 00:00:02 1970 +0000 | |
396 | summary: b |
|
396 | summary: b | |
397 |
|
397 | |||
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
398 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
399 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
400 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
401 | @@ -0,0 +1,1 @@ |
|
401 | @@ -0,0 +1,1 @@ | |
402 | +a |
|
402 | +a | |
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g |
|
403 | diff -r 9161b9aeaf16 -r d89b0a12d229 g | |
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
404 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 |
|
405 | +++ b/g Thu Jan 01 00:00:02 1970 +0000 | |
406 | @@ -0,0 +1,1 @@ |
|
406 | @@ -0,0 +1,1 @@ | |
407 | +f |
|
407 | +f | |
408 |
|
408 | |||
409 | changeset: 0:9161b9aeaf16 |
|
409 | changeset: 0:9161b9aeaf16 | |
410 | user: test |
|
410 | user: test | |
411 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
411 | date: Thu Jan 01 00:00:01 1970 +0000 | |
412 | summary: a |
|
412 | summary: a | |
413 |
|
413 | |||
414 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
414 | diff -r 000000000000 -r 9161b9aeaf16 a | |
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
415 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
416 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
417 | @@ -0,0 +1,1 @@ |
|
417 | @@ -0,0 +1,1 @@ | |
418 | +a |
|
418 | +a | |
419 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
419 | diff -r 000000000000 -r 9161b9aeaf16 f | |
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
420 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
421 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
422 | @@ -0,0 +1,1 @@ |
|
422 | @@ -0,0 +1,1 @@ | |
423 | +f |
|
423 | +f | |
424 |
|
424 | |||
425 |
|
425 | |||
426 | log -vf dir/b |
|
426 | log -vf dir/b | |
427 |
|
427 | |||
428 | $ hg log -vf dir/b |
|
428 | $ hg log -vf dir/b | |
429 | changeset: 2:f8954cd4dc1f |
|
429 | changeset: 2:f8954cd4dc1f | |
430 | user: test |
|
430 | user: test | |
431 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
431 | date: Thu Jan 01 00:00:03 1970 +0000 | |
432 | files: b dir/b f g |
|
432 | files: b dir/b f g | |
433 | description: |
|
433 | description: | |
434 | c |
|
434 | c | |
435 |
|
435 | |||
436 |
|
436 | |||
437 | changeset: 1:d89b0a12d229 |
|
437 | changeset: 1:d89b0a12d229 | |
438 | user: test |
|
438 | user: test | |
439 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
439 | date: Thu Jan 01 00:00:02 1970 +0000 | |
440 | files: b g |
|
440 | files: b g | |
441 | description: |
|
441 | description: | |
442 | b |
|
442 | b | |
443 |
|
443 | |||
444 |
|
444 | |||
445 | changeset: 0:9161b9aeaf16 |
|
445 | changeset: 0:9161b9aeaf16 | |
446 | user: test |
|
446 | user: test | |
447 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
447 | date: Thu Jan 01 00:00:01 1970 +0000 | |
448 | files: a f |
|
448 | files: a f | |
449 | description: |
|
449 | description: | |
450 | a |
|
450 | a | |
451 |
|
451 | |||
452 |
|
452 | |||
453 |
|
453 | |||
454 |
|
454 | |||
455 | -f and multiple filelog heads |
|
455 | -f and multiple filelog heads | |
456 |
|
456 | |||
457 | $ hg up -q 2 |
|
457 | $ hg up -q 2 | |
458 | $ hg log -f g --template '{rev}\n' |
|
458 | $ hg log -f g --template '{rev}\n' | |
459 | 2 |
|
459 | 2 | |
460 | 1 |
|
460 | 1 | |
461 | 0 |
|
461 | 0 | |
462 | $ hg up -q tip |
|
462 | $ hg up -q tip | |
463 | $ hg log -f g --template '{rev}\n' |
|
463 | $ hg log -f g --template '{rev}\n' | |
464 | 3 |
|
464 | 3 | |
465 | 2 |
|
465 | 2 | |
466 | 0 |
|
466 | 0 | |
467 |
|
467 | |||
468 | follow files from the specified revisions (issue4959) |
|
468 | follow files from the specified revisions (issue4959) | |
469 |
|
469 | |||
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' |
|
470 | $ hg log -G -T '{rev} {files},{file_copies % " {source}->{name}"}\n' | |
471 | @ 4 dir/b e, dir/b->e |
|
471 | @ 4 dir/b e, dir/b->e | |
472 | | |
|
472 | | | |
473 | o 3 a b d g, a->b f->g |
|
473 | o 3 a b d g, a->b f->g | |
474 | | |
|
474 | | | |
475 | o 2 b dir/b f g, b->dir/b |
|
475 | o 2 b dir/b f g, b->dir/b | |
476 | | |
|
476 | | | |
477 | o 1 b g, a->b f->g |
|
477 | o 1 b g, a->b f->g | |
478 | | |
|
478 | | | |
479 | o 0 a f, |
|
479 | o 0 a f, | |
480 |
|
480 | |||
481 |
|
481 | |||
482 | $ hg log -T '{rev}\n' -fr 4 e |
|
482 | $ hg log -T '{rev}\n' -fr 4 e | |
483 | 4 |
|
483 | 4 | |
484 | 2 |
|
484 | 2 | |
485 | 1 |
|
485 | 1 | |
486 | 0 |
|
486 | 0 | |
487 | $ hg log -T '{rev}\n' -fr 2 g |
|
487 | $ hg log -T '{rev}\n' -fr 2 g | |
488 | 2 |
|
488 | 2 | |
489 | 1 |
|
489 | 1 | |
490 | 0 |
|
490 | 0 | |
491 | $ hg log -T '{rev}\n' -fr '2+3' g |
|
491 | $ hg log -T '{rev}\n' -fr '2+3' g | |
492 | 3 |
|
492 | 3 | |
493 | 2 |
|
493 | 2 | |
494 | 1 |
|
494 | 1 | |
495 | 0 |
|
495 | 0 | |
496 |
|
496 | |||
497 | follow files from the specified revisions with glob patterns (issue5053) |
|
497 | follow files from the specified revisions with glob patterns (issue5053) | |
498 | (BROKEN: should follow copies from e@4) |
|
498 | (BROKEN: should follow copies from e@4) | |
499 |
|
499 | |||
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' |
|
500 | $ hg log -T '{rev}\n' -fr4 e -X '[abcdfg]' | |
501 | 4 |
|
501 | 4 | |
502 | 2 (false !) |
|
502 | 2 (false !) | |
503 | 1 (false !) |
|
503 | 1 (false !) | |
504 | 0 (false !) |
|
504 | 0 (false !) | |
505 |
|
505 | |||
506 | follow files from the specified revisions with missing patterns |
|
506 | follow files from the specified revisions with missing patterns | |
507 | (BROKEN: should follow copies from e@4) |
|
507 | (BROKEN: should follow copies from e@4) | |
508 |
|
508 | |||
509 | $ hg log -T '{rev}\n' -fr4 e x |
|
509 | $ hg log -T '{rev}\n' -fr4 e x | |
510 | 4 |
|
510 | 4 | |
511 | 2 (false !) |
|
511 | 2 (false !) | |
512 | 1 (false !) |
|
512 | 1 (false !) | |
513 | 0 (false !) |
|
513 | 0 (false !) | |
514 |
|
514 | |||
515 | follow files from the specified revisions across copies with -p/--patch |
|
515 | follow files from the specified revisions across copies with -p/--patch | |
516 |
|
516 | |||
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g |
|
517 | $ hg log -T '== rev: {rev},{file_copies % " {source}->{name}"} ==\n' -fpr 4 e g | |
518 | == rev: 4, dir/b->e == |
|
518 | == rev: 4, dir/b->e == | |
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e |
|
519 | diff -r 2ca5ba701980 -r 7e4639b4691b e | |
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
520 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 |
|
521 | +++ b/e Thu Jan 01 00:00:05 1970 +0000 | |
522 | @@ -0,0 +1,1 @@ |
|
522 | @@ -0,0 +1,1 @@ | |
523 | +a |
|
523 | +a | |
524 |
|
524 | |||
525 | == rev: 3, a->b f->g == |
|
525 | == rev: 3, a->b f->g == | |
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g |
|
526 | diff -r f8954cd4dc1f -r 2ca5ba701980 g | |
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 |
|
527 | --- a/g Thu Jan 01 00:00:03 1970 +0000 | |
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 |
|
528 | +++ b/g Thu Jan 01 00:00:04 1970 +0000 | |
529 | @@ -1,2 +1,2 @@ |
|
529 | @@ -1,2 +1,2 @@ | |
530 | f |
|
530 | f | |
531 | -g |
|
531 | -g | |
532 | +f |
|
532 | +f | |
533 |
|
533 | |||
534 | == rev: 2, b->dir/b == |
|
534 | == rev: 2, b->dir/b == | |
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b |
|
535 | diff -r d89b0a12d229 -r f8954cd4dc1f dir/b | |
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
536 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 |
|
537 | +++ b/dir/b Thu Jan 01 00:00:03 1970 +0000 | |
538 | @@ -0,0 +1,1 @@ |
|
538 | @@ -0,0 +1,1 @@ | |
539 | +a |
|
539 | +a | |
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f |
|
540 | diff -r d89b0a12d229 -r f8954cd4dc1f f | |
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 |
|
541 | --- a/f Thu Jan 01 00:00:02 1970 +0000 | |
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 |
|
542 | +++ b/f Thu Jan 01 00:00:03 1970 +0000 | |
543 | @@ -1,1 +1,2 @@ |
|
543 | @@ -1,1 +1,2 @@ | |
544 | f |
|
544 | f | |
545 | +f |
|
545 | +f | |
546 |
|
546 | |||
547 | == rev: 1, a->b f->g == |
|
547 | == rev: 1, a->b f->g == | |
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b |
|
548 | diff -r 9161b9aeaf16 -r d89b0a12d229 b | |
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
549 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 |
|
550 | +++ b/b Thu Jan 01 00:00:02 1970 +0000 | |
551 | @@ -0,0 +1,1 @@ |
|
551 | @@ -0,0 +1,1 @@ | |
552 | +a |
|
552 | +a | |
553 |
|
553 | |||
554 | == rev: 0, == |
|
554 | == rev: 0, == | |
555 | diff -r 000000000000 -r 9161b9aeaf16 a |
|
555 | diff -r 000000000000 -r 9161b9aeaf16 a | |
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
556 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
557 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 | |
558 | @@ -0,0 +1,1 @@ |
|
558 | @@ -0,0 +1,1 @@ | |
559 | +a |
|
559 | +a | |
560 | diff -r 000000000000 -r 9161b9aeaf16 f |
|
560 | diff -r 000000000000 -r 9161b9aeaf16 f | |
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
561 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 |
|
562 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
563 | @@ -0,0 +1,1 @@ |
|
563 | @@ -0,0 +1,1 @@ | |
564 | +f |
|
564 | +f | |
565 |
|
565 | |||
566 |
|
566 | |||
567 | log copies with --copies |
|
567 | log copies with --copies | |
568 |
|
568 | |||
569 | $ hg log -vC --template '{rev} {file_copies}\n' |
|
569 | $ hg log -vC --template '{rev} {file_copies}\n' | |
570 | 4 e (dir/b) |
|
570 | 4 e (dir/b) | |
571 | 3 b (a)g (f) |
|
571 | 3 b (a)g (f) | |
572 | 2 dir/b (b) |
|
572 | 2 dir/b (b) | |
573 | 1 b (a)g (f) |
|
573 | 1 b (a)g (f) | |
574 | 0 |
|
574 | 0 | |
575 |
|
575 | |||
576 | log copies switch without --copies, with old filecopy template |
|
576 | log copies switch without --copies, with old filecopy template | |
577 |
|
577 | |||
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' |
|
578 | $ hg log -v --template '{rev} {file_copies_switch%filecopy}\n' | |
579 | 4 |
|
579 | 4 | |
580 | 3 |
|
580 | 3 | |
581 | 2 |
|
581 | 2 | |
582 | 1 |
|
582 | 1 | |
583 | 0 |
|
583 | 0 | |
584 |
|
584 | |||
585 | log copies switch with --copies |
|
585 | log copies switch with --copies | |
586 |
|
586 | |||
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' |
|
587 | $ hg log -vC --template '{rev} {file_copies_switch}\n' | |
588 | 4 e (dir/b) |
|
588 | 4 e (dir/b) | |
589 | 3 b (a)g (f) |
|
589 | 3 b (a)g (f) | |
590 | 2 dir/b (b) |
|
590 | 2 dir/b (b) | |
591 | 1 b (a)g (f) |
|
591 | 1 b (a)g (f) | |
592 | 0 |
|
592 | 0 | |
593 |
|
593 | |||
594 |
|
594 | |||
595 | log copies with hardcoded style and with --style=default |
|
595 | log copies with hardcoded style and with --style=default | |
596 |
|
596 | |||
597 | $ hg log -vC -r4 |
|
597 | $ hg log -vC -r4 | |
598 | changeset: 4:7e4639b4691b |
|
598 | changeset: 4:7e4639b4691b | |
599 | tag: tip |
|
599 | tag: tip | |
600 | user: test |
|
600 | user: test | |
601 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
601 | date: Thu Jan 01 00:00:05 1970 +0000 | |
602 | files: dir/b e |
|
602 | files: dir/b e | |
603 | copies: e (dir/b) |
|
603 | copies: e (dir/b) | |
604 | description: |
|
604 | description: | |
605 | e |
|
605 | e | |
606 |
|
606 | |||
607 |
|
607 | |||
608 | $ hg log -vC -r4 --style=default |
|
608 | $ hg log -vC -r4 --style=default | |
609 | changeset: 4:7e4639b4691b |
|
609 | changeset: 4:7e4639b4691b | |
610 | tag: tip |
|
610 | tag: tip | |
611 | user: test |
|
611 | user: test | |
612 | date: Thu Jan 01 00:00:05 1970 +0000 |
|
612 | date: Thu Jan 01 00:00:05 1970 +0000 | |
613 | files: dir/b e |
|
613 | files: dir/b e | |
614 | copies: e (dir/b) |
|
614 | copies: e (dir/b) | |
615 | description: |
|
615 | description: | |
616 | e |
|
616 | e | |
617 |
|
617 | |||
618 |
|
618 | |||
619 | $ hg log -vC -r4 -Tjson |
|
619 | $ hg log -vC -r4 -Tjson | |
620 | [ |
|
620 | [ | |
621 | { |
|
621 | { | |
622 | "bookmarks": [], |
|
622 | "bookmarks": [], | |
623 | "branch": "default", |
|
623 | "branch": "default", | |
624 | "copies": {"e": "dir/b"}, |
|
624 | "copies": {"e": "dir/b"}, | |
625 | "date": [5, 0], |
|
625 | "date": [5, 0], | |
626 | "desc": "e", |
|
626 | "desc": "e", | |
627 | "files": ["dir/b", "e"], |
|
627 | "files": ["dir/b", "e"], | |
628 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", |
|
628 | "node": "7e4639b4691b9f84b81036a8d4fb218ce3c5e3a3", | |
629 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], |
|
629 | "parents": ["2ca5ba7019804f1f597249caddf22a64d34df0ba"], | |
630 | "phase": "draft", |
|
630 | "phase": "draft", | |
631 | "rev": 4, |
|
631 | "rev": 4, | |
632 | "tags": ["tip"], |
|
632 | "tags": ["tip"], | |
633 | "user": "test" |
|
633 | "user": "test" | |
634 | } |
|
634 | } | |
635 | ] |
|
635 | ] | |
636 |
|
636 | |||
637 | log copies, non-linear manifest |
|
637 | log copies, non-linear manifest | |
638 |
|
638 | |||
639 | $ hg up -C 3 |
|
639 | $ hg up -C 3 | |
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
640 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
641 | $ hg mv dir/b e |
|
641 | $ hg mv dir/b e | |
642 | $ echo foo > foo |
|
642 | $ echo foo > foo | |
643 | $ hg ci -Ame2 -d '6 0' |
|
643 | $ hg ci -Ame2 -d '6 0' | |
644 | adding foo |
|
644 | adding foo | |
645 | created new head |
|
645 | created new head | |
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 |
|
646 | $ hg log -v --template '{rev} {file_copies}\n' -r 5 | |
647 | 5 e (dir/b) |
|
647 | 5 e (dir/b) | |
648 |
|
648 | |||
649 |
|
649 | |||
650 | log copies, execute bit set |
|
650 | log copies, execute bit set | |
651 |
|
651 | |||
652 | #if execbit |
|
652 | #if execbit | |
653 | $ chmod +x e |
|
653 | $ chmod +x e | |
654 | $ hg ci -me3 -d '7 0' |
|
654 | $ hg ci -me3 -d '7 0' | |
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 |
|
655 | $ hg log -v --template '{rev} {file_copies}\n' -r 6 | |
656 | 6 |
|
656 | 6 | |
657 | #endif |
|
657 | #endif | |
658 |
|
658 | |||
659 | log copies, empty set |
|
659 | log copies, empty set | |
660 |
|
660 | |||
661 | $ hg log --copies -r '0 and not 0' |
|
661 | $ hg log --copies -r '0 and not 0' | |
662 |
|
662 | |||
663 | log -p d |
|
663 | log -p d | |
664 |
|
664 | |||
665 | $ hg log -pv d |
|
665 | $ hg log -pv d | |
666 | changeset: 3:2ca5ba701980 |
|
666 | changeset: 3:2ca5ba701980 | |
667 | user: test |
|
667 | user: test | |
668 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
668 | date: Thu Jan 01 00:00:04 1970 +0000 | |
669 | files: a b d g |
|
669 | files: a b d g | |
670 | description: |
|
670 | description: | |
671 | d |
|
671 | d | |
672 |
|
672 | |||
673 |
|
673 | |||
674 | diff -r f8954cd4dc1f -r 2ca5ba701980 d |
|
674 | diff -r f8954cd4dc1f -r 2ca5ba701980 d | |
675 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
675 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
676 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 |
|
676 | +++ b/d Thu Jan 01 00:00:04 1970 +0000 | |
677 | @@ -0,0 +1,1 @@ |
|
677 | @@ -0,0 +1,1 @@ | |
678 | +a |
|
678 | +a | |
679 |
|
679 | |||
680 |
|
680 | |||
681 |
|
681 | |||
682 | log --removed file |
|
682 | log --removed file | |
683 |
|
683 | |||
684 | $ hg log --removed -v a |
|
684 | $ hg log --removed -v a | |
685 | changeset: 3:2ca5ba701980 |
|
685 | changeset: 3:2ca5ba701980 | |
686 | user: test |
|
686 | user: test | |
687 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
687 | date: Thu Jan 01 00:00:04 1970 +0000 | |
688 | files: a b d g |
|
688 | files: a b d g | |
689 | description: |
|
689 | description: | |
690 | d |
|
690 | d | |
691 |
|
691 | |||
692 |
|
692 | |||
693 | changeset: 0:9161b9aeaf16 |
|
693 | changeset: 0:9161b9aeaf16 | |
694 | user: test |
|
694 | user: test | |
695 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
695 | date: Thu Jan 01 00:00:01 1970 +0000 | |
696 | files: a f |
|
696 | files: a f | |
697 | description: |
|
697 | description: | |
698 | a |
|
698 | a | |
699 |
|
699 | |||
700 |
|
700 | |||
701 |
|
701 | |||
702 | log --removed revrange file |
|
702 | log --removed revrange file | |
703 |
|
703 | |||
704 | $ hg log --removed -v -r0:2 a |
|
704 | $ hg log --removed -v -r0:2 a | |
705 | changeset: 0:9161b9aeaf16 |
|
705 | changeset: 0:9161b9aeaf16 | |
706 | user: test |
|
706 | user: test | |
707 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
707 | date: Thu Jan 01 00:00:01 1970 +0000 | |
708 | files: a f |
|
708 | files: a f | |
709 | description: |
|
709 | description: | |
710 | a |
|
710 | a | |
711 |
|
711 | |||
712 |
|
712 | |||
713 | $ cd .. |
|
713 | $ cd .. | |
714 |
|
714 | |||
715 | log --follow tests |
|
715 | log --follow tests | |
716 |
|
716 | |||
717 | $ hg init follow |
|
717 | $ hg init follow | |
718 | $ cd follow |
|
718 | $ cd follow | |
719 |
|
719 | |||
720 | $ echo base > base |
|
720 | $ echo base > base | |
721 | $ hg ci -Ambase -d '1 0' |
|
721 | $ hg ci -Ambase -d '1 0' | |
722 | adding base |
|
722 | adding base | |
723 |
|
723 | |||
724 | $ echo r1 >> base |
|
724 | $ echo r1 >> base | |
725 | $ hg ci -Amr1 -d '1 0' |
|
725 | $ hg ci -Amr1 -d '1 0' | |
726 | $ echo r2 >> base |
|
726 | $ echo r2 >> base | |
727 | $ hg ci -Amr2 -d '1 0' |
|
727 | $ hg ci -Amr2 -d '1 0' | |
728 |
|
728 | |||
729 | $ hg up -C 1 |
|
729 | $ hg up -C 1 | |
730 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
730 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
731 | $ echo b1 > b1 |
|
731 | $ echo b1 > b1 | |
732 |
|
732 | |||
733 | log -r "follow('set:clean()')" |
|
733 | log -r "follow('set:clean()')" | |
734 |
|
734 | |||
735 | $ hg log -r "follow('set:clean()')" |
|
735 | $ hg log -r "follow('set:clean()')" | |
736 | changeset: 0:67e992f2c4f3 |
|
736 | changeset: 0:67e992f2c4f3 | |
737 | user: test |
|
737 | user: test | |
738 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
738 | date: Thu Jan 01 00:00:01 1970 +0000 | |
739 | summary: base |
|
739 | summary: base | |
740 |
|
740 | |||
741 | changeset: 1:3d5bf5654eda |
|
741 | changeset: 1:3d5bf5654eda | |
742 | user: test |
|
742 | user: test | |
743 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
743 | date: Thu Jan 01 00:00:01 1970 +0000 | |
744 | summary: r1 |
|
744 | summary: r1 | |
745 |
|
745 | |||
746 |
|
746 | |||
747 | $ hg ci -Amb1 -d '1 0' |
|
747 | $ hg ci -Amb1 -d '1 0' | |
748 | adding b1 |
|
748 | adding b1 | |
749 | created new head |
|
749 | created new head | |
750 |
|
750 | |||
751 |
|
751 | |||
752 | log -f |
|
752 | log -f | |
753 |
|
753 | |||
754 | $ hg log -f |
|
754 | $ hg log -f | |
755 | changeset: 3:e62f78d544b4 |
|
755 | changeset: 3:e62f78d544b4 | |
756 | tag: tip |
|
756 | tag: tip | |
757 | parent: 1:3d5bf5654eda |
|
757 | parent: 1:3d5bf5654eda | |
758 | user: test |
|
758 | user: test | |
759 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
759 | date: Thu Jan 01 00:00:01 1970 +0000 | |
760 | summary: b1 |
|
760 | summary: b1 | |
761 |
|
761 | |||
762 | changeset: 1:3d5bf5654eda |
|
762 | changeset: 1:3d5bf5654eda | |
763 | user: test |
|
763 | user: test | |
764 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
764 | date: Thu Jan 01 00:00:01 1970 +0000 | |
765 | summary: r1 |
|
765 | summary: r1 | |
766 |
|
766 | |||
767 | changeset: 0:67e992f2c4f3 |
|
767 | changeset: 0:67e992f2c4f3 | |
768 | user: test |
|
768 | user: test | |
769 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
769 | date: Thu Jan 01 00:00:01 1970 +0000 | |
770 | summary: base |
|
770 | summary: base | |
771 |
|
771 | |||
772 |
|
772 | |||
773 | log -r follow('glob:b*') |
|
773 | log -r follow('glob:b*') | |
774 |
|
774 | |||
775 | $ hg log -r "follow('glob:b*')" |
|
775 | $ hg log -r "follow('glob:b*')" | |
776 | changeset: 0:67e992f2c4f3 |
|
776 | changeset: 0:67e992f2c4f3 | |
777 | user: test |
|
777 | user: test | |
778 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
778 | date: Thu Jan 01 00:00:01 1970 +0000 | |
779 | summary: base |
|
779 | summary: base | |
780 |
|
780 | |||
781 | changeset: 1:3d5bf5654eda |
|
781 | changeset: 1:3d5bf5654eda | |
782 | user: test |
|
782 | user: test | |
783 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
783 | date: Thu Jan 01 00:00:01 1970 +0000 | |
784 | summary: r1 |
|
784 | summary: r1 | |
785 |
|
785 | |||
786 | changeset: 3:e62f78d544b4 |
|
786 | changeset: 3:e62f78d544b4 | |
787 | tag: tip |
|
787 | tag: tip | |
788 | parent: 1:3d5bf5654eda |
|
788 | parent: 1:3d5bf5654eda | |
789 | user: test |
|
789 | user: test | |
790 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
790 | date: Thu Jan 01 00:00:01 1970 +0000 | |
791 | summary: b1 |
|
791 | summary: b1 | |
792 |
|
792 | |||
793 | log -f -r '1 + 4' |
|
793 | log -f -r '1 + 4' | |
794 |
|
794 | |||
795 | $ hg up -C 0 |
|
795 | $ hg up -C 0 | |
796 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
796 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
797 | $ echo b2 > b2 |
|
797 | $ echo b2 > b2 | |
798 | $ hg ci -Amb2 -d '1 0' |
|
798 | $ hg ci -Amb2 -d '1 0' | |
799 | adding b2 |
|
799 | adding b2 | |
800 | created new head |
|
800 | created new head | |
801 | $ hg log -f -r '1 + 4' |
|
801 | $ hg log -f -r '1 + 4' | |
802 | changeset: 4:ddb82e70d1a1 |
|
802 | changeset: 4:ddb82e70d1a1 | |
803 | tag: tip |
|
803 | tag: tip | |
804 | parent: 0:67e992f2c4f3 |
|
804 | parent: 0:67e992f2c4f3 | |
805 | user: test |
|
805 | user: test | |
806 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
806 | date: Thu Jan 01 00:00:01 1970 +0000 | |
807 | summary: b2 |
|
807 | summary: b2 | |
808 |
|
808 | |||
809 | changeset: 1:3d5bf5654eda |
|
809 | changeset: 1:3d5bf5654eda | |
810 | user: test |
|
810 | user: test | |
811 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
811 | date: Thu Jan 01 00:00:01 1970 +0000 | |
812 | summary: r1 |
|
812 | summary: r1 | |
813 |
|
813 | |||
814 | changeset: 0:67e992f2c4f3 |
|
814 | changeset: 0:67e992f2c4f3 | |
815 | user: test |
|
815 | user: test | |
816 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
816 | date: Thu Jan 01 00:00:01 1970 +0000 | |
817 | summary: base |
|
817 | summary: base | |
818 |
|
818 | |||
819 |
|
819 | |||
820 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no |
|
820 | log -fr with aliases: 'A' should be expanded, but 'reverse()' should have no | |
821 | effect |
|
821 | effect | |
822 |
|
822 | |||
823 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA |
|
823 | $ hg log --config 'revsetalias.reverse(x)=x' --config 'revsetalias.A=1+4' -qfrA | |
824 | 4:ddb82e70d1a1 |
|
824 | 4:ddb82e70d1a1 | |
825 | 1:3d5bf5654eda |
|
825 | 1:3d5bf5654eda | |
826 | 0:67e992f2c4f3 |
|
826 | 0:67e992f2c4f3 | |
827 |
|
827 | |||
828 | log -r "follow('set:grep(b2)')" |
|
828 | log -r "follow('set:grep(b2)')" | |
829 |
|
829 | |||
830 | $ hg log -r "follow('set:grep(b2)')" |
|
830 | $ hg log -r "follow('set:grep(b2)')" | |
831 | changeset: 4:ddb82e70d1a1 |
|
831 | changeset: 4:ddb82e70d1a1 | |
832 | tag: tip |
|
832 | tag: tip | |
833 | parent: 0:67e992f2c4f3 |
|
833 | parent: 0:67e992f2c4f3 | |
834 | user: test |
|
834 | user: test | |
835 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
835 | date: Thu Jan 01 00:00:01 1970 +0000 | |
836 | summary: b2 |
|
836 | summary: b2 | |
837 |
|
837 | |||
838 | log -r "follow('set:grep(b2)', 4)" |
|
838 | log -r "follow('set:grep(b2)', 4)" | |
839 |
|
839 | |||
840 | $ hg up -qC 0 |
|
840 | $ hg up -qC 0 | |
841 | $ hg log -r "follow('set:grep(b2)', 4)" |
|
841 | $ hg log -r "follow('set:grep(b2)', 4)" | |
842 | changeset: 4:ddb82e70d1a1 |
|
842 | changeset: 4:ddb82e70d1a1 | |
843 | tag: tip |
|
843 | tag: tip | |
844 | parent: 0:67e992f2c4f3 |
|
844 | parent: 0:67e992f2c4f3 | |
845 | user: test |
|
845 | user: test | |
846 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
846 | date: Thu Jan 01 00:00:01 1970 +0000 | |
847 | summary: b2 |
|
847 | summary: b2 | |
848 |
|
848 | |||
849 |
|
849 | |||
850 | follow files starting from multiple revisions: |
|
850 | follow files starting from multiple revisions: | |
851 |
|
851 | |||
852 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" |
|
852 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:b?', startrev=2+3+4)" | |
853 | 3: b1 |
|
853 | 3: b1 | |
854 | 4: b2 |
|
854 | 4: b2 | |
855 |
|
855 | |||
856 | follow files starting from empty revision: |
|
856 | follow files starting from empty revision: | |
857 |
|
857 | |||
858 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" |
|
858 | $ hg log -T '{rev}: {files}\n' -r "follow('glob:*', startrev=.-.)" | |
859 |
|
859 | |||
860 | follow starting from revisions: |
|
860 | follow starting from revisions: | |
861 |
|
861 | |||
862 | $ hg log -Gq -r "follow(startrev=2+4)" |
|
862 | $ hg log -Gq -r "follow(startrev=2+4)" | |
863 | o 4:ddb82e70d1a1 |
|
863 | o 4:ddb82e70d1a1 | |
864 | | |
|
864 | | | |
865 | | o 2:60c670bf5b30 |
|
865 | | o 2:60c670bf5b30 | |
866 | | | |
|
866 | | | | |
867 | | o 1:3d5bf5654eda |
|
867 | | o 1:3d5bf5654eda | |
868 | |/ |
|
868 | |/ | |
869 | @ 0:67e992f2c4f3 |
|
869 | @ 0:67e992f2c4f3 | |
870 |
|
870 | |||
871 |
|
871 | |||
872 | follow the current revision: |
|
872 | follow the current revision: | |
873 |
|
873 | |||
874 | $ hg log -Gq -r "follow()" |
|
874 | $ hg log -Gq -r "follow()" | |
875 | @ 0:67e992f2c4f3 |
|
875 | @ 0:67e992f2c4f3 | |
876 |
|
876 | |||
877 |
|
877 | |||
878 | $ hg up -qC 4 |
|
878 | $ hg up -qC 4 | |
879 |
|
879 | |||
880 | log -f -r null |
|
880 | log -f -r null | |
881 |
|
881 | |||
882 | $ hg log -f -r null |
|
882 | $ hg log -f -r null | |
883 | changeset: -1:000000000000 |
|
883 | changeset: -1:000000000000 | |
884 | user: |
|
884 | user: | |
885 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
885 | date: Thu Jan 01 00:00:00 1970 +0000 | |
886 |
|
886 | |||
887 | $ hg log -f -r null -G |
|
887 | $ hg log -f -r null -G | |
888 | o changeset: -1:000000000000 |
|
888 | o changeset: -1:000000000000 | |
889 | user: |
|
889 | user: | |
890 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
890 | date: Thu Jan 01 00:00:00 1970 +0000 | |
891 |
|
891 | |||
892 |
|
892 | |||
893 |
|
893 | |||
894 | log -f with null parent |
|
894 | log -f with null parent | |
895 |
|
895 | |||
896 | $ hg up -C null |
|
896 | $ hg up -C null | |
897 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
897 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
898 | $ hg log -f |
|
898 | $ hg log -f | |
899 |
|
899 | |||
900 |
|
900 | |||
901 | log -r . with two parents |
|
901 | log -r . with two parents | |
902 |
|
902 | |||
903 | $ hg up -C 3 |
|
903 | $ hg up -C 3 | |
904 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
904 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
905 | $ hg merge tip |
|
905 | $ hg merge tip | |
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
906 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
907 | (branch merge, don't forget to commit) |
|
907 | (branch merge, don't forget to commit) | |
908 | $ hg log -r . |
|
908 | $ hg log -r . | |
909 | changeset: 3:e62f78d544b4 |
|
909 | changeset: 3:e62f78d544b4 | |
910 | parent: 1:3d5bf5654eda |
|
910 | parent: 1:3d5bf5654eda | |
911 | user: test |
|
911 | user: test | |
912 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
912 | date: Thu Jan 01 00:00:01 1970 +0000 | |
913 | summary: b1 |
|
913 | summary: b1 | |
914 |
|
914 | |||
915 |
|
915 | |||
916 |
|
916 | |||
917 | log -r . with one parent |
|
917 | log -r . with one parent | |
918 |
|
918 | |||
919 | $ hg ci -mm12 -d '1 0' |
|
919 | $ hg ci -mm12 -d '1 0' | |
920 | $ hg log -r . |
|
920 | $ hg log -r . | |
921 | changeset: 5:302e9dd6890d |
|
921 | changeset: 5:302e9dd6890d | |
922 | tag: tip |
|
922 | tag: tip | |
923 | parent: 3:e62f78d544b4 |
|
923 | parent: 3:e62f78d544b4 | |
924 | parent: 4:ddb82e70d1a1 |
|
924 | parent: 4:ddb82e70d1a1 | |
925 | user: test |
|
925 | user: test | |
926 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
926 | date: Thu Jan 01 00:00:01 1970 +0000 | |
927 | summary: m12 |
|
927 | summary: m12 | |
928 |
|
928 | |||
929 |
|
929 | |||
930 | $ echo postm >> b1 |
|
930 | $ echo postm >> b1 | |
931 | $ hg ci -Amb1.1 -d'1 0' |
|
931 | $ hg ci -Amb1.1 -d'1 0' | |
932 |
|
932 | |||
933 |
|
933 | |||
934 | log --follow-first |
|
934 | log --follow-first | |
935 |
|
935 | |||
936 | $ hg log --follow-first |
|
936 | $ hg log --follow-first | |
937 | changeset: 6:2404bbcab562 |
|
937 | changeset: 6:2404bbcab562 | |
938 | tag: tip |
|
938 | tag: tip | |
939 | user: test |
|
939 | user: test | |
940 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
940 | date: Thu Jan 01 00:00:01 1970 +0000 | |
941 | summary: b1.1 |
|
941 | summary: b1.1 | |
942 |
|
942 | |||
943 | changeset: 5:302e9dd6890d |
|
943 | changeset: 5:302e9dd6890d | |
944 | parent: 3:e62f78d544b4 |
|
944 | parent: 3:e62f78d544b4 | |
945 | parent: 4:ddb82e70d1a1 |
|
945 | parent: 4:ddb82e70d1a1 | |
946 | user: test |
|
946 | user: test | |
947 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
947 | date: Thu Jan 01 00:00:01 1970 +0000 | |
948 | summary: m12 |
|
948 | summary: m12 | |
949 |
|
949 | |||
950 | changeset: 3:e62f78d544b4 |
|
950 | changeset: 3:e62f78d544b4 | |
951 | parent: 1:3d5bf5654eda |
|
951 | parent: 1:3d5bf5654eda | |
952 | user: test |
|
952 | user: test | |
953 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
953 | date: Thu Jan 01 00:00:01 1970 +0000 | |
954 | summary: b1 |
|
954 | summary: b1 | |
955 |
|
955 | |||
956 | changeset: 1:3d5bf5654eda |
|
956 | changeset: 1:3d5bf5654eda | |
957 | user: test |
|
957 | user: test | |
958 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
958 | date: Thu Jan 01 00:00:01 1970 +0000 | |
959 | summary: r1 |
|
959 | summary: r1 | |
960 |
|
960 | |||
961 | changeset: 0:67e992f2c4f3 |
|
961 | changeset: 0:67e992f2c4f3 | |
962 | user: test |
|
962 | user: test | |
963 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
963 | date: Thu Jan 01 00:00:01 1970 +0000 | |
964 | summary: base |
|
964 | summary: base | |
965 |
|
965 | |||
966 |
|
966 | |||
967 |
|
967 | |||
968 | log -P 2 |
|
968 | log -P 2 | |
969 |
|
969 | |||
970 | $ hg log -P 2 |
|
970 | $ hg log -P 2 | |
971 | changeset: 6:2404bbcab562 |
|
971 | changeset: 6:2404bbcab562 | |
972 | tag: tip |
|
972 | tag: tip | |
973 | user: test |
|
973 | user: test | |
974 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
974 | date: Thu Jan 01 00:00:01 1970 +0000 | |
975 | summary: b1.1 |
|
975 | summary: b1.1 | |
976 |
|
976 | |||
977 | changeset: 5:302e9dd6890d |
|
977 | changeset: 5:302e9dd6890d | |
978 | parent: 3:e62f78d544b4 |
|
978 | parent: 3:e62f78d544b4 | |
979 | parent: 4:ddb82e70d1a1 |
|
979 | parent: 4:ddb82e70d1a1 | |
980 | user: test |
|
980 | user: test | |
981 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
981 | date: Thu Jan 01 00:00:01 1970 +0000 | |
982 | summary: m12 |
|
982 | summary: m12 | |
983 |
|
983 | |||
984 | changeset: 4:ddb82e70d1a1 |
|
984 | changeset: 4:ddb82e70d1a1 | |
985 | parent: 0:67e992f2c4f3 |
|
985 | parent: 0:67e992f2c4f3 | |
986 | user: test |
|
986 | user: test | |
987 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
987 | date: Thu Jan 01 00:00:01 1970 +0000 | |
988 | summary: b2 |
|
988 | summary: b2 | |
989 |
|
989 | |||
990 | changeset: 3:e62f78d544b4 |
|
990 | changeset: 3:e62f78d544b4 | |
991 | parent: 1:3d5bf5654eda |
|
991 | parent: 1:3d5bf5654eda | |
992 | user: test |
|
992 | user: test | |
993 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
993 | date: Thu Jan 01 00:00:01 1970 +0000 | |
994 | summary: b1 |
|
994 | summary: b1 | |
995 |
|
995 | |||
996 |
|
996 | |||
997 |
|
997 | |||
998 | log -r tip -p --git |
|
998 | log -r tip -p --git | |
999 |
|
999 | |||
1000 | $ hg log -r tip -p --git |
|
1000 | $ hg log -r tip -p --git | |
1001 | changeset: 6:2404bbcab562 |
|
1001 | changeset: 6:2404bbcab562 | |
1002 | tag: tip |
|
1002 | tag: tip | |
1003 | user: test |
|
1003 | user: test | |
1004 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1004 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1005 | summary: b1.1 |
|
1005 | summary: b1.1 | |
1006 |
|
1006 | |||
1007 | diff --git a/b1 b/b1 |
|
1007 | diff --git a/b1 b/b1 | |
1008 | --- a/b1 |
|
1008 | --- a/b1 | |
1009 | +++ b/b1 |
|
1009 | +++ b/b1 | |
1010 | @@ -1,1 +1,2 @@ |
|
1010 | @@ -1,1 +1,2 @@ | |
1011 | b1 |
|
1011 | b1 | |
1012 | +postm |
|
1012 | +postm | |
1013 |
|
1013 | |||
1014 |
|
1014 | |||
1015 |
|
1015 | |||
1016 | log -r "" |
|
1016 | log -r "" | |
1017 |
|
1017 | |||
1018 | $ hg log -r '' |
|
1018 | $ hg log -r '' | |
1019 | hg: parse error: empty query |
|
1019 | hg: parse error: empty query | |
1020 | [255] |
|
1020 | [255] | |
1021 |
|
1021 | |||
1022 | log -r <some unknown node id> |
|
1022 | log -r <some unknown node id> | |
1023 |
|
1023 | |||
1024 | $ hg log -r 1000000000000000000000000000000000000000 |
|
1024 | $ hg log -r 1000000000000000000000000000000000000000 | |
1025 | abort: unknown revision '1000000000000000000000000000000000000000'! |
|
1025 | abort: unknown revision '1000000000000000000000000000000000000000'! | |
1026 | [255] |
|
1026 | [255] | |
1027 |
|
1027 | |||
1028 | log -k r1 |
|
1028 | log -k r1 | |
1029 |
|
1029 | |||
1030 | $ hg log -k r1 |
|
1030 | $ hg log -k r1 | |
1031 | changeset: 1:3d5bf5654eda |
|
1031 | changeset: 1:3d5bf5654eda | |
1032 | user: test |
|
1032 | user: test | |
1033 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1033 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1034 | summary: r1 |
|
1034 | summary: r1 | |
1035 |
|
1035 | |||
1036 | log -p -l2 --color=always |
|
1036 | log -p -l2 --color=always | |
1037 |
|
1037 | |||
1038 | $ hg --config extensions.color= --config color.mode=ansi \ |
|
1038 | $ hg --config extensions.color= --config color.mode=ansi \ | |
1039 | > log -p -l2 --color=always |
|
1039 | > log -p -l2 --color=always | |
1040 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) |
|
1040 | \x1b[0;33mchangeset: 6:2404bbcab562\x1b[0m (esc) | |
1041 | tag: tip |
|
1041 | tag: tip | |
1042 | user: test |
|
1042 | user: test | |
1043 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1043 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1044 | summary: b1.1 |
|
1044 | summary: b1.1 | |
1045 |
|
1045 | |||
1046 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) |
|
1046 | \x1b[0;1mdiff -r 302e9dd6890d -r 2404bbcab562 b1\x1b[0m (esc) | |
1047 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1047 | \x1b[0;31;1m--- a/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1048 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1048 | \x1b[0;32;1m+++ b/b1 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1049 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
1049 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | |
1050 | b1 |
|
1050 | b1 | |
1051 | \x1b[0;32m+postm\x1b[0m (esc) |
|
1051 | \x1b[0;32m+postm\x1b[0m (esc) | |
1052 |
|
1052 | |||
1053 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) |
|
1053 | \x1b[0;33mchangeset: 5:302e9dd6890d\x1b[0m (esc) | |
1054 | parent: 3:e62f78d544b4 |
|
1054 | parent: 3:e62f78d544b4 | |
1055 | parent: 4:ddb82e70d1a1 |
|
1055 | parent: 4:ddb82e70d1a1 | |
1056 | user: test |
|
1056 | user: test | |
1057 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1057 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1058 | summary: m12 |
|
1058 | summary: m12 | |
1059 |
|
1059 | |||
1060 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) |
|
1060 | \x1b[0;1mdiff -r e62f78d544b4 -r 302e9dd6890d b2\x1b[0m (esc) | |
1061 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) |
|
1061 | \x1b[0;31;1m--- /dev/null Thu Jan 01 00:00:00 1970 +0000\x1b[0m (esc) | |
1062 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) |
|
1062 | \x1b[0;32;1m+++ b/b2 Thu Jan 01 00:00:01 1970 +0000\x1b[0m (esc) | |
1063 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) |
|
1063 | \x1b[0;35m@@ -0,0 +1,1 @@\x1b[0m (esc) | |
1064 | \x1b[0;32m+b2\x1b[0m (esc) |
|
1064 | \x1b[0;32m+b2\x1b[0m (esc) | |
1065 |
|
1065 | |||
1066 |
|
1066 | |||
1067 |
|
1067 | |||
1068 | log -r tip --stat |
|
1068 | log -r tip --stat | |
1069 |
|
1069 | |||
1070 | $ hg log -r tip --stat |
|
1070 | $ hg log -r tip --stat | |
1071 | changeset: 6:2404bbcab562 |
|
1071 | changeset: 6:2404bbcab562 | |
1072 | tag: tip |
|
1072 | tag: tip | |
1073 | user: test |
|
1073 | user: test | |
1074 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
1074 | date: Thu Jan 01 00:00:01 1970 +0000 | |
1075 | summary: b1.1 |
|
1075 | summary: b1.1 | |
1076 |
|
1076 | |||
1077 | b1 | 1 + |
|
1077 | b1 | 1 + | |
1078 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
1078 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
1079 |
|
1079 | |||
1080 |
|
1080 | |||
1081 | $ cd .. |
|
1081 | $ cd .. | |
1082 |
|
1082 | |||
1083 | log --follow --patch FILE in repository where linkrev isn't trustworthy |
|
1083 | log --follow --patch FILE in repository where linkrev isn't trustworthy | |
1084 | (issue5376, issue6124) |
|
1084 | (issue5376, issue6124) | |
1085 |
|
1085 | |||
1086 | $ hg init follow-dup |
|
1086 | $ hg init follow-dup | |
1087 | $ cd follow-dup |
|
1087 | $ cd follow-dup | |
1088 | $ cat <<EOF >> .hg/hgrc |
|
1088 | $ cat <<EOF >> .hg/hgrc | |
1089 | > [ui] |
|
1089 | > [ui] | |
1090 | > logtemplate = '=== {rev}: {desc}\n' |
|
1090 | > logtemplate = '=== {rev}: {desc}\n' | |
1091 | > [diff] |
|
1091 | > [diff] | |
1092 | > nodates = True |
|
1092 | > nodates = True | |
1093 | > EOF |
|
1093 | > EOF | |
1094 | $ echo 0 >> a |
|
1094 | $ echo 0 >> a | |
1095 | $ hg ci -qAm 'a0' |
|
1095 | $ hg ci -qAm 'a0' | |
1096 | $ echo 1 >> a |
|
1096 | $ echo 1 >> a | |
1097 | $ hg ci -m 'a1' |
|
1097 | $ hg ci -m 'a1' | |
1098 | $ hg up -q 0 |
|
1098 | $ hg up -q 0 | |
1099 | $ echo 1 >> a |
|
1099 | $ echo 1 >> a | |
1100 | $ touch b |
|
1100 | $ touch b | |
1101 | $ hg ci -qAm 'a1 with b' |
|
1101 | $ hg ci -qAm 'a1 with b' | |
1102 | $ echo 3 >> a |
|
1102 | $ echo 3 >> a | |
1103 | $ hg ci -m 'a3' |
|
1103 | $ hg ci -m 'a3' | |
1104 |
|
1104 | |||
1105 | fctx.rev() == 2, but fctx.linkrev() == 1 |
|
1105 | fctx.rev() == 2, but fctx.linkrev() == 1 | |
1106 |
|
1106 | |||
1107 | $ hg log -pf a |
|
1107 | $ hg log -pf a | |
1108 | === 3: a3 |
|
1108 | === 3: a3 | |
1109 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
1109 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
1110 | --- a/a |
|
1110 | --- a/a | |
1111 | +++ b/a |
|
1111 | +++ b/a | |
1112 | @@ -1,2 +1,3 @@ |
|
1112 | @@ -1,2 +1,3 @@ | |
1113 | 0 |
|
1113 | 0 | |
1114 | 1 |
|
1114 | 1 | |
1115 | +3 |
|
1115 | +3 | |
1116 |
|
1116 | |||
1117 | === 2: a1 with b |
|
1117 | === 2: a1 with b | |
1118 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1118 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1119 | --- a/a |
|
1119 | --- a/a | |
1120 | +++ b/a |
|
1120 | +++ b/a | |
1121 | @@ -1,1 +1,2 @@ |
|
1121 | @@ -1,1 +1,2 @@ | |
1122 | 0 |
|
1122 | 0 | |
1123 | +1 |
|
1123 | +1 | |
1124 |
|
1124 | |||
1125 | === 0: a0 |
|
1125 | === 0: a0 | |
1126 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1126 | diff -r 000000000000 -r 49b5e81287e2 a | |
1127 | --- /dev/null |
|
1127 | --- /dev/null | |
1128 | +++ b/a |
|
1128 | +++ b/a | |
1129 | @@ -0,0 +1,1 @@ |
|
1129 | @@ -0,0 +1,1 @@ | |
1130 | +0 |
|
1130 | +0 | |
1131 |
|
1131 | |||
1132 | $ hg log -pr . a |
|
1132 | $ hg log -pr . a | |
1133 | === 3: a3 |
|
1133 | === 3: a3 | |
1134 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a |
|
1134 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
1135 | --- a/a |
|
1135 | --- a/a | |
1136 | +++ b/a |
|
1136 | +++ b/a | |
1137 | @@ -1,2 +1,3 @@ |
|
1137 | @@ -1,2 +1,3 @@ | |
1138 | 0 |
|
1138 | 0 | |
1139 | 1 |
|
1139 | 1 | |
1140 | +3 |
|
1140 | +3 | |
1141 |
|
1141 | |||
1142 |
|
1142 | |||
1143 | fctx.introrev() == 2, but fctx.linkrev() == 1 |
|
1143 | fctx.introrev() == 2, but fctx.linkrev() == 1 | |
1144 |
|
1144 | |||
1145 | $ hg up -q 2 |
|
1145 | $ hg up -q 2 | |
1146 | $ hg log -pf a |
|
1146 | $ hg log -pf a | |
1147 | === 2: a1 with b |
|
1147 | === 2: a1 with b | |
1148 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a |
|
1148 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
1149 | --- a/a |
|
1149 | --- a/a | |
1150 | +++ b/a |
|
1150 | +++ b/a | |
1151 | @@ -1,1 +1,2 @@ |
|
1151 | @@ -1,1 +1,2 @@ | |
1152 | 0 |
|
1152 | 0 | |
1153 | +1 |
|
1153 | +1 | |
1154 |
|
1154 | |||
1155 | === 0: a0 |
|
1155 | === 0: a0 | |
1156 | diff -r 000000000000 -r 49b5e81287e2 a |
|
1156 | diff -r 000000000000 -r 49b5e81287e2 a | |
1157 | --- /dev/null |
|
1157 | --- /dev/null | |
1158 | +++ b/a |
|
1158 | +++ b/a | |
1159 | @@ -0,0 +1,1 @@ |
|
1159 | @@ -0,0 +1,1 @@ | |
1160 | +0 |
|
1160 | +0 | |
1161 |
|
1161 | |||
1162 |
|
1162 | |||
1163 | BROKEN: should show the same diff as for rev 2 above |
|
1163 | BROKEN: should show the same diff as for rev 2 above | |
1164 | $ hg log -pr . a |
|
1164 | $ hg log -pr . a | |
1165 |
|
1165 | |||
1166 | $ cd .. |
|
1166 | $ cd .. | |
1167 |
|
1167 | |||
1168 | Multiple copy sources of a file: |
|
1168 | Multiple copy sources of a file: | |
1169 |
|
1169 | |||
1170 | $ hg init follow-multi |
|
1170 | $ hg init follow-multi | |
1171 | $ cd follow-multi |
|
1171 | $ cd follow-multi | |
1172 | $ echo 0 >> a |
|
1172 | $ echo 0 >> a | |
1173 | $ hg ci -qAm 'a' |
|
1173 | $ hg ci -qAm 'a' | |
1174 | $ hg cp a b |
|
1174 | $ hg cp a b | |
1175 | $ hg ci -m 'a->b' |
|
1175 | $ hg ci -m 'a->b' | |
1176 | $ echo 2 >> a |
|
1176 | $ echo 2 >> a | |
1177 | $ hg ci -m 'a' |
|
1177 | $ hg ci -m 'a' | |
1178 | $ echo 3 >> b |
|
1178 | $ echo 3 >> b | |
1179 | $ hg ci -m 'b' |
|
1179 | $ hg ci -m 'b' | |
1180 | $ echo 4 >> a |
|
1180 | $ echo 4 >> a | |
1181 | $ echo 4 >> b |
|
1181 | $ echo 4 >> b | |
1182 | $ hg ci -m 'a,b' |
|
1182 | $ hg ci -m 'a,b' | |
1183 | $ echo 5 >> a |
|
1183 | $ echo 5 >> a | |
1184 | $ hg ci -m 'a0' |
|
1184 | $ hg ci -m 'a0' | |
1185 | $ echo 6 >> b |
|
1185 | $ echo 6 >> b | |
1186 | $ hg ci -m 'b0' |
|
1186 | $ hg ci -m 'b0' | |
1187 | $ hg up -q 4 |
|
1187 | $ hg up -q 4 | |
1188 | $ echo 7 >> b |
|
1188 | $ echo 7 >> b | |
1189 | $ hg ci -m 'b1' |
|
1189 | $ hg ci -m 'b1' | |
1190 | created new head |
|
1190 | created new head | |
1191 | $ echo 8 >> a |
|
1191 | $ echo 8 >> a | |
1192 | $ hg ci -m 'a1' |
|
1192 | $ hg ci -m 'a1' | |
1193 | $ hg rm a |
|
1193 | $ hg rm a | |
1194 | $ hg mv b a |
|
1194 | $ hg mv b a | |
1195 | $ hg ci -m 'b1->a1' |
|
1195 | $ hg ci -m 'b1->a1' | |
1196 | $ hg merge -qt :local |
|
1196 | $ hg merge -qt :local | |
1197 | $ hg ci -m '(a0,b1->a1)->a' |
|
1197 | $ hg ci -m '(a0,b1->a1)->a' | |
1198 |
|
1198 | |||
1199 | $ hg log -GT '{rev}: {desc}\n' |
|
1199 | $ hg log -GT '{rev}: {desc}\n' | |
1200 | @ 10: (a0,b1->a1)->a |
|
1200 | @ 10: (a0,b1->a1)->a | |
1201 | |\ |
|
1201 | |\ | |
1202 | | o 9: b1->a1 |
|
1202 | | o 9: b1->a1 | |
1203 | | | |
|
1203 | | | | |
1204 | | o 8: a1 |
|
1204 | | o 8: a1 | |
1205 | | | |
|
1205 | | | | |
1206 | | o 7: b1 |
|
1206 | | o 7: b1 | |
1207 | | | |
|
1207 | | | | |
1208 | o | 6: b0 |
|
1208 | o | 6: b0 | |
1209 | | | |
|
1209 | | | | |
1210 | o | 5: a0 |
|
1210 | o | 5: a0 | |
1211 | |/ |
|
1211 | |/ | |
1212 | o 4: a,b |
|
1212 | o 4: a,b | |
1213 | | |
|
1213 | | | |
1214 | o 3: b |
|
1214 | o 3: b | |
1215 | | |
|
1215 | | | |
1216 | o 2: a |
|
1216 | o 2: a | |
1217 | | |
|
1217 | | | |
1218 | o 1: a->b |
|
1218 | o 1: a->b | |
1219 | | |
|
1219 | | | |
1220 | o 0: a |
|
1220 | o 0: a | |
1221 |
|
1221 | |||
1222 |
|
1222 | |||
1223 | since file 'a' has multiple copy sources at the revision 4, ancestors can't |
|
1223 | since file 'a' has multiple copy sources at the revision 4, ancestors can't | |
1224 | be indexed solely by fctx.linkrev(). |
|
1224 | be indexed solely by fctx.linkrev(). | |
1225 |
|
1225 | |||
1226 | $ hg log -T '{rev}: {desc}\n' -f a |
|
1226 | $ hg log -T '{rev}: {desc}\n' -f a | |
1227 | 10: (a0,b1->a1)->a |
|
1227 | 10: (a0,b1->a1)->a | |
1228 | 9: b1->a1 |
|
1228 | 9: b1->a1 | |
1229 | 7: b1 |
|
1229 | 7: b1 | |
1230 | 5: a0 |
|
1230 | 5: a0 | |
1231 | 4: a,b |
|
1231 | 4: a,b | |
1232 | 3: b |
|
1232 | 3: b | |
1233 | 2: a |
|
1233 | 2: a | |
1234 | 1: a->b |
|
1234 | 1: a->b | |
1235 | 0: a |
|
1235 | 0: a | |
1236 |
|
1236 | |||
1237 | $ cd .. |
|
1237 | $ cd .. | |
1238 |
|
1238 | |||
1239 | Test that log should respect the order of -rREV even if multiple OR conditions |
|
1239 | Test that log should respect the order of -rREV even if multiple OR conditions | |
1240 | are specified (issue5100): |
|
1240 | are specified (issue5100): | |
1241 |
|
1241 | |||
1242 | $ hg init revorder |
|
1242 | $ hg init revorder | |
1243 | $ cd revorder |
|
1243 | $ cd revorder | |
1244 |
|
1244 | |||
1245 | $ hg branch -q b0 |
|
1245 | $ hg branch -q b0 | |
1246 | $ echo 0 >> f0 |
|
1246 | $ echo 0 >> f0 | |
1247 | $ hg ci -qAm k0 -u u0 |
|
1247 | $ hg ci -qAm k0 -u u0 | |
1248 | $ hg branch -q b1 |
|
1248 | $ hg branch -q b1 | |
1249 | $ echo 1 >> f1 |
|
1249 | $ echo 1 >> f1 | |
1250 | $ hg ci -qAm k1 -u u1 |
|
1250 | $ hg ci -qAm k1 -u u1 | |
1251 | $ hg branch -q b2 |
|
1251 | $ hg branch -q b2 | |
1252 | $ echo 2 >> f2 |
|
1252 | $ echo 2 >> f2 | |
1253 | $ hg ci -qAm k2 -u u2 |
|
1253 | $ hg ci -qAm k2 -u u2 | |
1254 |
|
1254 | |||
1255 | $ hg update -q b2 |
|
1255 | $ hg update -q b2 | |
1256 | $ echo 3 >> f2 |
|
1256 | $ echo 3 >> f2 | |
1257 | $ hg ci -qAm k2 -u u2 |
|
1257 | $ hg ci -qAm k2 -u u2 | |
1258 | $ hg update -q b1 |
|
1258 | $ hg update -q b1 | |
1259 | $ echo 4 >> f1 |
|
1259 | $ echo 4 >> f1 | |
1260 | $ hg ci -qAm k1 -u u1 |
|
1260 | $ hg ci -qAm k1 -u u1 | |
1261 | $ hg update -q b0 |
|
1261 | $ hg update -q b0 | |
1262 | $ echo 5 >> f0 |
|
1262 | $ echo 5 >> f0 | |
1263 | $ hg ci -qAm k0 -u u0 |
|
1263 | $ hg ci -qAm k0 -u u0 | |
1264 |
|
1264 | |||
1265 | summary of revisions: |
|
1265 | summary of revisions: | |
1266 |
|
1266 | |||
1267 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' |
|
1267 | $ hg log -G -T '{rev} {branch} {author} {desc} {files}\n' | |
1268 | @ 5 b0 u0 k0 f0 |
|
1268 | @ 5 b0 u0 k0 f0 | |
1269 | | |
|
1269 | | | |
1270 | | o 4 b1 u1 k1 f1 |
|
1270 | | o 4 b1 u1 k1 f1 | |
1271 | | | |
|
1271 | | | | |
1272 | | | o 3 b2 u2 k2 f2 |
|
1272 | | | o 3 b2 u2 k2 f2 | |
1273 | | | | |
|
1273 | | | | | |
1274 | | | o 2 b2 u2 k2 f2 |
|
1274 | | | o 2 b2 u2 k2 f2 | |
1275 | | |/ |
|
1275 | | |/ | |
1276 | | o 1 b1 u1 k1 f1 |
|
1276 | | o 1 b1 u1 k1 f1 | |
1277 | |/ |
|
1277 | |/ | |
1278 | o 0 b0 u0 k0 f0 |
|
1278 | o 0 b0 u0 k0 f0 | |
1279 |
|
1279 | |||
1280 |
|
1280 | |||
1281 | log -b BRANCH in ascending order: |
|
1281 | log -b BRANCH in ascending order: | |
1282 |
|
1282 | |||
1283 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 |
|
1283 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b0 -b b1 | |
1284 | 0 b0 |
|
1284 | 0 b0 | |
1285 | 1 b1 |
|
1285 | 1 b1 | |
1286 | 4 b1 |
|
1286 | 4 b1 | |
1287 | 5 b0 |
|
1287 | 5 b0 | |
1288 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 |
|
1288 | $ hg log -r0:tip -T '{rev} {branch}\n' -b b1 -b b0 | |
1289 | 0 b0 |
|
1289 | 0 b0 | |
1290 | 1 b1 |
|
1290 | 1 b1 | |
1291 | 4 b1 |
|
1291 | 4 b1 | |
1292 | 5 b0 |
|
1292 | 5 b0 | |
1293 |
|
1293 | |||
1294 | log --only-branch BRANCH in descending order: |
|
1294 | log --only-branch BRANCH in descending order: | |
1295 |
|
1295 | |||
1296 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 |
|
1296 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b1 --only-branch b2 | |
1297 | 4 b1 |
|
1297 | 4 b1 | |
1298 | 3 b2 |
|
1298 | 3 b2 | |
1299 | 2 b2 |
|
1299 | 2 b2 | |
1300 | 1 b1 |
|
1300 | 1 b1 | |
1301 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 |
|
1301 | $ hg log -rtip:0 -T '{rev} {branch}\n' --only-branch b2 --only-branch b1 | |
1302 | 4 b1 |
|
1302 | 4 b1 | |
1303 | 3 b2 |
|
1303 | 3 b2 | |
1304 | 2 b2 |
|
1304 | 2 b2 | |
1305 | 1 b1 |
|
1305 | 1 b1 | |
1306 |
|
1306 | |||
1307 | log -u USER in ascending order, against compound set: |
|
1307 | log -u USER in ascending order, against compound set: | |
1308 |
|
1308 | |||
1309 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 |
|
1309 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u0 -u u2 | |
1310 | 0 u0 |
|
1310 | 0 u0 | |
1311 | 2 u2 |
|
1311 | 2 u2 | |
1312 | 3 u2 |
|
1312 | 3 u2 | |
1313 | 5 u0 |
|
1313 | 5 u0 | |
1314 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 |
|
1314 | $ hg log -r'::head()' -T '{rev} {author}\n' -u u2 -u u0 | |
1315 | 0 u0 |
|
1315 | 0 u0 | |
1316 | 2 u2 |
|
1316 | 2 u2 | |
1317 | 3 u2 |
|
1317 | 3 u2 | |
1318 | 5 u0 |
|
1318 | 5 u0 | |
1319 |
|
1319 | |||
1320 | log -k TEXT in descending order, against compound set: |
|
1320 | log -k TEXT in descending order, against compound set: | |
1321 |
|
1321 | |||
1322 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 |
|
1322 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k0 -k k1 -k k2 | |
1323 | 5 k0 |
|
1323 | 5 k0 | |
1324 | 3 k2 |
|
1324 | 3 k2 | |
1325 | 2 k2 |
|
1325 | 2 k2 | |
1326 | 1 k1 |
|
1326 | 1 k1 | |
1327 | 0 k0 |
|
1327 | 0 k0 | |
1328 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 |
|
1328 | $ hg log -r'5 + reverse(::3)' -T '{rev} {desc}\n' -k k2 -k k1 -k k0 | |
1329 | 5 k0 |
|
1329 | 5 k0 | |
1330 | 3 k2 |
|
1330 | 3 k2 | |
1331 | 2 k2 |
|
1331 | 2 k2 | |
1332 | 1 k1 |
|
1332 | 1 k1 | |
1333 | 0 k0 |
|
1333 | 0 k0 | |
1334 |
|
1334 | |||
1335 | log FILE in ascending order, against dagrange: |
|
1335 | log FILE in ascending order, against dagrange: | |
1336 |
|
1336 | |||
1337 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 |
|
1337 | $ hg log -r1:: -T '{rev} {files}\n' f1 f2 | |
1338 | 1 f1 |
|
1338 | 1 f1 | |
1339 | 2 f2 |
|
1339 | 2 f2 | |
1340 | 3 f2 |
|
1340 | 3 f2 | |
1341 | 4 f1 |
|
1341 | 4 f1 | |
1342 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 |
|
1342 | $ hg log -r1:: -T '{rev} {files}\n' f2 f1 | |
1343 | 1 f1 |
|
1343 | 1 f1 | |
1344 | 2 f2 |
|
1344 | 2 f2 | |
1345 | 3 f2 |
|
1345 | 3 f2 | |
1346 | 4 f1 |
|
1346 | 4 f1 | |
1347 |
|
1347 | |||
1348 | $ cd .. |
|
1348 | $ cd .. | |
1349 |
|
1349 | |||
1350 | User |
|
1350 | User | |
1351 |
|
1351 | |||
1352 | $ hg init usertest |
|
1352 | $ hg init usertest | |
1353 | $ cd usertest |
|
1353 | $ cd usertest | |
1354 |
|
1354 | |||
1355 | $ echo a > a |
|
1355 | $ echo a > a | |
1356 | $ hg ci -A -m "a" -u "User One <user1@example.org>" |
|
1356 | $ hg ci -A -m "a" -u "User One <user1@example.org>" | |
1357 | adding a |
|
1357 | adding a | |
1358 | $ echo b > b |
|
1358 | $ echo b > b | |
1359 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" |
|
1359 | $ hg ci -A -m "b" -u "User Two <user2@example.org>" | |
1360 | adding b |
|
1360 | adding b | |
1361 |
|
1361 | |||
1362 | $ hg log -u "User One <user1@example.org>" |
|
1362 | $ hg log -u "User One <user1@example.org>" | |
1363 | changeset: 0:29a4c94f1924 |
|
1363 | changeset: 0:29a4c94f1924 | |
1364 | user: User One <user1@example.org> |
|
1364 | user: User One <user1@example.org> | |
1365 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1365 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1366 | summary: a |
|
1366 | summary: a | |
1367 |
|
1367 | |||
1368 | $ hg log -u "user1" -u "user2" |
|
1368 | $ hg log -u "user1" -u "user2" | |
1369 | changeset: 1:e834b5e69c0e |
|
1369 | changeset: 1:e834b5e69c0e | |
1370 | tag: tip |
|
1370 | tag: tip | |
1371 | user: User Two <user2@example.org> |
|
1371 | user: User Two <user2@example.org> | |
1372 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1372 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1373 | summary: b |
|
1373 | summary: b | |
1374 |
|
1374 | |||
1375 | changeset: 0:29a4c94f1924 |
|
1375 | changeset: 0:29a4c94f1924 | |
1376 | user: User One <user1@example.org> |
|
1376 | user: User One <user1@example.org> | |
1377 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1377 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1378 | summary: a |
|
1378 | summary: a | |
1379 |
|
1379 | |||
1380 | $ hg log -u "user3" |
|
1380 | $ hg log -u "user3" | |
1381 |
|
1381 | |||
1382 | "-u USER" shouldn't be overridden by "user(USER)" alias |
|
1382 | "-u USER" shouldn't be overridden by "user(USER)" alias | |
1383 |
|
1383 | |||
1384 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default |
|
1384 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u default | |
1385 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 |
|
1385 | $ hg log --config 'revsetalias.user(x)=branch(x)' -u user1 | |
1386 | changeset: 0:29a4c94f1924 |
|
1386 | changeset: 0:29a4c94f1924 | |
1387 | user: User One <user1@example.org> |
|
1387 | user: User One <user1@example.org> | |
1388 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1388 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1389 | summary: a |
|
1389 | summary: a | |
1390 |
|
1390 | |||
1391 |
|
1391 | |||
1392 | $ cd .. |
|
1392 | $ cd .. | |
1393 |
|
1393 | |||
1394 | $ hg init branches |
|
1394 | $ hg init branches | |
1395 | $ cd branches |
|
1395 | $ cd branches | |
1396 |
|
1396 | |||
1397 | $ echo a > a |
|
1397 | $ echo a > a | |
1398 | $ hg ci -A -m "commit on default" |
|
1398 | $ hg ci -A -m "commit on default" | |
1399 | adding a |
|
1399 | adding a | |
1400 | $ hg branch test |
|
1400 | $ hg branch test | |
1401 | marked working directory as branch test |
|
1401 | marked working directory as branch test | |
1402 | (branches are permanent and global, did you want a bookmark?) |
|
1402 | (branches are permanent and global, did you want a bookmark?) | |
1403 | $ echo b > b |
|
1403 | $ echo b > b | |
1404 | $ hg ci -A -m "commit on test" |
|
1404 | $ hg ci -A -m "commit on test" | |
1405 | adding b |
|
1405 | adding b | |
1406 |
|
1406 | |||
1407 | $ hg up default |
|
1407 | $ hg up default | |
1408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1408 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1409 | $ echo c > c |
|
1409 | $ echo c > c | |
1410 | $ hg ci -A -m "commit on default" |
|
1410 | $ hg ci -A -m "commit on default" | |
1411 | adding c |
|
1411 | adding c | |
1412 | $ hg up test |
|
1412 | $ hg up test | |
1413 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1413 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1414 | $ echo c > c |
|
1414 | $ echo c > c | |
1415 | $ hg ci -A -m "commit on test" |
|
1415 | $ hg ci -A -m "commit on test" | |
1416 | adding c |
|
1416 | adding c | |
1417 |
|
1417 | |||
1418 |
|
1418 | |||
1419 | log -b default |
|
1419 | log -b default | |
1420 |
|
1420 | |||
1421 | $ hg log -b default |
|
1421 | $ hg log -b default | |
1422 | changeset: 2:c3a4f03cc9a7 |
|
1422 | changeset: 2:c3a4f03cc9a7 | |
1423 | parent: 0:24427303d56f |
|
1423 | parent: 0:24427303d56f | |
1424 | user: test |
|
1424 | user: test | |
1425 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1425 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1426 | summary: commit on default |
|
1426 | summary: commit on default | |
1427 |
|
1427 | |||
1428 | changeset: 0:24427303d56f |
|
1428 | changeset: 0:24427303d56f | |
1429 | user: test |
|
1429 | user: test | |
1430 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1430 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1431 | summary: commit on default |
|
1431 | summary: commit on default | |
1432 |
|
1432 | |||
1433 |
|
1433 | |||
1434 |
|
1434 | |||
1435 | log -b test |
|
1435 | log -b test | |
1436 |
|
1436 | |||
1437 | $ hg log -b test |
|
1437 | $ hg log -b test | |
1438 | changeset: 3:f5d8de11c2e2 |
|
1438 | changeset: 3:f5d8de11c2e2 | |
1439 | branch: test |
|
1439 | branch: test | |
1440 | tag: tip |
|
1440 | tag: tip | |
1441 | parent: 1:d32277701ccb |
|
1441 | parent: 1:d32277701ccb | |
1442 | user: test |
|
1442 | user: test | |
1443 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1443 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1444 | summary: commit on test |
|
1444 | summary: commit on test | |
1445 |
|
1445 | |||
1446 | changeset: 1:d32277701ccb |
|
1446 | changeset: 1:d32277701ccb | |
1447 | branch: test |
|
1447 | branch: test | |
1448 | user: test |
|
1448 | user: test | |
1449 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1449 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1450 | summary: commit on test |
|
1450 | summary: commit on test | |
1451 |
|
1451 | |||
1452 |
|
1452 | |||
1453 |
|
1453 | |||
1454 | log -b dummy |
|
1454 | log -b dummy | |
1455 |
|
1455 | |||
1456 | $ hg log -b dummy |
|
1456 | $ hg log -b dummy | |
1457 | abort: unknown revision 'dummy'! |
|
1457 | abort: unknown revision 'dummy'! | |
1458 | [255] |
|
1458 | [255] | |
1459 |
|
1459 | |||
1460 |
|
1460 | |||
1461 | log -b . |
|
1461 | log -b . | |
1462 |
|
1462 | |||
1463 | $ hg log -b . |
|
1463 | $ hg log -b . | |
1464 | changeset: 3:f5d8de11c2e2 |
|
1464 | changeset: 3:f5d8de11c2e2 | |
1465 | branch: test |
|
1465 | branch: test | |
1466 | tag: tip |
|
1466 | tag: tip | |
1467 | parent: 1:d32277701ccb |
|
1467 | parent: 1:d32277701ccb | |
1468 | user: test |
|
1468 | user: test | |
1469 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1469 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1470 | summary: commit on test |
|
1470 | summary: commit on test | |
1471 |
|
1471 | |||
1472 | changeset: 1:d32277701ccb |
|
1472 | changeset: 1:d32277701ccb | |
1473 | branch: test |
|
1473 | branch: test | |
1474 | user: test |
|
1474 | user: test | |
1475 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1475 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1476 | summary: commit on test |
|
1476 | summary: commit on test | |
1477 |
|
1477 | |||
1478 |
|
1478 | |||
1479 |
|
1479 | |||
1480 | log -b default -b test |
|
1480 | log -b default -b test | |
1481 |
|
1481 | |||
1482 | $ hg log -b default -b test |
|
1482 | $ hg log -b default -b test | |
1483 | changeset: 3:f5d8de11c2e2 |
|
1483 | changeset: 3:f5d8de11c2e2 | |
1484 | branch: test |
|
1484 | branch: test | |
1485 | tag: tip |
|
1485 | tag: tip | |
1486 | parent: 1:d32277701ccb |
|
1486 | parent: 1:d32277701ccb | |
1487 | user: test |
|
1487 | user: test | |
1488 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1488 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1489 | summary: commit on test |
|
1489 | summary: commit on test | |
1490 |
|
1490 | |||
1491 | changeset: 2:c3a4f03cc9a7 |
|
1491 | changeset: 2:c3a4f03cc9a7 | |
1492 | parent: 0:24427303d56f |
|
1492 | parent: 0:24427303d56f | |
1493 | user: test |
|
1493 | user: test | |
1494 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1494 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1495 | summary: commit on default |
|
1495 | summary: commit on default | |
1496 |
|
1496 | |||
1497 | changeset: 1:d32277701ccb |
|
1497 | changeset: 1:d32277701ccb | |
1498 | branch: test |
|
1498 | branch: test | |
1499 | user: test |
|
1499 | user: test | |
1500 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1500 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1501 | summary: commit on test |
|
1501 | summary: commit on test | |
1502 |
|
1502 | |||
1503 | changeset: 0:24427303d56f |
|
1503 | changeset: 0:24427303d56f | |
1504 | user: test |
|
1504 | user: test | |
1505 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1505 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1506 | summary: commit on default |
|
1506 | summary: commit on default | |
1507 |
|
1507 | |||
1508 |
|
1508 | |||
1509 |
|
1509 | |||
1510 | log -b default -b . |
|
1510 | log -b default -b . | |
1511 |
|
1511 | |||
1512 | $ hg log -b default -b . |
|
1512 | $ hg log -b default -b . | |
1513 | changeset: 3:f5d8de11c2e2 |
|
1513 | changeset: 3:f5d8de11c2e2 | |
1514 | branch: test |
|
1514 | branch: test | |
1515 | tag: tip |
|
1515 | tag: tip | |
1516 | parent: 1:d32277701ccb |
|
1516 | parent: 1:d32277701ccb | |
1517 | user: test |
|
1517 | user: test | |
1518 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1518 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1519 | summary: commit on test |
|
1519 | summary: commit on test | |
1520 |
|
1520 | |||
1521 | changeset: 2:c3a4f03cc9a7 |
|
1521 | changeset: 2:c3a4f03cc9a7 | |
1522 | parent: 0:24427303d56f |
|
1522 | parent: 0:24427303d56f | |
1523 | user: test |
|
1523 | user: test | |
1524 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1524 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1525 | summary: commit on default |
|
1525 | summary: commit on default | |
1526 |
|
1526 | |||
1527 | changeset: 1:d32277701ccb |
|
1527 | changeset: 1:d32277701ccb | |
1528 | branch: test |
|
1528 | branch: test | |
1529 | user: test |
|
1529 | user: test | |
1530 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1530 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1531 | summary: commit on test |
|
1531 | summary: commit on test | |
1532 |
|
1532 | |||
1533 | changeset: 0:24427303d56f |
|
1533 | changeset: 0:24427303d56f | |
1534 | user: test |
|
1534 | user: test | |
1535 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1535 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1536 | summary: commit on default |
|
1536 | summary: commit on default | |
1537 |
|
1537 | |||
1538 |
|
1538 | |||
1539 |
|
1539 | |||
1540 | log -b . -b test |
|
1540 | log -b . -b test | |
1541 |
|
1541 | |||
1542 | $ hg log -b . -b test |
|
1542 | $ hg log -b . -b test | |
1543 | changeset: 3:f5d8de11c2e2 |
|
1543 | changeset: 3:f5d8de11c2e2 | |
1544 | branch: test |
|
1544 | branch: test | |
1545 | tag: tip |
|
1545 | tag: tip | |
1546 | parent: 1:d32277701ccb |
|
1546 | parent: 1:d32277701ccb | |
1547 | user: test |
|
1547 | user: test | |
1548 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1548 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1549 | summary: commit on test |
|
1549 | summary: commit on test | |
1550 |
|
1550 | |||
1551 | changeset: 1:d32277701ccb |
|
1551 | changeset: 1:d32277701ccb | |
1552 | branch: test |
|
1552 | branch: test | |
1553 | user: test |
|
1553 | user: test | |
1554 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1554 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1555 | summary: commit on test |
|
1555 | summary: commit on test | |
1556 |
|
1556 | |||
1557 |
|
1557 | |||
1558 |
|
1558 | |||
1559 | log -b 2 |
|
1559 | log -b 2 | |
1560 |
|
1560 | |||
1561 | $ hg log -b 2 |
|
1561 | $ hg log -b 2 | |
1562 | changeset: 2:c3a4f03cc9a7 |
|
1562 | changeset: 2:c3a4f03cc9a7 | |
1563 | parent: 0:24427303d56f |
|
1563 | parent: 0:24427303d56f | |
1564 | user: test |
|
1564 | user: test | |
1565 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1565 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1566 | summary: commit on default |
|
1566 | summary: commit on default | |
1567 |
|
1567 | |||
1568 | changeset: 0:24427303d56f |
|
1568 | changeset: 0:24427303d56f | |
1569 | user: test |
|
1569 | user: test | |
1570 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1570 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1571 | summary: commit on default |
|
1571 | summary: commit on default | |
1572 |
|
1572 | |||
1573 | #if gettext |
|
1573 | #if gettext | |
1574 |
|
1574 | |||
1575 | Test that all log names are translated (e.g. branches, bookmarks, tags): |
|
1575 | Test that all log names are translated (e.g. branches, bookmarks, tags): | |
1576 |
|
1576 | |||
1577 | $ hg bookmark babar -r tip |
|
1577 | $ hg bookmark babar -r tip | |
1578 |
|
1578 | |||
1579 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip |
|
1579 | $ HGENCODING=UTF-8 LANGUAGE=de hg log -r tip | |
1580 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) |
|
1580 | \xc3\x84nderung: 3:f5d8de11c2e2 (esc) | |
1581 | Zweig: test |
|
1581 | Zweig: test | |
1582 | Lesezeichen: babar |
|
1582 | Lesezeichen: babar | |
1583 | Marke: tip |
|
1583 | Marke: tip | |
1584 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) |
|
1584 | Vorg\xc3\xa4nger: 1:d32277701ccb (esc) | |
1585 | Nutzer: test |
|
1585 | Nutzer: test | |
1586 | Datum: Thu Jan 01 00:00:00 1970 +0000 |
|
1586 | Datum: Thu Jan 01 00:00:00 1970 +0000 | |
1587 | Zusammenfassung: commit on test |
|
1587 | Zusammenfassung: commit on test | |
1588 |
|
1588 | |||
1589 | $ hg bookmark -d babar |
|
1589 | $ hg bookmark -d babar | |
1590 |
|
1590 | |||
1591 | #endif |
|
1591 | #endif | |
1592 |
|
1592 | |||
1593 | log -p --cwd dir (in subdir) |
|
1593 | log -p --cwd dir (in subdir) | |
1594 |
|
1594 | |||
1595 | $ mkdir dir |
|
1595 | $ mkdir dir | |
1596 | $ hg log -p --cwd dir |
|
1596 | $ hg log -p --cwd dir | |
1597 | changeset: 3:f5d8de11c2e2 |
|
1597 | changeset: 3:f5d8de11c2e2 | |
1598 | branch: test |
|
1598 | branch: test | |
1599 | tag: tip |
|
1599 | tag: tip | |
1600 | parent: 1:d32277701ccb |
|
1600 | parent: 1:d32277701ccb | |
1601 | user: test |
|
1601 | user: test | |
1602 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1602 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1603 | summary: commit on test |
|
1603 | summary: commit on test | |
1604 |
|
1604 | |||
1605 | diff -r d32277701ccb -r f5d8de11c2e2 c |
|
1605 | diff -r d32277701ccb -r f5d8de11c2e2 c | |
1606 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1606 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1607 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1607 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1608 | @@ -0,0 +1,1 @@ |
|
1608 | @@ -0,0 +1,1 @@ | |
1609 | +c |
|
1609 | +c | |
1610 |
|
1610 | |||
1611 | changeset: 2:c3a4f03cc9a7 |
|
1611 | changeset: 2:c3a4f03cc9a7 | |
1612 | parent: 0:24427303d56f |
|
1612 | parent: 0:24427303d56f | |
1613 | user: test |
|
1613 | user: test | |
1614 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1614 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1615 | summary: commit on default |
|
1615 | summary: commit on default | |
1616 |
|
1616 | |||
1617 | diff -r 24427303d56f -r c3a4f03cc9a7 c |
|
1617 | diff -r 24427303d56f -r c3a4f03cc9a7 c | |
1618 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1618 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1619 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 |
|
1619 | +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
1620 | @@ -0,0 +1,1 @@ |
|
1620 | @@ -0,0 +1,1 @@ | |
1621 | +c |
|
1621 | +c | |
1622 |
|
1622 | |||
1623 | changeset: 1:d32277701ccb |
|
1623 | changeset: 1:d32277701ccb | |
1624 | branch: test |
|
1624 | branch: test | |
1625 | user: test |
|
1625 | user: test | |
1626 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1626 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1627 | summary: commit on test |
|
1627 | summary: commit on test | |
1628 |
|
1628 | |||
1629 | diff -r 24427303d56f -r d32277701ccb b |
|
1629 | diff -r 24427303d56f -r d32277701ccb b | |
1630 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1630 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1631 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1631 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1632 | @@ -0,0 +1,1 @@ |
|
1632 | @@ -0,0 +1,1 @@ | |
1633 | +b |
|
1633 | +b | |
1634 |
|
1634 | |||
1635 | changeset: 0:24427303d56f |
|
1635 | changeset: 0:24427303d56f | |
1636 | user: test |
|
1636 | user: test | |
1637 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1637 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1638 | summary: commit on default |
|
1638 | summary: commit on default | |
1639 |
|
1639 | |||
1640 | diff -r 000000000000 -r 24427303d56f a |
|
1640 | diff -r 000000000000 -r 24427303d56f a | |
1641 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1641 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1642 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1642 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1643 | @@ -0,0 +1,1 @@ |
|
1643 | @@ -0,0 +1,1 @@ | |
1644 | +a |
|
1644 | +a | |
1645 |
|
1645 | |||
1646 |
|
1646 | |||
1647 |
|
1647 | |||
1648 | log -p -R repo |
|
1648 | log -p -R repo | |
1649 |
|
1649 | |||
1650 | $ cd dir |
|
1650 | $ cd dir | |
1651 | $ hg log -p -R .. ../a |
|
1651 | $ hg log -p -R .. ../a | |
1652 | changeset: 0:24427303d56f |
|
1652 | changeset: 0:24427303d56f | |
1653 | user: test |
|
1653 | user: test | |
1654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1655 | summary: commit on default |
|
1655 | summary: commit on default | |
1656 |
|
1656 | |||
1657 | diff -r 000000000000 -r 24427303d56f a |
|
1657 | diff -r 000000000000 -r 24427303d56f a | |
1658 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1658 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1659 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1659 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1660 | @@ -0,0 +1,1 @@ |
|
1660 | @@ -0,0 +1,1 @@ | |
1661 | +a |
|
1661 | +a | |
1662 |
|
1662 | |||
1663 |
|
1663 | |||
1664 | $ cd ../.. |
|
1664 | $ cd ../.. | |
1665 |
|
1665 | |||
1666 | $ hg init follow2 |
|
1666 | $ hg init follow2 | |
1667 | $ cd follow2 |
|
1667 | $ cd follow2 | |
1668 |
|
1668 | |||
1669 | # Build the following history: |
|
1669 | # Build the following history: | |
1670 | # tip - o - x - o - x - x |
|
1670 | # tip - o - x - o - x - x | |
1671 | # \ / |
|
1671 | # \ / | |
1672 | # o - o - o - x |
|
1672 | # o - o - o - x | |
1673 | # \ / |
|
1673 | # \ / | |
1674 | # o |
|
1674 | # o | |
1675 | # |
|
1675 | # | |
1676 | # Where "o" is a revision containing "foo" and |
|
1676 | # Where "o" is a revision containing "foo" and | |
1677 | # "x" is a revision without "foo" |
|
1677 | # "x" is a revision without "foo" | |
1678 |
|
1678 | |||
1679 | $ touch init |
|
1679 | $ touch init | |
1680 | $ hg ci -A -m "init, unrelated" |
|
1680 | $ hg ci -A -m "init, unrelated" | |
1681 | adding init |
|
1681 | adding init | |
1682 | $ echo 'foo' > init |
|
1682 | $ echo 'foo' > init | |
1683 | $ hg ci -m "change, unrelated" |
|
1683 | $ hg ci -m "change, unrelated" | |
1684 | $ echo 'foo' > foo |
|
1684 | $ echo 'foo' > foo | |
1685 | $ hg ci -A -m "add unrelated old foo" |
|
1685 | $ hg ci -A -m "add unrelated old foo" | |
1686 | adding foo |
|
1686 | adding foo | |
1687 | $ hg rm foo |
|
1687 | $ hg rm foo | |
1688 | $ hg ci -m "delete foo, unrelated" |
|
1688 | $ hg ci -m "delete foo, unrelated" | |
1689 | $ echo 'related' > foo |
|
1689 | $ echo 'related' > foo | |
1690 | $ hg ci -A -m "add foo, related" |
|
1690 | $ hg ci -A -m "add foo, related" | |
1691 | adding foo |
|
1691 | adding foo | |
1692 |
|
1692 | |||
1693 | $ hg up 0 |
|
1693 | $ hg up 0 | |
1694 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1694 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1695 | $ touch branch |
|
1695 | $ touch branch | |
1696 | $ hg ci -A -m "first branch, unrelated" |
|
1696 | $ hg ci -A -m "first branch, unrelated" | |
1697 | adding branch |
|
1697 | adding branch | |
1698 | created new head |
|
1698 | created new head | |
1699 | $ touch foo |
|
1699 | $ touch foo | |
1700 | $ hg ci -A -m "create foo, related" |
|
1700 | $ hg ci -A -m "create foo, related" | |
1701 | adding foo |
|
1701 | adding foo | |
1702 | $ echo 'change' > foo |
|
1702 | $ echo 'change' > foo | |
1703 | $ hg ci -m "change foo, related" |
|
1703 | $ hg ci -m "change foo, related" | |
1704 |
|
1704 | |||
1705 | $ hg up 6 |
|
1705 | $ hg up 6 | |
1706 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1706 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1707 | $ echo 'change foo in branch' > foo |
|
1707 | $ echo 'change foo in branch' > foo | |
1708 | $ hg ci -m "change foo in branch, related" |
|
1708 | $ hg ci -m "change foo in branch, related" | |
1709 | created new head |
|
1709 | created new head | |
1710 | $ hg merge 7 |
|
1710 | $ hg merge 7 | |
1711 | merging foo |
|
1711 | merging foo | |
1712 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1712 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1713 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1713 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1714 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1714 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1715 | [1] |
|
1715 | [1] | |
1716 | $ echo 'merge 1' > foo |
|
1716 | $ echo 'merge 1' > foo | |
1717 | $ hg resolve -m foo |
|
1717 | $ hg resolve -m foo | |
1718 | (no more unresolved files) |
|
1718 | (no more unresolved files) | |
1719 | $ hg ci -m "First merge, related" |
|
1719 | $ hg ci -m "First merge, related" | |
1720 |
|
1720 | |||
1721 | $ hg merge 4 |
|
1721 | $ hg merge 4 | |
1722 | merging foo |
|
1722 | merging foo | |
1723 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') |
|
1723 | warning: conflicts while merging foo! (edit, then use 'hg resolve --mark') | |
1724 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
1724 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
1725 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
1725 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
1726 | [1] |
|
1726 | [1] | |
1727 | $ echo 'merge 2' > foo |
|
1727 | $ echo 'merge 2' > foo | |
1728 | $ hg resolve -m foo |
|
1728 | $ hg resolve -m foo | |
1729 | (no more unresolved files) |
|
1729 | (no more unresolved files) | |
1730 | $ hg ci -m "Last merge, related" |
|
1730 | $ hg ci -m "Last merge, related" | |
1731 |
|
1731 | |||
1732 | $ hg log --graph |
|
1732 | $ hg log --graph | |
1733 | @ changeset: 10:4dae8563d2c5 |
|
1733 | @ changeset: 10:4dae8563d2c5 | |
1734 | |\ tag: tip |
|
1734 | |\ tag: tip | |
1735 | | | parent: 9:7b35701b003e |
|
1735 | | | parent: 9:7b35701b003e | |
1736 | | | parent: 4:88176d361b69 |
|
1736 | | | parent: 4:88176d361b69 | |
1737 | | | user: test |
|
1737 | | | user: test | |
1738 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1738 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1739 | | | summary: Last merge, related |
|
1739 | | | summary: Last merge, related | |
1740 | | | |
|
1740 | | | | |
1741 | | o changeset: 9:7b35701b003e |
|
1741 | | o changeset: 9:7b35701b003e | |
1742 | | |\ parent: 8:e5416ad8a855 |
|
1742 | | |\ parent: 8:e5416ad8a855 | |
1743 | | | | parent: 7:87fe3144dcfa |
|
1743 | | | | parent: 7:87fe3144dcfa | |
1744 | | | | user: test |
|
1744 | | | | user: test | |
1745 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1745 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1746 | | | | summary: First merge, related |
|
1746 | | | | summary: First merge, related | |
1747 | | | | |
|
1747 | | | | | |
1748 | | | o changeset: 8:e5416ad8a855 |
|
1748 | | | o changeset: 8:e5416ad8a855 | |
1749 | | | | parent: 6:dc6c325fe5ee |
|
1749 | | | | parent: 6:dc6c325fe5ee | |
1750 | | | | user: test |
|
1750 | | | | user: test | |
1751 | | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1751 | | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1752 | | | | summary: change foo in branch, related |
|
1752 | | | | summary: change foo in branch, related | |
1753 | | | | |
|
1753 | | | | | |
1754 | | o | changeset: 7:87fe3144dcfa |
|
1754 | | o | changeset: 7:87fe3144dcfa | |
1755 | | |/ user: test |
|
1755 | | |/ user: test | |
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1756 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1757 | | | summary: change foo, related |
|
1757 | | | summary: change foo, related | |
1758 | | | |
|
1758 | | | | |
1759 | | o changeset: 6:dc6c325fe5ee |
|
1759 | | o changeset: 6:dc6c325fe5ee | |
1760 | | | user: test |
|
1760 | | | user: test | |
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1761 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1762 | | | summary: create foo, related |
|
1762 | | | summary: create foo, related | |
1763 | | | |
|
1763 | | | | |
1764 | | o changeset: 5:73db34516eb9 |
|
1764 | | o changeset: 5:73db34516eb9 | |
1765 | | | parent: 0:e87515fd044a |
|
1765 | | | parent: 0:e87515fd044a | |
1766 | | | user: test |
|
1766 | | | user: test | |
1767 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1767 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1768 | | | summary: first branch, unrelated |
|
1768 | | | summary: first branch, unrelated | |
1769 | | | |
|
1769 | | | | |
1770 | o | changeset: 4:88176d361b69 |
|
1770 | o | changeset: 4:88176d361b69 | |
1771 | | | user: test |
|
1771 | | | user: test | |
1772 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1772 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1773 | | | summary: add foo, related |
|
1773 | | | summary: add foo, related | |
1774 | | | |
|
1774 | | | | |
1775 | o | changeset: 3:dd78ae4afb56 |
|
1775 | o | changeset: 3:dd78ae4afb56 | |
1776 | | | user: test |
|
1776 | | | user: test | |
1777 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1777 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1778 | | | summary: delete foo, unrelated |
|
1778 | | | summary: delete foo, unrelated | |
1779 | | | |
|
1779 | | | | |
1780 | o | changeset: 2:c4c64aedf0f7 |
|
1780 | o | changeset: 2:c4c64aedf0f7 | |
1781 | | | user: test |
|
1781 | | | user: test | |
1782 | | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1782 | | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1783 | | | summary: add unrelated old foo |
|
1783 | | | summary: add unrelated old foo | |
1784 | | | |
|
1784 | | | | |
1785 | o | changeset: 1:e5faa7440653 |
|
1785 | o | changeset: 1:e5faa7440653 | |
1786 | |/ user: test |
|
1786 | |/ user: test | |
1787 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1787 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
1788 | | summary: change, unrelated |
|
1788 | | summary: change, unrelated | |
1789 | | |
|
1789 | | | |
1790 | o changeset: 0:e87515fd044a |
|
1790 | o changeset: 0:e87515fd044a | |
1791 | user: test |
|
1791 | user: test | |
1792 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1792 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1793 | summary: init, unrelated |
|
1793 | summary: init, unrelated | |
1794 |
|
1794 | |||
1795 |
|
1795 | |||
1796 | $ hg --traceback log -f foo |
|
1796 | $ hg --traceback log -f foo | |
1797 | changeset: 10:4dae8563d2c5 |
|
1797 | changeset: 10:4dae8563d2c5 | |
1798 | tag: tip |
|
1798 | tag: tip | |
1799 | parent: 9:7b35701b003e |
|
1799 | parent: 9:7b35701b003e | |
1800 | parent: 4:88176d361b69 |
|
1800 | parent: 4:88176d361b69 | |
1801 | user: test |
|
1801 | user: test | |
1802 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1802 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1803 | summary: Last merge, related |
|
1803 | summary: Last merge, related | |
1804 |
|
1804 | |||
1805 | changeset: 9:7b35701b003e |
|
1805 | changeset: 9:7b35701b003e | |
1806 | parent: 8:e5416ad8a855 |
|
1806 | parent: 8:e5416ad8a855 | |
1807 | parent: 7:87fe3144dcfa |
|
1807 | parent: 7:87fe3144dcfa | |
1808 | user: test |
|
1808 | user: test | |
1809 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1809 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1810 | summary: First merge, related |
|
1810 | summary: First merge, related | |
1811 |
|
1811 | |||
1812 | changeset: 8:e5416ad8a855 |
|
1812 | changeset: 8:e5416ad8a855 | |
1813 | parent: 6:dc6c325fe5ee |
|
1813 | parent: 6:dc6c325fe5ee | |
1814 | user: test |
|
1814 | user: test | |
1815 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1815 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1816 | summary: change foo in branch, related |
|
1816 | summary: change foo in branch, related | |
1817 |
|
1817 | |||
1818 | changeset: 7:87fe3144dcfa |
|
1818 | changeset: 7:87fe3144dcfa | |
1819 | user: test |
|
1819 | user: test | |
1820 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1820 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1821 | summary: change foo, related |
|
1821 | summary: change foo, related | |
1822 |
|
1822 | |||
1823 | changeset: 6:dc6c325fe5ee |
|
1823 | changeset: 6:dc6c325fe5ee | |
1824 | user: test |
|
1824 | user: test | |
1825 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1825 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1826 | summary: create foo, related |
|
1826 | summary: create foo, related | |
1827 |
|
1827 | |||
1828 | changeset: 4:88176d361b69 |
|
1828 | changeset: 4:88176d361b69 | |
1829 | user: test |
|
1829 | user: test | |
1830 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1830 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1831 | summary: add foo, related |
|
1831 | summary: add foo, related | |
1832 |
|
1832 | |||
1833 |
|
1833 | |||
1834 | Also check when maxrev < lastrevfilelog |
|
1834 | Also check when maxrev < lastrevfilelog | |
1835 |
|
1835 | |||
1836 | $ hg --traceback log -f -r4 foo |
|
1836 | $ hg --traceback log -f -r4 foo | |
1837 | changeset: 4:88176d361b69 |
|
1837 | changeset: 4:88176d361b69 | |
1838 | user: test |
|
1838 | user: test | |
1839 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1839 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1840 | summary: add foo, related |
|
1840 | summary: add foo, related | |
1841 |
|
1841 | |||
1842 | $ cd .. |
|
1842 | $ cd .. | |
1843 |
|
1843 | |||
1844 | Issue2383: hg log showing _less_ differences than hg diff |
|
1844 | Issue2383: hg log showing _less_ differences than hg diff | |
1845 |
|
1845 | |||
1846 | $ hg init issue2383 |
|
1846 | $ hg init issue2383 | |
1847 | $ cd issue2383 |
|
1847 | $ cd issue2383 | |
1848 |
|
1848 | |||
1849 | Create a test repo: |
|
1849 | Create a test repo: | |
1850 |
|
1850 | |||
1851 | $ echo a > a |
|
1851 | $ echo a > a | |
1852 | $ hg ci -Am0 |
|
1852 | $ hg ci -Am0 | |
1853 | adding a |
|
1853 | adding a | |
1854 | $ echo b > b |
|
1854 | $ echo b > b | |
1855 | $ hg ci -Am1 |
|
1855 | $ hg ci -Am1 | |
1856 | adding b |
|
1856 | adding b | |
1857 | $ hg co 0 |
|
1857 | $ hg co 0 | |
1858 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1858 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1859 | $ echo b > a |
|
1859 | $ echo b > a | |
1860 | $ hg ci -m2 |
|
1860 | $ hg ci -m2 | |
1861 | created new head |
|
1861 | created new head | |
1862 |
|
1862 | |||
1863 | Merge: |
|
1863 | Merge: | |
1864 |
|
1864 | |||
1865 | $ hg merge |
|
1865 | $ hg merge | |
1866 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
1866 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1867 | (branch merge, don't forget to commit) |
|
1867 | (branch merge, don't forget to commit) | |
1868 |
|
1868 | |||
1869 | Make sure there's a file listed in the merge to trigger the bug: |
|
1869 | Make sure there's a file listed in the merge to trigger the bug: | |
1870 |
|
1870 | |||
1871 | $ echo c > a |
|
1871 | $ echo c > a | |
1872 | $ hg ci -m3 |
|
1872 | $ hg ci -m3 | |
1873 |
|
1873 | |||
1874 | Two files shown here in diff: |
|
1874 | Two files shown here in diff: | |
1875 |
|
1875 | |||
1876 | $ hg diff --rev 2:3 |
|
1876 | $ hg diff --rev 2:3 | |
1877 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1877 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1878 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1878 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1879 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1879 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1880 | @@ -1,1 +1,1 @@ |
|
1880 | @@ -1,1 +1,1 @@ | |
1881 | -b |
|
1881 | -b | |
1882 | +c |
|
1882 | +c | |
1883 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1883 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1884 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1884 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1885 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1885 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1886 | @@ -0,0 +1,1 @@ |
|
1886 | @@ -0,0 +1,1 @@ | |
1887 | +b |
|
1887 | +b | |
1888 |
|
1888 | |||
1889 | Diff here should be the same: |
|
1889 | Diff here should be the same: | |
1890 |
|
1890 | |||
1891 | $ hg log -vpr 3 |
|
1891 | $ hg log -vpr 3 | |
1892 | changeset: 3:8e07aafe1edc |
|
1892 | changeset: 3:8e07aafe1edc | |
1893 | tag: tip |
|
1893 | tag: tip | |
1894 | parent: 2:b09be438c43a |
|
1894 | parent: 2:b09be438c43a | |
1895 | parent: 1:925d80f479bb |
|
1895 | parent: 1:925d80f479bb | |
1896 | user: test |
|
1896 | user: test | |
1897 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1897 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1898 | files: a |
|
1898 | files: a | |
1899 | description: |
|
1899 | description: | |
1900 | 3 |
|
1900 | 3 | |
1901 |
|
1901 | |||
1902 |
|
1902 | |||
1903 | diff -r b09be438c43a -r 8e07aafe1edc a |
|
1903 | diff -r b09be438c43a -r 8e07aafe1edc a | |
1904 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
1904 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
1905 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
1905 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
1906 | @@ -1,1 +1,1 @@ |
|
1906 | @@ -1,1 +1,1 @@ | |
1907 | -b |
|
1907 | -b | |
1908 | +c |
|
1908 | +c | |
1909 | diff -r b09be438c43a -r 8e07aafe1edc b |
|
1909 | diff -r b09be438c43a -r 8e07aafe1edc b | |
1910 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
1910 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
1911 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
1911 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
1912 | @@ -0,0 +1,1 @@ |
|
1912 | @@ -0,0 +1,1 @@ | |
1913 | +b |
|
1913 | +b | |
1914 |
|
1914 | |||
1915 | $ cd .. |
|
1915 | $ cd .. | |
1916 |
|
1916 | |||
1917 | 'hg log -r rev fn' when last(filelog(fn)) != rev |
|
1917 | 'hg log -r rev fn' when last(filelog(fn)) != rev | |
1918 |
|
1918 | |||
1919 | $ hg init simplelog |
|
1919 | $ hg init simplelog | |
1920 | $ cd simplelog |
|
1920 | $ cd simplelog | |
1921 | $ echo f > a |
|
1921 | $ echo f > a | |
1922 | $ hg ci -Am'a' -d '0 0' |
|
1922 | $ hg ci -Am'a' -d '0 0' | |
1923 | adding a |
|
1923 | adding a | |
1924 | $ echo f >> a |
|
1924 | $ echo f >> a | |
1925 | $ hg ci -Am'a bis' -d '1 0' |
|
1925 | $ hg ci -Am'a bis' -d '1 0' | |
1926 |
|
1926 | |||
1927 | $ hg log -r0 a |
|
1927 | $ hg log -r0 a | |
1928 | changeset: 0:9f758d63dcde |
|
1928 | changeset: 0:9f758d63dcde | |
1929 | user: test |
|
1929 | user: test | |
1930 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
1930 | date: Thu Jan 01 00:00:00 1970 +0000 | |
1931 | summary: a |
|
1931 | summary: a | |
1932 |
|
1932 | |||
1933 | enable obsolete to test hidden feature |
|
1933 | enable obsolete to test hidden feature | |
1934 |
|
1934 | |||
1935 | $ cat >> $HGRCPATH << EOF |
|
1935 | $ cat >> $HGRCPATH << EOF | |
1936 | > [experimental] |
|
1936 | > [experimental] | |
1937 | > evolution.createmarkers=True |
|
1937 | > evolution.createmarkers=True | |
1938 | > EOF |
|
1938 | > EOF | |
1939 |
|
1939 | |||
1940 | $ hg log --template='{rev}:{node}\n' |
|
1940 | $ hg log --template='{rev}:{node}\n' | |
1941 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1941 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1942 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1942 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1943 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f |
|
1943 | $ hg debugobsolete a765632148dc55d38c35c4f247c618701886cb2f | |
1944 | 1 new obsolescence markers |
|
1944 | 1 new obsolescence markers | |
1945 | obsoleted 1 changesets |
|
1945 | obsoleted 1 changesets | |
1946 | $ hg up null -q |
|
1946 | $ hg up null -q | |
1947 | $ hg log --template='{rev}:{node}\n' |
|
1947 | $ hg log --template='{rev}:{node}\n' | |
1948 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1948 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1949 | $ hg log --template='{rev}:{node}\n' --hidden |
|
1949 | $ hg log --template='{rev}:{node}\n' --hidden | |
1950 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1950 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1951 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1951 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1952 | $ hg log -r a |
|
1952 | $ hg log -r a | |
1953 | abort: hidden revision 'a' is pruned! |
|
1953 | abort: hidden revision 'a' is pruned! | |
1954 | (use --hidden to access hidden revisions) |
|
1954 | (use --hidden to access hidden revisions) | |
1955 | [255] |
|
1955 | [255] | |
1956 |
|
1956 | |||
1957 | test that parent prevent a changeset to be hidden |
|
1957 | test that parent prevent a changeset to be hidden | |
1958 |
|
1958 | |||
1959 | $ hg up 1 -q --hidden |
|
1959 | $ hg up 1 -q --hidden | |
1960 | updated to hidden changeset a765632148dc |
|
1960 | updated to hidden changeset a765632148dc | |
1961 | (hidden revision 'a765632148dc' is pruned) |
|
1961 | (hidden revision 'a765632148dc' is pruned) | |
1962 | $ hg log --template='{rev}:{node}\n' |
|
1962 | $ hg log --template='{rev}:{node}\n' | |
1963 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1963 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1964 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1964 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1965 |
|
1965 | |||
1966 | test that second parent prevent a changeset to be hidden too |
|
1966 | test that second parent prevent a changeset to be hidden too | |
1967 |
|
1967 | |||
1968 | $ hg debugsetparents 0 1 # nothing suitable to merge here |
|
1968 | $ hg debugsetparents 0 1 # nothing suitable to merge here | |
1969 | $ hg log --template='{rev}:{node}\n' |
|
1969 | $ hg log --template='{rev}:{node}\n' | |
1970 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1970 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1971 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1971 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1972 | $ hg debugsetparents 1 |
|
1972 | $ hg debugsetparents 1 | |
1973 | $ hg up -q null |
|
1973 | $ hg up -q null | |
1974 |
|
1974 | |||
1975 | bookmarks prevent a changeset being hidden |
|
1975 | bookmarks prevent a changeset being hidden | |
1976 |
|
1976 | |||
1977 | $ hg bookmark --hidden -r 1 X |
|
1977 | $ hg bookmark --hidden -r 1 X | |
1978 | bookmarking hidden changeset a765632148dc |
|
1978 | bookmarking hidden changeset a765632148dc | |
1979 | (hidden revision 'a765632148dc' is pruned) |
|
1979 | (hidden revision 'a765632148dc' is pruned) | |
1980 | $ hg log --template '{rev}:{node}\n' |
|
1980 | $ hg log --template '{rev}:{node}\n' | |
1981 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1981 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1982 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1982 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1983 | $ hg bookmark -d X |
|
1983 | $ hg bookmark -d X | |
1984 |
|
1984 | |||
1985 | divergent bookmarks are not hidden |
|
1985 | divergent bookmarks are not hidden | |
1986 |
|
1986 | |||
1987 | $ hg bookmark --hidden -r 1 X@foo |
|
1987 | $ hg bookmark --hidden -r 1 X@foo | |
1988 | bookmarking hidden changeset a765632148dc |
|
1988 | bookmarking hidden changeset a765632148dc | |
1989 | (hidden revision 'a765632148dc' is pruned) |
|
1989 | (hidden revision 'a765632148dc' is pruned) | |
1990 | $ hg log --template '{rev}:{node}\n' |
|
1990 | $ hg log --template '{rev}:{node}\n' | |
1991 | 1:a765632148dc55d38c35c4f247c618701886cb2f |
|
1991 | 1:a765632148dc55d38c35c4f247c618701886cb2f | |
1992 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1992 | 0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1993 |
|
1993 | |||
1994 | test hidden revision 0 (issue5385) |
|
1994 | test hidden revision 0 (issue5385) | |
1995 |
|
1995 | |||
1996 | $ hg bookmark -d X@foo |
|
1996 | $ hg bookmark -d X@foo | |
1997 | $ hg up null -q |
|
1997 | $ hg up null -q | |
1998 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 |
|
1998 | $ hg debugobsolete 9f758d63dcde62d547ebfb08e1e7ee96535f2b05 | |
1999 | 1 new obsolescence markers |
|
1999 | 1 new obsolescence markers | |
2000 | obsoleted 1 changesets |
|
2000 | obsoleted 1 changesets | |
2001 | $ echo f > b |
|
2001 | $ echo f > b | |
2002 | $ hg ci -Am'b' -d '2 0' |
|
2002 | $ hg ci -Am'b' -d '2 0' | |
2003 | adding b |
|
2003 | adding b | |
2004 | $ echo f >> b |
|
2004 | $ echo f >> b | |
2005 | $ hg ci -m'b bis' -d '3 0' |
|
2005 | $ hg ci -m'b bis' -d '3 0' | |
2006 | $ hg log -T'{rev}:{node}\n' |
|
2006 | $ hg log -T'{rev}:{node}\n' | |
2007 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2007 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2008 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2008 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2009 |
|
2009 | |||
2010 | $ hg log -T'{rev}:{node}\n' -r: |
|
2010 | $ hg log -T'{rev}:{node}\n' -r: | |
2011 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2011 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2012 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2012 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2013 | $ hg log -T'{rev}:{node}\n' -r:tip |
|
2013 | $ hg log -T'{rev}:{node}\n' -r:tip | |
2014 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2014 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2015 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2015 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2016 | $ hg log -T'{rev}:{node}\n' -r:0 |
|
2016 | $ hg log -T'{rev}:{node}\n' -r:0 | |
2017 | abort: hidden revision '0' is pruned! |
|
2017 | abort: hidden revision '0' is pruned! | |
2018 | (use --hidden to access hidden revisions) |
|
2018 | (use --hidden to access hidden revisions) | |
2019 | [255] |
|
2019 | [255] | |
2020 | $ hg log -T'{rev}:{node}\n' -f |
|
2020 | $ hg log -T'{rev}:{node}\n' -f | |
2021 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e |
|
2021 | 3:d7d28b288a6b83d5d2cf49f10c5974deed3a1d2e | |
2022 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 |
|
2022 | 2:94375ec45bddd2a824535fc04855bd058c926ec0 | |
2023 |
|
2023 | |||
2024 | clear extensions configuration |
|
2024 | clear extensions configuration | |
2025 | $ echo '[extensions]' >> $HGRCPATH |
|
2025 | $ echo '[extensions]' >> $HGRCPATH | |
2026 | $ echo "obs=!" >> $HGRCPATH |
|
2026 | $ echo "obs=!" >> $HGRCPATH | |
2027 | $ cd .. |
|
2027 | $ cd .. | |
2028 |
|
2028 | |||
2029 | test -u/-k for problematic encoding |
|
2029 | test -u/-k for problematic encoding | |
2030 | # unicode: cp932: |
|
2030 | # unicode: cp932: | |
2031 | # u30A2 0x83 0x41(= 'A') |
|
2031 | # u30A2 0x83 0x41(= 'A') | |
2032 | # u30C2 0x83 0x61(= 'a') |
|
2032 | # u30C2 0x83 0x61(= 'a') | |
2033 |
|
2033 | |||
2034 | $ hg init problematicencoding |
|
2034 | $ hg init problematicencoding | |
2035 | $ cd problematicencoding |
|
2035 | $ cd problematicencoding | |
2036 |
|
2036 | |||
2037 | >>> with open('setup.sh', 'wb') as f: |
|
2037 | >>> with open('setup.sh', 'wb') as f: | |
2038 | ... f.write(u''' |
|
2038 | ... f.write(u''' | |
2039 | ... echo a > text |
|
2039 | ... echo a > text | |
2040 | ... hg add text |
|
2040 | ... hg add text | |
2041 | ... hg --encoding utf-8 commit -u '\u30A2' -m none |
|
2041 | ... hg --encoding utf-8 commit -u '\u30A2' -m none | |
2042 | ... echo b > text |
|
2042 | ... echo b > text | |
2043 | ... hg --encoding utf-8 commit -u '\u30C2' -m none |
|
2043 | ... hg --encoding utf-8 commit -u '\u30C2' -m none | |
2044 | ... echo c > text |
|
2044 | ... echo c > text | |
2045 | ... hg --encoding utf-8 commit -u none -m '\u30A2' |
|
2045 | ... hg --encoding utf-8 commit -u none -m '\u30A2' | |
2046 | ... echo d > text |
|
2046 | ... echo d > text | |
2047 | ... hg --encoding utf-8 commit -u none -m '\u30C2' |
|
2047 | ... hg --encoding utf-8 commit -u none -m '\u30C2' | |
2048 | ... '''.encode('utf-8')) and None |
|
2048 | ... '''.encode('utf-8')) and None | |
2049 | $ sh < setup.sh |
|
2049 | $ sh < setup.sh | |
2050 |
|
2050 | |||
2051 | test in problematic encoding |
|
2051 | test in problematic encoding | |
2052 | >>> with open('test.sh', 'wb') as f: |
|
2052 | >>> with open('test.sh', 'wb') as f: | |
2053 | ... f.write(u''' |
|
2053 | ... f.write(u''' | |
2054 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' |
|
2054 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2' | |
2055 | ... echo ==== |
|
2055 | ... echo ==== | |
2056 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' |
|
2056 | ... hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2' | |
2057 | ... echo ==== |
|
2057 | ... echo ==== | |
2058 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' |
|
2058 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2' | |
2059 | ... echo ==== |
|
2059 | ... echo ==== | |
2060 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' |
|
2060 | ... hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2' | |
2061 | ... '''.encode('cp932')) and None |
|
2061 | ... '''.encode('cp932')) and None | |
2062 | $ sh < test.sh |
|
2062 | $ sh < test.sh | |
2063 | 0 |
|
2063 | 0 | |
2064 | ==== |
|
2064 | ==== | |
2065 | 1 |
|
2065 | 1 | |
2066 | ==== |
|
2066 | ==== | |
2067 | 2 |
|
2067 | 2 | |
2068 | 0 |
|
2068 | 0 | |
2069 | ==== |
|
2069 | ==== | |
2070 | 3 |
|
2070 | 3 | |
2071 | 1 |
|
2071 | 1 | |
2072 |
|
2072 | |||
2073 | $ cd .. |
|
2073 | $ cd .. | |
2074 |
|
2074 | |||
2075 | test hg log on non-existent files and on directories |
|
2075 | test hg log on non-existent files and on directories | |
2076 | $ hg init issue1340 |
|
2076 | $ hg init issue1340 | |
2077 | $ cd issue1340 |
|
2077 | $ cd issue1340 | |
2078 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 |
|
2078 | $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6 | |
2079 | $ echo 1 > d1/f1 |
|
2079 | $ echo 1 > d1/f1 | |
2080 | $ echo 1 > D2/f1 |
|
2080 | $ echo 1 > D2/f1 | |
2081 | $ echo 1 > D3.i/f1 |
|
2081 | $ echo 1 > D3.i/f1 | |
2082 | $ echo 1 > d4.hg/f1 |
|
2082 | $ echo 1 > d4.hg/f1 | |
2083 | $ echo 1 > d5.d/f1 |
|
2083 | $ echo 1 > d5.d/f1 | |
2084 | $ echo 1 > .d6/f1 |
|
2084 | $ echo 1 > .d6/f1 | |
2085 | $ hg -q add . |
|
2085 | $ hg -q add . | |
2086 | $ hg commit -m "a bunch of weird directories" |
|
2086 | $ hg commit -m "a bunch of weird directories" | |
2087 | $ hg log -l1 d1/f1 | grep changeset |
|
2087 | $ hg log -l1 d1/f1 | grep changeset | |
2088 | changeset: 0:65624cd9070a |
|
2088 | changeset: 0:65624cd9070a | |
2089 | $ hg log -l1 f1 |
|
2089 | $ hg log -l1 f1 | |
2090 | $ hg log -l1 . | grep changeset |
|
2090 | $ hg log -l1 . | grep changeset | |
2091 | changeset: 0:65624cd9070a |
|
2091 | changeset: 0:65624cd9070a | |
2092 | $ hg log -l1 ./ | grep changeset |
|
2092 | $ hg log -l1 ./ | grep changeset | |
2093 | changeset: 0:65624cd9070a |
|
2093 | changeset: 0:65624cd9070a | |
2094 | $ hg log -l1 d1 | grep changeset |
|
2094 | $ hg log -l1 d1 | grep changeset | |
2095 | changeset: 0:65624cd9070a |
|
2095 | changeset: 0:65624cd9070a | |
2096 | $ hg log -l1 D2 | grep changeset |
|
2096 | $ hg log -l1 D2 | grep changeset | |
2097 | changeset: 0:65624cd9070a |
|
2097 | changeset: 0:65624cd9070a | |
2098 | $ hg log -l1 D2/f1 | grep changeset |
|
2098 | $ hg log -l1 D2/f1 | grep changeset | |
2099 | changeset: 0:65624cd9070a |
|
2099 | changeset: 0:65624cd9070a | |
2100 | $ hg log -l1 D3.i | grep changeset |
|
2100 | $ hg log -l1 D3.i | grep changeset | |
2101 | changeset: 0:65624cd9070a |
|
2101 | changeset: 0:65624cd9070a | |
2102 | $ hg log -l1 D3.i/f1 | grep changeset |
|
2102 | $ hg log -l1 D3.i/f1 | grep changeset | |
2103 | changeset: 0:65624cd9070a |
|
2103 | changeset: 0:65624cd9070a | |
2104 | $ hg log -l1 d4.hg | grep changeset |
|
2104 | $ hg log -l1 d4.hg | grep changeset | |
2105 | changeset: 0:65624cd9070a |
|
2105 | changeset: 0:65624cd9070a | |
2106 | $ hg log -l1 d4.hg/f1 | grep changeset |
|
2106 | $ hg log -l1 d4.hg/f1 | grep changeset | |
2107 | changeset: 0:65624cd9070a |
|
2107 | changeset: 0:65624cd9070a | |
2108 | $ hg log -l1 d5.d | grep changeset |
|
2108 | $ hg log -l1 d5.d | grep changeset | |
2109 | changeset: 0:65624cd9070a |
|
2109 | changeset: 0:65624cd9070a | |
2110 | $ hg log -l1 d5.d/f1 | grep changeset |
|
2110 | $ hg log -l1 d5.d/f1 | grep changeset | |
2111 | changeset: 0:65624cd9070a |
|
2111 | changeset: 0:65624cd9070a | |
2112 | $ hg log -l1 .d6 | grep changeset |
|
2112 | $ hg log -l1 .d6 | grep changeset | |
2113 | changeset: 0:65624cd9070a |
|
2113 | changeset: 0:65624cd9070a | |
2114 | $ hg log -l1 .d6/f1 | grep changeset |
|
2114 | $ hg log -l1 .d6/f1 | grep changeset | |
2115 | changeset: 0:65624cd9070a |
|
2115 | changeset: 0:65624cd9070a | |
2116 |
|
2116 | |||
2117 | issue3772: hg log -r :null showing revision 0 as well |
|
2117 | issue3772: hg log -r :null showing revision 0 as well | |
2118 |
|
2118 | |||
2119 | $ hg log -r :null |
|
2119 | $ hg log -r :null | |
2120 | changeset: 0:65624cd9070a |
|
2120 | changeset: 0:65624cd9070a | |
2121 | tag: tip |
|
2121 | tag: tip | |
2122 | user: test |
|
2122 | user: test | |
2123 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2123 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2124 | summary: a bunch of weird directories |
|
2124 | summary: a bunch of weird directories | |
2125 |
|
2125 | |||
2126 | changeset: -1:000000000000 |
|
2126 | changeset: -1:000000000000 | |
2127 | user: |
|
2127 | user: | |
2128 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2128 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2129 |
|
2129 | |||
2130 | $ hg log -r null:null |
|
2130 | $ hg log -r null:null | |
2131 | changeset: -1:000000000000 |
|
2131 | changeset: -1:000000000000 | |
2132 | user: |
|
2132 | user: | |
2133 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2133 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2134 |
|
2134 | |||
2135 | working-directory revision requires special treatment |
|
2135 | working-directory revision requires special treatment | |
2136 |
|
2136 | |||
2137 | clean: |
|
2137 | clean: | |
2138 |
|
2138 | |||
2139 | $ hg log -r 'wdir()' --debug |
|
2139 | $ hg log -r 'wdir()' --debug | |
2140 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2140 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2141 | phase: draft |
|
2141 | phase: draft | |
2142 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2142 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2143 | parent: -1:0000000000000000000000000000000000000000 |
|
2143 | parent: -1:0000000000000000000000000000000000000000 | |
2144 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2144 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2145 | user: test |
|
2145 | user: test | |
2146 | date: [A-Za-z0-9:+ ]+ (re) |
|
2146 | date: [A-Za-z0-9:+ ]+ (re) | |
2147 | extra: branch=default |
|
2147 | extra: branch=default | |
2148 |
|
2148 | |||
2149 | $ hg log -r 'wdir()' -p --stat |
|
2149 | $ hg log -r 'wdir()' -p --stat | |
2150 | changeset: 2147483647:ffffffffffff |
|
2150 | changeset: 2147483647:ffffffffffff | |
2151 | parent: 0:65624cd9070a |
|
2151 | parent: 0:65624cd9070a | |
2152 | user: test |
|
2152 | user: test | |
2153 | date: [A-Za-z0-9:+ ]+ (re) |
|
2153 | date: [A-Za-z0-9:+ ]+ (re) | |
2154 |
|
2154 | |||
2155 |
|
2155 | |||
2156 |
|
2156 | |||
2157 |
|
2157 | |||
2158 | dirty: |
|
2158 | dirty: | |
2159 |
|
2159 | |||
2160 | $ echo 2 >> d1/f1 |
|
2160 | $ echo 2 >> d1/f1 | |
2161 | $ echo 2 > d1/f2 |
|
2161 | $ echo 2 > d1/f2 | |
2162 | $ hg add d1/f2 |
|
2162 | $ hg add d1/f2 | |
2163 | $ hg remove .d6/f1 |
|
2163 | $ hg remove .d6/f1 | |
2164 | $ hg status |
|
2164 | $ hg status | |
2165 | M d1/f1 |
|
2165 | M d1/f1 | |
2166 | A d1/f2 |
|
2166 | A d1/f2 | |
2167 | R .d6/f1 |
|
2167 | R .d6/f1 | |
2168 |
|
2168 | |||
2169 | $ hg log -r 'wdir()' |
|
2169 | $ hg log -r 'wdir()' | |
2170 | changeset: 2147483647:ffffffffffff |
|
2170 | changeset: 2147483647:ffffffffffff | |
2171 | parent: 0:65624cd9070a |
|
2171 | parent: 0:65624cd9070a | |
2172 | user: test |
|
2172 | user: test | |
2173 | date: [A-Za-z0-9:+ ]+ (re) |
|
2173 | date: [A-Za-z0-9:+ ]+ (re) | |
2174 |
|
2174 | |||
2175 | $ hg log -r 'wdir()' -q |
|
2175 | $ hg log -r 'wdir()' -q | |
2176 | 2147483647:ffffffffffff |
|
2176 | 2147483647:ffffffffffff | |
2177 |
|
2177 | |||
2178 | $ hg log -r 'wdir()' --debug |
|
2178 | $ hg log -r 'wdir()' --debug | |
2179 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2179 | changeset: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2180 | phase: draft |
|
2180 | phase: draft | |
2181 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 |
|
2181 | parent: 0:65624cd9070a035fa7191a54f2b8af39f16b0c08 | |
2182 | parent: -1:0000000000000000000000000000000000000000 |
|
2182 | parent: -1:0000000000000000000000000000000000000000 | |
2183 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff |
|
2183 | manifest: 2147483647:ffffffffffffffffffffffffffffffffffffffff | |
2184 | user: test |
|
2184 | user: test | |
2185 | date: [A-Za-z0-9:+ ]+ (re) |
|
2185 | date: [A-Za-z0-9:+ ]+ (re) | |
2186 | files: d1/f1 |
|
2186 | files: d1/f1 | |
2187 | files+: d1/f2 |
|
2187 | files+: d1/f2 | |
2188 | files-: .d6/f1 |
|
2188 | files-: .d6/f1 | |
2189 | extra: branch=default |
|
2189 | extra: branch=default | |
2190 |
|
2190 | |||
2191 | $ hg log -r 'wdir()' -p --stat --git |
|
2191 | $ hg log -r 'wdir()' -p --stat --git | |
2192 | changeset: 2147483647:ffffffffffff |
|
2192 | changeset: 2147483647:ffffffffffff | |
2193 | parent: 0:65624cd9070a |
|
2193 | parent: 0:65624cd9070a | |
2194 | user: test |
|
2194 | user: test | |
2195 | date: [A-Za-z0-9:+ ]+ (re) |
|
2195 | date: [A-Za-z0-9:+ ]+ (re) | |
2196 |
|
2196 | |||
2197 | .d6/f1 | 1 - |
|
2197 | .d6/f1 | 1 - | |
2198 | d1/f1 | 1 + |
|
2198 | d1/f1 | 1 + | |
2199 | d1/f2 | 1 + |
|
2199 | d1/f2 | 1 + | |
2200 | 3 files changed, 2 insertions(+), 1 deletions(-) |
|
2200 | 3 files changed, 2 insertions(+), 1 deletions(-) | |
2201 |
|
2201 | |||
2202 | diff --git a/.d6/f1 b/.d6/f1 |
|
2202 | diff --git a/.d6/f1 b/.d6/f1 | |
2203 | deleted file mode 100644 |
|
2203 | deleted file mode 100644 | |
2204 | --- a/.d6/f1 |
|
2204 | --- a/.d6/f1 | |
2205 | +++ /dev/null |
|
2205 | +++ /dev/null | |
2206 | @@ -1,1 +0,0 @@ |
|
2206 | @@ -1,1 +0,0 @@ | |
2207 | -1 |
|
2207 | -1 | |
2208 | diff --git a/d1/f1 b/d1/f1 |
|
2208 | diff --git a/d1/f1 b/d1/f1 | |
2209 | --- a/d1/f1 |
|
2209 | --- a/d1/f1 | |
2210 | +++ b/d1/f1 |
|
2210 | +++ b/d1/f1 | |
2211 | @@ -1,1 +1,2 @@ |
|
2211 | @@ -1,1 +1,2 @@ | |
2212 | 1 |
|
2212 | 1 | |
2213 | +2 |
|
2213 | +2 | |
2214 | diff --git a/d1/f2 b/d1/f2 |
|
2214 | diff --git a/d1/f2 b/d1/f2 | |
2215 | new file mode 100644 |
|
2215 | new file mode 100644 | |
2216 | --- /dev/null |
|
2216 | --- /dev/null | |
2217 | +++ b/d1/f2 |
|
2217 | +++ b/d1/f2 | |
2218 | @@ -0,0 +1,1 @@ |
|
2218 | @@ -0,0 +1,1 @@ | |
2219 | +2 |
|
2219 | +2 | |
2220 |
|
2220 | |||
2221 | $ hg log -r 'wdir()' -Tjson |
|
2221 | $ hg log -r 'wdir()' -Tjson | |
2222 | [ |
|
2222 | [ | |
2223 | { |
|
2223 | { | |
2224 | "bookmarks": [], |
|
2224 | "bookmarks": [], | |
2225 | "branch": "default", |
|
2225 | "branch": "default", | |
2226 | "date": [*, 0], (glob) |
|
2226 | "date": [*, 0], (glob) | |
2227 | "desc": "", |
|
2227 | "desc": "", | |
2228 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2228 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2229 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2229 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], | |
2230 | "phase": "draft", |
|
2230 | "phase": "draft", | |
2231 | "rev": 2147483647, |
|
2231 | "rev": 2147483647, | |
2232 | "tags": [], |
|
2232 | "tags": [], | |
2233 | "user": "test" |
|
2233 | "user": "test" | |
2234 | } |
|
2234 | } | |
2235 | ] |
|
2235 | ] | |
2236 |
|
2236 | |||
2237 | $ hg log -r 'wdir()' -Tjson -q |
|
2237 | $ hg log -r 'wdir()' -Tjson -q | |
2238 | [ |
|
2238 | [ | |
2239 | { |
|
2239 | { | |
2240 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2240 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2241 | "rev": 2147483647 |
|
2241 | "rev": 2147483647 | |
2242 | } |
|
2242 | } | |
2243 | ] |
|
2243 | ] | |
2244 |
|
2244 | |||
2245 | $ hg log -r 'wdir()' -Tjson --debug |
|
2245 | $ hg log -r 'wdir()' -Tjson --debug | |
2246 | [ |
|
2246 | [ | |
2247 | { |
|
2247 | { | |
2248 | "added": ["d1/f2"], |
|
2248 | "added": ["d1/f2"], | |
2249 | "bookmarks": [], |
|
2249 | "bookmarks": [], | |
2250 | "branch": "default", |
|
2250 | "branch": "default", | |
2251 | "date": [*, 0], (glob) |
|
2251 | "date": [*, 0], (glob) | |
2252 | "desc": "", |
|
2252 | "desc": "", | |
2253 | "extra": {"branch": "default"}, |
|
2253 | "extra": {"branch": "default"}, | |
2254 | "manifest": "ffffffffffffffffffffffffffffffffffffffff", |
|
2254 | "manifest": "ffffffffffffffffffffffffffffffffffffffff", | |
2255 | "modified": ["d1/f1"], |
|
2255 | "modified": ["d1/f1"], | |
2256 | "node": "ffffffffffffffffffffffffffffffffffffffff", |
|
2256 | "node": "ffffffffffffffffffffffffffffffffffffffff", | |
2257 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], |
|
2257 | "parents": ["65624cd9070a035fa7191a54f2b8af39f16b0c08"], | |
2258 | "phase": "draft", |
|
2258 | "phase": "draft", | |
2259 | "removed": [".d6/f1"], |
|
2259 | "removed": [".d6/f1"], | |
2260 | "rev": 2147483647, |
|
2260 | "rev": 2147483647, | |
2261 | "tags": [], |
|
2261 | "tags": [], | |
2262 | "user": "test" |
|
2262 | "user": "test" | |
2263 | } |
|
2263 | } | |
2264 | ] |
|
2264 | ] | |
2265 |
|
2265 | |||
2266 | follow files from wdir |
|
2266 | follow files from wdir | |
2267 |
|
2267 | |||
2268 | $ hg cp d1/f1 f1-copy |
|
2268 | $ hg cp d1/f1 f1-copy | |
2269 | $ hg stat --all |
|
2269 | $ hg stat --all | |
2270 | M d1/f1 |
|
2270 | M d1/f1 | |
2271 | A d1/f2 |
|
2271 | A d1/f2 | |
2272 | A f1-copy |
|
2272 | A f1-copy | |
2273 | d1/f1 |
|
2273 | d1/f1 | |
2274 | R .d6/f1 |
|
2274 | R .d6/f1 | |
2275 | C D2/f1 |
|
2275 | C D2/f1 | |
2276 | C D3.i/f1 |
|
2276 | C D3.i/f1 | |
2277 | C d4.hg/f1 |
|
2277 | C d4.hg/f1 | |
2278 | C d5.d/f1 |
|
2278 | C d5.d/f1 | |
2279 |
|
2279 | |||
2280 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d5.d/f1 |
|
2280 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d5.d/f1 | |
2281 | == 2147483647 == |
|
2281 | == 2147483647 == | |
2282 |
|
2282 | |||
2283 | == 0 == |
|
2283 | == 0 == | |
2284 | d5.d/f1 | 1 + |
|
2284 | d5.d/f1 | 1 + | |
2285 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
2285 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
2286 |
|
2286 | |||
2287 |
|
2287 | |||
2288 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f1 |
|
2288 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f1 | |
2289 | == 2147483647 == |
|
2289 | == 2147483647 == | |
2290 | d1/f1 | 1 + |
|
2290 | d1/f1 | 1 + | |
2291 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
2291 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
2292 |
|
2292 | |||
2293 | == 0 == |
|
2293 | == 0 == | |
2294 | d1/f1 | 1 + |
|
2294 | d1/f1 | 1 + | |
2295 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
2295 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
2296 |
|
2296 | |||
2297 |
|
2297 | |||
2298 | BROKEN: added file should exist in wdir |
|
2298 | BROKEN: added file should exist in wdir | |
2299 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f2 |
|
2299 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat d1/f2 | |
2300 | abort: cannot follow nonexistent file: "d1/f2" |
|
2300 | abort: cannot follow nonexistent file: "d1/f2" | |
2301 | [255] |
|
2301 | [255] | |
2302 |
|
2302 | |||
2303 | BROKEN: copied file should exist in wdir |
|
2303 | BROKEN: copied file should exist in wdir | |
2304 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat f1-copy |
|
2304 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat f1-copy | |
2305 | abort: cannot follow nonexistent file: "f1-copy" |
|
2305 | abort: cannot follow nonexistent file: "f1-copy" | |
2306 | [255] |
|
2306 | [255] | |
2307 |
|
2307 | |||
2308 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat notfound |
|
2308 | $ hg log -T '== {rev} ==\n' -fr'wdir()' --git --stat notfound | |
2309 | notfound: $ENOENT$ |
|
2309 | notfound: $ENOENT$ | |
2310 |
|
2310 | |||
|
2311 | follow added/removed files from wdir parent | |||
|
2312 | ||||
|
2313 | $ hg log -T '{rev}\n' -f d1/f2 | |||
|
2314 | abort: cannot follow nonexistent file: "d1/f2" | |||
|
2315 | [255] | |||
|
2316 | ||||
|
2317 | $ hg log -T '{rev}\n' -f f1-copy | |||
|
2318 | abort: cannot follow nonexistent file: "f1-copy" | |||
|
2319 | [255] | |||
|
2320 | ||||
|
2321 | $ hg log -T '{rev}\n' -f .d6/f1 | |||
|
2322 | abort: cannot follow file not in parent revision: ".d6/f1" | |||
|
2323 | [255] | |||
|
2324 | ||||
2311 | $ hg revert -aqC |
|
2325 | $ hg revert -aqC | |
2312 |
|
2326 | |||
2313 | Check that adding an arbitrary name shows up in log automatically |
|
2327 | Check that adding an arbitrary name shows up in log automatically | |
2314 |
|
2328 | |||
2315 | $ cat > ../names.py <<EOF |
|
2329 | $ cat > ../names.py <<EOF | |
2316 | > """A small extension to test adding arbitrary names to a repo""" |
|
2330 | > """A small extension to test adding arbitrary names to a repo""" | |
2317 | > from __future__ import absolute_import |
|
2331 | > from __future__ import absolute_import | |
2318 | > from mercurial import namespaces |
|
2332 | > from mercurial import namespaces | |
2319 | > |
|
2333 | > | |
2320 | > def reposetup(ui, repo): |
|
2334 | > def reposetup(ui, repo): | |
2321 | > if not repo.local(): |
|
2335 | > if not repo.local(): | |
2322 | > return |
|
2336 | > return | |
2323 | > foo = {b'foo': repo[0].node()} |
|
2337 | > foo = {b'foo': repo[0].node()} | |
2324 | > names = lambda r: foo.keys() |
|
2338 | > names = lambda r: foo.keys() | |
2325 | > namemap = lambda r, name: foo.get(name) |
|
2339 | > namemap = lambda r, name: foo.get(name) | |
2326 | > nodemap = lambda r, node: [name for name, n in foo.items() |
|
2340 | > nodemap = lambda r, node: [name for name, n in foo.items() | |
2327 | > if n == node] |
|
2341 | > if n == node] | |
2328 | > ns = namespaces.namespace( |
|
2342 | > ns = namespaces.namespace( | |
2329 | > b"bars", templatename=b"bar", logname=b"barlog", |
|
2343 | > b"bars", templatename=b"bar", logname=b"barlog", | |
2330 | > colorname=b"barcolor", listnames=names, namemap=namemap, |
|
2344 | > colorname=b"barcolor", listnames=names, namemap=namemap, | |
2331 | > nodemap=nodemap) |
|
2345 | > nodemap=nodemap) | |
2332 | > |
|
2346 | > | |
2333 | > repo.names.addnamespace(ns) |
|
2347 | > repo.names.addnamespace(ns) | |
2334 | > EOF |
|
2348 | > EOF | |
2335 |
|
2349 | |||
2336 | $ hg --config extensions.names=../names.py log -r 0 |
|
2350 | $ hg --config extensions.names=../names.py log -r 0 | |
2337 | changeset: 0:65624cd9070a |
|
2351 | changeset: 0:65624cd9070a | |
2338 | tag: tip |
|
2352 | tag: tip | |
2339 | barlog: foo |
|
2353 | barlog: foo | |
2340 | user: test |
|
2354 | user: test | |
2341 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2355 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2342 | summary: a bunch of weird directories |
|
2356 | summary: a bunch of weird directories | |
2343 |
|
2357 | |||
2344 | $ hg --config extensions.names=../names.py \ |
|
2358 | $ hg --config extensions.names=../names.py \ | |
2345 | > --config extensions.color= --config color.log.barcolor=red \ |
|
2359 | > --config extensions.color= --config color.log.barcolor=red \ | |
2346 | > --color=always log -r 0 |
|
2360 | > --color=always log -r 0 | |
2347 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) |
|
2361 | \x1b[0;33mchangeset: 0:65624cd9070a\x1b[0m (esc) | |
2348 | tag: tip |
|
2362 | tag: tip | |
2349 | \x1b[0;31mbarlog: foo\x1b[0m (esc) |
|
2363 | \x1b[0;31mbarlog: foo\x1b[0m (esc) | |
2350 | user: test |
|
2364 | user: test | |
2351 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2365 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2352 | summary: a bunch of weird directories |
|
2366 | summary: a bunch of weird directories | |
2353 |
|
2367 | |||
2354 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' |
|
2368 | $ hg --config extensions.names=../names.py log -r 0 --template '{bars}\n' | |
2355 | foo |
|
2369 | foo | |
2356 |
|
2370 | |||
2357 | Templater parse errors: |
|
2371 | Templater parse errors: | |
2358 |
|
2372 | |||
2359 | simple error |
|
2373 | simple error | |
2360 | $ hg log -r . -T '{shortest(node}' |
|
2374 | $ hg log -r . -T '{shortest(node}' | |
2361 | hg: parse error at 14: unexpected token: end |
|
2375 | hg: parse error at 14: unexpected token: end | |
2362 | ({shortest(node} |
|
2376 | ({shortest(node} | |
2363 | ^ here) |
|
2377 | ^ here) | |
2364 | [255] |
|
2378 | [255] | |
2365 |
|
2379 | |||
2366 | multi-line template with error |
|
2380 | multi-line template with error | |
2367 | $ hg log -r . -T 'line 1 |
|
2381 | $ hg log -r . -T 'line 1 | |
2368 | > line2 |
|
2382 | > line2 | |
2369 | > {shortest(node} |
|
2383 | > {shortest(node} | |
2370 | > line4\nline5' |
|
2384 | > line4\nline5' | |
2371 | hg: parse error at 27: unexpected token: end |
|
2385 | hg: parse error at 27: unexpected token: end | |
2372 | (line 1\nline2\n{shortest(node}\nline4\nline5 |
|
2386 | (line 1\nline2\n{shortest(node}\nline4\nline5 | |
2373 | ^ here) |
|
2387 | ^ here) | |
2374 | [255] |
|
2388 | [255] | |
2375 |
|
2389 | |||
2376 | $ cd .. |
|
2390 | $ cd .. | |
2377 |
|
2391 | |||
2378 | New namespace is registered per repo instance, but the template keyword |
|
2392 | New namespace is registered per repo instance, but the template keyword | |
2379 | is global. So we shouldn't expect the namespace always exists. Using |
|
2393 | is global. So we shouldn't expect the namespace always exists. Using | |
2380 | ssh:// makes sure a bundle repository is created from scratch. (issue6301) |
|
2394 | ssh:// makes sure a bundle repository is created from scratch. (issue6301) | |
2381 |
|
2395 | |||
2382 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ |
|
2396 | $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \ | |
2383 | > -qr0 "ssh://user@dummy/`pwd`/a" a-clone |
|
2397 | > -qr0 "ssh://user@dummy/`pwd`/a" a-clone | |
2384 | $ hg incoming --config extensions.names=names.py -R a-clone \ |
|
2398 | $ hg incoming --config extensions.names=names.py -R a-clone \ | |
2385 | > -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -T '{bars}\n' -l1 |
|
2399 | > -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" -T '{bars}\n' -l1 | |
2386 | comparing with ssh://user@dummy/$TESTTMP/a |
|
2400 | comparing with ssh://user@dummy/$TESTTMP/a | |
2387 | searching for changes |
|
2401 | searching for changes | |
2388 |
|
2402 | |||
2389 |
|
2403 | |||
2390 | hg log -f dir across branches |
|
2404 | hg log -f dir across branches | |
2391 |
|
2405 | |||
2392 | $ hg init acrossbranches |
|
2406 | $ hg init acrossbranches | |
2393 | $ cd acrossbranches |
|
2407 | $ cd acrossbranches | |
2394 | $ mkdir d |
|
2408 | $ mkdir d | |
2395 | $ echo a > d/a && hg ci -Aqm a |
|
2409 | $ echo a > d/a && hg ci -Aqm a | |
2396 | $ echo b > d/a && hg ci -Aqm b |
|
2410 | $ echo b > d/a && hg ci -Aqm b | |
2397 | $ hg up -q 0 |
|
2411 | $ hg up -q 0 | |
2398 | $ echo b > d/a && hg ci -Aqm c |
|
2412 | $ echo b > d/a && hg ci -Aqm c | |
2399 | $ hg log -f d -T '{desc}' -G |
|
2413 | $ hg log -f d -T '{desc}' -G | |
2400 | @ c |
|
2414 | @ c | |
2401 | | |
|
2415 | | | |
2402 | o a |
|
2416 | o a | |
2403 |
|
2417 | |||
2404 | Ensure that largefiles doesn't interfere with following a normal file |
|
2418 | Ensure that largefiles doesn't interfere with following a normal file | |
2405 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G |
|
2419 | $ hg --config extensions.largefiles= log -f d -T '{desc}' -G | |
2406 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) |
|
2420 | The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !) | |
2407 | @ c |
|
2421 | @ c | |
2408 | | |
|
2422 | | | |
2409 | o a |
|
2423 | o a | |
2410 |
|
2424 | |||
2411 | $ hg log -f d/a -T '{desc}' -G |
|
2425 | $ hg log -f d/a -T '{desc}' -G | |
2412 | @ c |
|
2426 | @ c | |
2413 | | |
|
2427 | | | |
2414 | o a |
|
2428 | o a | |
2415 |
|
2429 | |||
2416 | $ cd .. |
|
2430 | $ cd .. | |
2417 |
|
2431 | |||
2418 | hg log -f with linkrev pointing to another branch |
|
2432 | hg log -f with linkrev pointing to another branch | |
2419 | ------------------------------------------------- |
|
2433 | ------------------------------------------------- | |
2420 |
|
2434 | |||
2421 | create history with a filerev whose linkrev points to another branch |
|
2435 | create history with a filerev whose linkrev points to another branch | |
2422 |
|
2436 | |||
2423 | $ hg init branchedlinkrev |
|
2437 | $ hg init branchedlinkrev | |
2424 | $ cd branchedlinkrev |
|
2438 | $ cd branchedlinkrev | |
2425 | $ echo 1 > a |
|
2439 | $ echo 1 > a | |
2426 | $ hg commit -Am 'content1' |
|
2440 | $ hg commit -Am 'content1' | |
2427 | adding a |
|
2441 | adding a | |
2428 | $ echo 2 > a |
|
2442 | $ echo 2 > a | |
2429 | $ hg commit -m 'content2' |
|
2443 | $ hg commit -m 'content2' | |
2430 | $ hg up --rev 'desc(content1)' |
|
2444 | $ hg up --rev 'desc(content1)' | |
2431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2445 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2432 | $ echo unrelated > unrelated |
|
2446 | $ echo unrelated > unrelated | |
2433 | $ hg commit -Am 'unrelated' |
|
2447 | $ hg commit -Am 'unrelated' | |
2434 | adding unrelated |
|
2448 | adding unrelated | |
2435 | created new head |
|
2449 | created new head | |
2436 | $ hg graft -r 'desc(content2)' |
|
2450 | $ hg graft -r 'desc(content2)' | |
2437 | grafting 1:2294ae80ad84 "content2" |
|
2451 | grafting 1:2294ae80ad84 "content2" | |
2438 | $ echo 3 > a |
|
2452 | $ echo 3 > a | |
2439 | $ hg commit -m 'content3' |
|
2453 | $ hg commit -m 'content3' | |
2440 | $ hg log -G |
|
2454 | $ hg log -G | |
2441 | @ changeset: 4:50b9b36e9c5d |
|
2455 | @ changeset: 4:50b9b36e9c5d | |
2442 | | tag: tip |
|
2456 | | tag: tip | |
2443 | | user: test |
|
2457 | | user: test | |
2444 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2458 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2445 | | summary: content3 |
|
2459 | | summary: content3 | |
2446 | | |
|
2460 | | | |
2447 | o changeset: 3:15b2327059e5 |
|
2461 | o changeset: 3:15b2327059e5 | |
2448 | | user: test |
|
2462 | | user: test | |
2449 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2463 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2450 | | summary: content2 |
|
2464 | | summary: content2 | |
2451 | | |
|
2465 | | | |
2452 | o changeset: 2:2029acd1168c |
|
2466 | o changeset: 2:2029acd1168c | |
2453 | | parent: 0:ae0a3c9f9e95 |
|
2467 | | parent: 0:ae0a3c9f9e95 | |
2454 | | user: test |
|
2468 | | user: test | |
2455 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2469 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2456 | | summary: unrelated |
|
2470 | | summary: unrelated | |
2457 | | |
|
2471 | | | |
2458 | | o changeset: 1:2294ae80ad84 |
|
2472 | | o changeset: 1:2294ae80ad84 | |
2459 | |/ user: test |
|
2473 | |/ user: test | |
2460 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2474 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2461 | | summary: content2 |
|
2475 | | summary: content2 | |
2462 | | |
|
2476 | | | |
2463 | o changeset: 0:ae0a3c9f9e95 |
|
2477 | o changeset: 0:ae0a3c9f9e95 | |
2464 | user: test |
|
2478 | user: test | |
2465 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2479 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2466 | summary: content1 |
|
2480 | summary: content1 | |
2467 |
|
2481 | |||
2468 |
|
2482 | |||
2469 | log -f on the file should list the graft result. |
|
2483 | log -f on the file should list the graft result. | |
2470 |
|
2484 | |||
2471 | $ hg log -Gf a |
|
2485 | $ hg log -Gf a | |
2472 | @ changeset: 4:50b9b36e9c5d |
|
2486 | @ changeset: 4:50b9b36e9c5d | |
2473 | | tag: tip |
|
2487 | | tag: tip | |
2474 | | user: test |
|
2488 | | user: test | |
2475 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2489 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2476 | | summary: content3 |
|
2490 | | summary: content3 | |
2477 | | |
|
2491 | | | |
2478 | o changeset: 3:15b2327059e5 |
|
2492 | o changeset: 3:15b2327059e5 | |
2479 | : user: test |
|
2493 | : user: test | |
2480 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2494 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2481 | : summary: content2 |
|
2495 | : summary: content2 | |
2482 | : |
|
2496 | : | |
2483 | o changeset: 0:ae0a3c9f9e95 |
|
2497 | o changeset: 0:ae0a3c9f9e95 | |
2484 | user: test |
|
2498 | user: test | |
2485 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2499 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2486 | summary: content1 |
|
2500 | summary: content1 | |
2487 |
|
2501 | |||
2488 |
|
2502 | |||
2489 | plain log lists the original version |
|
2503 | plain log lists the original version | |
2490 | (XXX we should probably list both) |
|
2504 | (XXX we should probably list both) | |
2491 |
|
2505 | |||
2492 | $ hg log -G a |
|
2506 | $ hg log -G a | |
2493 | @ changeset: 4:50b9b36e9c5d |
|
2507 | @ changeset: 4:50b9b36e9c5d | |
2494 | : tag: tip |
|
2508 | : tag: tip | |
2495 | : user: test |
|
2509 | : user: test | |
2496 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2510 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2497 | : summary: content3 |
|
2511 | : summary: content3 | |
2498 | : |
|
2512 | : | |
2499 | : o changeset: 1:2294ae80ad84 |
|
2513 | : o changeset: 1:2294ae80ad84 | |
2500 | :/ user: test |
|
2514 | :/ user: test | |
2501 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2515 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2502 | : summary: content2 |
|
2516 | : summary: content2 | |
2503 | : |
|
2517 | : | |
2504 | o changeset: 0:ae0a3c9f9e95 |
|
2518 | o changeset: 0:ae0a3c9f9e95 | |
2505 | user: test |
|
2519 | user: test | |
2506 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2520 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2507 | summary: content1 |
|
2521 | summary: content1 | |
2508 |
|
2522 | |||
2509 |
|
2523 | |||
2510 | hg log -f from the grafted changeset |
|
2524 | hg log -f from the grafted changeset | |
2511 | (The bootstrap should properly take the topology in account) |
|
2525 | (The bootstrap should properly take the topology in account) | |
2512 |
|
2526 | |||
2513 | $ hg up 'desc(content3)^' |
|
2527 | $ hg up 'desc(content3)^' | |
2514 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2528 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2515 | $ hg log -Gf a |
|
2529 | $ hg log -Gf a | |
2516 | @ changeset: 3:15b2327059e5 |
|
2530 | @ changeset: 3:15b2327059e5 | |
2517 | : user: test |
|
2531 | : user: test | |
2518 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2532 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2519 | : summary: content2 |
|
2533 | : summary: content2 | |
2520 | : |
|
2534 | : | |
2521 | o changeset: 0:ae0a3c9f9e95 |
|
2535 | o changeset: 0:ae0a3c9f9e95 | |
2522 | user: test |
|
2536 | user: test | |
2523 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2537 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2524 | summary: content1 |
|
2538 | summary: content1 | |
2525 |
|
2539 | |||
2526 |
|
2540 | |||
2527 | Test that we use the first non-hidden changeset in that case. |
|
2541 | Test that we use the first non-hidden changeset in that case. | |
2528 |
|
2542 | |||
2529 | (hide the changeset) |
|
2543 | (hide the changeset) | |
2530 |
|
2544 | |||
2531 | $ hg log -T '{node}\n' -r 1 |
|
2545 | $ hg log -T '{node}\n' -r 1 | |
2532 | 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2546 | 2294ae80ad8447bc78383182eeac50cb049df623 | |
2533 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 |
|
2547 | $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623 | |
2534 | 1 new obsolescence markers |
|
2548 | 1 new obsolescence markers | |
2535 | obsoleted 1 changesets |
|
2549 | obsoleted 1 changesets | |
2536 | $ hg log -G |
|
2550 | $ hg log -G | |
2537 | o changeset: 4:50b9b36e9c5d |
|
2551 | o changeset: 4:50b9b36e9c5d | |
2538 | | tag: tip |
|
2552 | | tag: tip | |
2539 | | user: test |
|
2553 | | user: test | |
2540 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2554 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2541 | | summary: content3 |
|
2555 | | summary: content3 | |
2542 | | |
|
2556 | | | |
2543 | @ changeset: 3:15b2327059e5 |
|
2557 | @ changeset: 3:15b2327059e5 | |
2544 | | user: test |
|
2558 | | user: test | |
2545 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2559 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2546 | | summary: content2 |
|
2560 | | summary: content2 | |
2547 | | |
|
2561 | | | |
2548 | o changeset: 2:2029acd1168c |
|
2562 | o changeset: 2:2029acd1168c | |
2549 | | parent: 0:ae0a3c9f9e95 |
|
2563 | | parent: 0:ae0a3c9f9e95 | |
2550 | | user: test |
|
2564 | | user: test | |
2551 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2565 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2552 | | summary: unrelated |
|
2566 | | summary: unrelated | |
2553 | | |
|
2567 | | | |
2554 | o changeset: 0:ae0a3c9f9e95 |
|
2568 | o changeset: 0:ae0a3c9f9e95 | |
2555 | user: test |
|
2569 | user: test | |
2556 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2570 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2557 | summary: content1 |
|
2571 | summary: content1 | |
2558 |
|
2572 | |||
2559 |
|
2573 | |||
2560 | Check that log on the file does not drop the file revision. |
|
2574 | Check that log on the file does not drop the file revision. | |
2561 |
|
2575 | |||
2562 | $ hg log -G a |
|
2576 | $ hg log -G a | |
2563 | o changeset: 4:50b9b36e9c5d |
|
2577 | o changeset: 4:50b9b36e9c5d | |
2564 | | tag: tip |
|
2578 | | tag: tip | |
2565 | | user: test |
|
2579 | | user: test | |
2566 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2580 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2567 | | summary: content3 |
|
2581 | | summary: content3 | |
2568 | | |
|
2582 | | | |
2569 | @ changeset: 3:15b2327059e5 |
|
2583 | @ changeset: 3:15b2327059e5 | |
2570 | : user: test |
|
2584 | : user: test | |
2571 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2585 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2572 | : summary: content2 |
|
2586 | : summary: content2 | |
2573 | : |
|
2587 | : | |
2574 | o changeset: 0:ae0a3c9f9e95 |
|
2588 | o changeset: 0:ae0a3c9f9e95 | |
2575 | user: test |
|
2589 | user: test | |
2576 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2590 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2577 | summary: content1 |
|
2591 | summary: content1 | |
2578 |
|
2592 | |||
2579 |
|
2593 | |||
2580 | Even when a head revision is linkrev-shadowed. |
|
2594 | Even when a head revision is linkrev-shadowed. | |
2581 |
|
2595 | |||
2582 | $ hg log -T '{node}\n' -r 4 |
|
2596 | $ hg log -T '{node}\n' -r 4 | |
2583 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2597 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2584 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 |
|
2598 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
2585 | 1 new obsolescence markers |
|
2599 | 1 new obsolescence markers | |
2586 | obsoleted 1 changesets |
|
2600 | obsoleted 1 changesets | |
2587 | $ hg log -G a |
|
2601 | $ hg log -G a | |
2588 | @ changeset: 3:15b2327059e5 |
|
2602 | @ changeset: 3:15b2327059e5 | |
2589 | : tag: tip |
|
2603 | : tag: tip | |
2590 | : user: test |
|
2604 | : user: test | |
2591 | : date: Thu Jan 01 00:00:00 1970 +0000 |
|
2605 | : date: Thu Jan 01 00:00:00 1970 +0000 | |
2592 | : summary: content2 |
|
2606 | : summary: content2 | |
2593 | : |
|
2607 | : | |
2594 | o changeset: 0:ae0a3c9f9e95 |
|
2608 | o changeset: 0:ae0a3c9f9e95 | |
2595 | user: test |
|
2609 | user: test | |
2596 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2610 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2597 | summary: content1 |
|
2611 | summary: content1 | |
2598 |
|
2612 | |||
2599 |
|
2613 | |||
2600 | $ cd .. |
|
2614 | $ cd .. | |
2601 |
|
2615 | |||
2602 | Even when the file revision is missing from some head: |
|
2616 | Even when the file revision is missing from some head: | |
2603 |
|
2617 | |||
2604 | $ hg init issue4490 |
|
2618 | $ hg init issue4490 | |
2605 | $ cd issue4490 |
|
2619 | $ cd issue4490 | |
2606 | $ echo '[experimental]' >> .hg/hgrc |
|
2620 | $ echo '[experimental]' >> .hg/hgrc | |
2607 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc |
|
2621 | $ echo 'evolution.createmarkers=True' >> .hg/hgrc | |
2608 | $ echo a > a |
|
2622 | $ echo a > a | |
2609 | $ hg ci -Am0 |
|
2623 | $ hg ci -Am0 | |
2610 | adding a |
|
2624 | adding a | |
2611 | $ echo b > b |
|
2625 | $ echo b > b | |
2612 | $ hg ci -Am1 |
|
2626 | $ hg ci -Am1 | |
2613 | adding b |
|
2627 | adding b | |
2614 | $ echo B > b |
|
2628 | $ echo B > b | |
2615 | $ hg ci --amend -m 1 |
|
2629 | $ hg ci --amend -m 1 | |
2616 | $ hg up 0 |
|
2630 | $ hg up 0 | |
2617 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2631 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2618 | $ echo c > c |
|
2632 | $ echo c > c | |
2619 | $ hg ci -Am2 |
|
2633 | $ hg ci -Am2 | |
2620 | adding c |
|
2634 | adding c | |
2621 | created new head |
|
2635 | created new head | |
2622 | $ hg up 'head() and not .' |
|
2636 | $ hg up 'head() and not .' | |
2623 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
2637 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
2624 | $ hg log -G |
|
2638 | $ hg log -G | |
2625 | o changeset: 3:db815d6d32e6 |
|
2639 | o changeset: 3:db815d6d32e6 | |
2626 | | tag: tip |
|
2640 | | tag: tip | |
2627 | | parent: 0:f7b1eb17ad24 |
|
2641 | | parent: 0:f7b1eb17ad24 | |
2628 | | user: test |
|
2642 | | user: test | |
2629 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2643 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2630 | | summary: 2 |
|
2644 | | summary: 2 | |
2631 | | |
|
2645 | | | |
2632 | | @ changeset: 2:9bc8ce7f9356 |
|
2646 | | @ changeset: 2:9bc8ce7f9356 | |
2633 | |/ parent: 0:f7b1eb17ad24 |
|
2647 | |/ parent: 0:f7b1eb17ad24 | |
2634 | | user: test |
|
2648 | | user: test | |
2635 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2649 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2636 | | summary: 1 |
|
2650 | | summary: 1 | |
2637 | | |
|
2651 | | | |
2638 | o changeset: 0:f7b1eb17ad24 |
|
2652 | o changeset: 0:f7b1eb17ad24 | |
2639 | user: test |
|
2653 | user: test | |
2640 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2654 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2641 | summary: 0 |
|
2655 | summary: 0 | |
2642 |
|
2656 | |||
2643 | $ hg log -f -G b |
|
2657 | $ hg log -f -G b | |
2644 | @ changeset: 2:9bc8ce7f9356 |
|
2658 | @ changeset: 2:9bc8ce7f9356 | |
2645 | | parent: 0:f7b1eb17ad24 |
|
2659 | | parent: 0:f7b1eb17ad24 | |
2646 | ~ user: test |
|
2660 | ~ user: test | |
2647 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2661 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2648 | summary: 1 |
|
2662 | summary: 1 | |
2649 |
|
2663 | |||
2650 | $ hg log -G b |
|
2664 | $ hg log -G b | |
2651 | @ changeset: 2:9bc8ce7f9356 |
|
2665 | @ changeset: 2:9bc8ce7f9356 | |
2652 | | parent: 0:f7b1eb17ad24 |
|
2666 | | parent: 0:f7b1eb17ad24 | |
2653 | ~ user: test |
|
2667 | ~ user: test | |
2654 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2668 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2655 | summary: 1 |
|
2669 | summary: 1 | |
2656 |
|
2670 | |||
2657 | $ cd .. |
|
2671 | $ cd .. | |
2658 |
|
2672 | |||
2659 | Check proper report when the manifest changes but not the file issue4499 |
|
2673 | Check proper report when the manifest changes but not the file issue4499 | |
2660 | ------------------------------------------------------------------------ |
|
2674 | ------------------------------------------------------------------------ | |
2661 |
|
2675 | |||
2662 | $ hg init issue4499 |
|
2676 | $ hg init issue4499 | |
2663 | $ cd issue4499 |
|
2677 | $ cd issue4499 | |
2664 | $ 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 |
|
2678 | $ 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 | |
2665 | > echo 1 > $f; |
|
2679 | > echo 1 > $f; | |
2666 | > hg add $f; |
|
2680 | > hg add $f; | |
2667 | > done |
|
2681 | > done | |
2668 | $ hg commit -m 'A1B1C1' |
|
2682 | $ hg commit -m 'A1B1C1' | |
2669 | $ echo 2 > A |
|
2683 | $ echo 2 > A | |
2670 | $ echo 2 > B |
|
2684 | $ echo 2 > B | |
2671 | $ echo 2 > C |
|
2685 | $ echo 2 > C | |
2672 | $ hg commit -m 'A2B2C2' |
|
2686 | $ hg commit -m 'A2B2C2' | |
2673 | $ hg up 0 |
|
2687 | $ hg up 0 | |
2674 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2688 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
2675 | $ echo 3 > A |
|
2689 | $ echo 3 > A | |
2676 | $ echo 2 > B |
|
2690 | $ echo 2 > B | |
2677 | $ echo 2 > C |
|
2691 | $ echo 2 > C | |
2678 | $ hg commit -m 'A3B2C2' |
|
2692 | $ hg commit -m 'A3B2C2' | |
2679 | created new head |
|
2693 | created new head | |
2680 |
|
2694 | |||
2681 | $ hg log -G |
|
2695 | $ hg log -G | |
2682 | @ changeset: 2:fe5fc3d0eb17 |
|
2696 | @ changeset: 2:fe5fc3d0eb17 | |
2683 | | tag: tip |
|
2697 | | tag: tip | |
2684 | | parent: 0:abf4f0e38563 |
|
2698 | | parent: 0:abf4f0e38563 | |
2685 | | user: test |
|
2699 | | user: test | |
2686 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2700 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2687 | | summary: A3B2C2 |
|
2701 | | summary: A3B2C2 | |
2688 | | |
|
2702 | | | |
2689 | | o changeset: 1:07dcc6b312c0 |
|
2703 | | o changeset: 1:07dcc6b312c0 | |
2690 | |/ user: test |
|
2704 | |/ user: test | |
2691 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2705 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2692 | | summary: A2B2C2 |
|
2706 | | summary: A2B2C2 | |
2693 | | |
|
2707 | | | |
2694 | o changeset: 0:abf4f0e38563 |
|
2708 | o changeset: 0:abf4f0e38563 | |
2695 | user: test |
|
2709 | user: test | |
2696 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2710 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2697 | summary: A1B1C1 |
|
2711 | summary: A1B1C1 | |
2698 |
|
2712 | |||
2699 |
|
2713 | |||
2700 | Log -f on B should reports current changesets |
|
2714 | Log -f on B should reports current changesets | |
2701 |
|
2715 | |||
2702 | $ hg log -fG B |
|
2716 | $ hg log -fG B | |
2703 | @ changeset: 2:fe5fc3d0eb17 |
|
2717 | @ changeset: 2:fe5fc3d0eb17 | |
2704 | | tag: tip |
|
2718 | | tag: tip | |
2705 | | parent: 0:abf4f0e38563 |
|
2719 | | parent: 0:abf4f0e38563 | |
2706 | | user: test |
|
2720 | | user: test | |
2707 | | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2721 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
2708 | | summary: A3B2C2 |
|
2722 | | summary: A3B2C2 | |
2709 | | |
|
2723 | | | |
2710 | o changeset: 0:abf4f0e38563 |
|
2724 | o changeset: 0:abf4f0e38563 | |
2711 | user: test |
|
2725 | user: test | |
2712 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2726 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2713 | summary: A1B1C1 |
|
2727 | summary: A1B1C1 | |
2714 |
|
2728 | |||
2715 | $ cd .. |
|
2729 | $ cd .. | |
2716 |
|
2730 | |||
2717 | --- going to test line wrap fix on using both --stat and -G (issue5800) |
|
2731 | --- going to test line wrap fix on using both --stat and -G (issue5800) | |
2718 | $ hg init issue5800 |
|
2732 | $ hg init issue5800 | |
2719 | $ cd issue5800 |
|
2733 | $ cd issue5800 | |
2720 | $ touch a |
|
2734 | $ touch a | |
2721 | $ hg ci -Am 'add a' |
|
2735 | $ hg ci -Am 'add a' | |
2722 | adding a |
|
2736 | adding a | |
2723 | ---- now we are going to add 300 lines to a |
|
2737 | ---- now we are going to add 300 lines to a | |
2724 | $ for i in `$TESTDIR/seq.py 1 300`; do echo $i >> a; done |
|
2738 | $ for i in `$TESTDIR/seq.py 1 300`; do echo $i >> a; done | |
2725 | $ hg ci -m 'modify a' |
|
2739 | $ hg ci -m 'modify a' | |
2726 | $ hg log |
|
2740 | $ hg log | |
2727 | changeset: 1:a98683e6a834 |
|
2741 | changeset: 1:a98683e6a834 | |
2728 | tag: tip |
|
2742 | tag: tip | |
2729 | user: test |
|
2743 | user: test | |
2730 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2744 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2731 | summary: modify a |
|
2745 | summary: modify a | |
2732 |
|
2746 | |||
2733 | changeset: 0:ac82d8b1f7c4 |
|
2747 | changeset: 0:ac82d8b1f7c4 | |
2734 | user: test |
|
2748 | user: test | |
2735 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2749 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2736 | summary: add a |
|
2750 | summary: add a | |
2737 |
|
2751 | |||
2738 | ---- now visualise the changes we made without template |
|
2752 | ---- now visualise the changes we made without template | |
2739 | $ hg log -l1 -r a98683e6a834 --stat -G |
|
2753 | $ hg log -l1 -r a98683e6a834 --stat -G | |
2740 | @ changeset: 1:a98683e6a834 |
|
2754 | @ changeset: 1:a98683e6a834 | |
2741 | | tag: tip |
|
2755 | | tag: tip | |
2742 | ~ user: test |
|
2756 | ~ user: test | |
2743 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2757 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2744 | summary: modify a |
|
2758 | summary: modify a | |
2745 |
|
2759 | |||
2746 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2760 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2747 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2761 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2748 |
|
2762 | |||
2749 | ---- with template |
|
2763 | ---- with template | |
2750 | $ hg log -l1 -r a98683e6a834 --stat -G -T bisect |
|
2764 | $ hg log -l1 -r a98683e6a834 --stat -G -T bisect | |
2751 | @ changeset: 1:a98683e6a834 |
|
2765 | @ changeset: 1:a98683e6a834 | |
2752 | | bisect: |
|
2766 | | bisect: | |
2753 | ~ tag: tip |
|
2767 | ~ tag: tip | |
2754 | user: test |
|
2768 | user: test | |
2755 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2769 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2756 | summary: modify a |
|
2770 | summary: modify a | |
2757 |
|
2771 | |||
2758 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2772 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2759 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2773 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2760 |
|
2774 | |||
2761 | $ hg log -l1 -r a98683e6a834 --stat -G -T changelog |
|
2775 | $ hg log -l1 -r a98683e6a834 --stat -G -T changelog | |
2762 | 1970-01-01 test <test> |
|
2776 | 1970-01-01 test <test> | |
2763 |
|
2777 | |||
2764 | @ * a: |
|
2778 | @ * a: | |
2765 | | modify a |
|
2779 | | modify a | |
2766 | ~ [a98683e6a834] [tip] |
|
2780 | ~ [a98683e6a834] [tip] | |
2767 |
|
2781 | |||
2768 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2782 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2769 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2783 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2770 |
|
2784 | |||
2771 | $ hg log -l1 -r a98683e6a834 --stat -G -T compact |
|
2785 | $ hg log -l1 -r a98683e6a834 --stat -G -T compact | |
2772 | @ 1[tip] a98683e6a834 1970-01-01 00:00 +0000 test |
|
2786 | @ 1[tip] a98683e6a834 1970-01-01 00:00 +0000 test | |
2773 | | modify a |
|
2787 | | modify a | |
2774 | ~ |
|
2788 | ~ | |
2775 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2789 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2776 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2790 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2777 |
|
2791 | |||
2778 | $ hg log -l1 -r a98683e6a834 --stat -G -T default |
|
2792 | $ hg log -l1 -r a98683e6a834 --stat -G -T default | |
2779 | @ changeset: 1:a98683e6a834 |
|
2793 | @ changeset: 1:a98683e6a834 | |
2780 | | tag: tip |
|
2794 | | tag: tip | |
2781 | ~ user: test |
|
2795 | ~ user: test | |
2782 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2796 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2783 | summary: modify a |
|
2797 | summary: modify a | |
2784 |
|
2798 | |||
2785 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2799 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2786 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2800 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2787 |
|
2801 | |||
2788 | $ hg log -l1 -r a98683e6a834 --stat -G -T phases |
|
2802 | $ hg log -l1 -r a98683e6a834 --stat -G -T phases | |
2789 | @ changeset: 1:a98683e6a834 |
|
2803 | @ changeset: 1:a98683e6a834 | |
2790 | | tag: tip |
|
2804 | | tag: tip | |
2791 | ~ phase: draft |
|
2805 | ~ phase: draft | |
2792 | user: test |
|
2806 | user: test | |
2793 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2807 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2794 | summary: modify a |
|
2808 | summary: modify a | |
2795 |
|
2809 | |||
2796 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2810 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2797 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2811 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2798 |
|
2812 | |||
2799 | $ hg log -l1 -r a98683e6a834 --stat -G -T show |
|
2813 | $ hg log -l1 -r a98683e6a834 --stat -G -T show | |
2800 | @ changeset: 1:a98683e6a834 |
|
2814 | @ changeset: 1:a98683e6a834 | |
2801 | | tag: tip |
|
2815 | | tag: tip | |
2802 | ~ user: test |
|
2816 | ~ user: test | |
2803 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2817 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2804 | summary: modify a |
|
2818 | summary: modify a | |
2805 |
|
2819 | |||
2806 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2820 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2807 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2821 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2808 |
|
2822 | |||
2809 | $ hg log -l1 -r a98683e6a834 --stat -G -T status |
|
2823 | $ hg log -l1 -r a98683e6a834 --stat -G -T status | |
2810 | @ changeset: 1:a98683e6a834 |
|
2824 | @ changeset: 1:a98683e6a834 | |
2811 | | tag: tip |
|
2825 | | tag: tip | |
2812 | ~ user: test |
|
2826 | ~ user: test | |
2813 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
2827 | date: Thu Jan 01 00:00:00 1970 +0000 | |
2814 | summary: modify a |
|
2828 | summary: modify a | |
2815 | files: |
|
2829 | files: | |
2816 | M a |
|
2830 | M a | |
2817 |
|
2831 | |||
2818 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2832 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2819 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2833 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2820 |
|
2834 | |||
2821 | $ hg log -l1 -r a98683e6a834 --stat -G -T xml |
|
2835 | $ hg log -l1 -r a98683e6a834 --stat -G -T xml | |
2822 | <?xml version="1.0"?> |
|
2836 | <?xml version="1.0"?> | |
2823 | <log> |
|
2837 | <log> | |
2824 | @ <logentry revision="1" node="a98683e6a8340830a7683909768b62871e84bc9d"> |
|
2838 | @ <logentry revision="1" node="a98683e6a8340830a7683909768b62871e84bc9d"> | |
2825 | | <tag>tip</tag> |
|
2839 | | <tag>tip</tag> | |
2826 | ~ <author email="test">test</author> |
|
2840 | ~ <author email="test">test</author> | |
2827 | <date>1970-01-01T00:00:00+00:00</date> |
|
2841 | <date>1970-01-01T00:00:00+00:00</date> | |
2828 | <msg xml:space="preserve">modify a</msg> |
|
2842 | <msg xml:space="preserve">modify a</msg> | |
2829 | </logentry> |
|
2843 | </logentry> | |
2830 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
2844 | a | 300 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
2831 | 1 files changed, 300 insertions(+), 0 deletions(-) |
|
2845 | 1 files changed, 300 insertions(+), 0 deletions(-) | |
2832 |
|
2846 | |||
2833 | </log> |
|
2847 | </log> | |
2834 |
|
2848 | |||
2835 | $ cd .. |
|
2849 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now