Show More
@@ -303,6 +303,11 b' def annotate(ui, repo, *pats, **opts):' | |||
|
303 | 303 | ctx = scmutil.revsingle(repo, rev) |
|
304 | 304 | |
|
305 | 305 | rootfm = ui.formatter('annotate', opts) |
|
306 | if ui.debugflag: | |
|
307 | shorthex = pycompat.identity | |
|
308 | else: | |
|
309 | def shorthex(h): | |
|
310 | return h[:12] | |
|
306 | 311 | if ui.quiet: |
|
307 | 312 | datefunc = dateutil.shortdate |
|
308 | 313 | else: |
@@ -312,7 +317,7 b' def annotate(ui, repo, *pats, **opts):' | |||
|
312 | 317 | if node is None: |
|
313 | 318 | return None |
|
314 | 319 | else: |
|
315 |
return |
|
|
320 | return hex(node) | |
|
316 | 321 | if opts.get('changeset'): |
|
317 | 322 | # omit "+" suffix which is appended to node hex |
|
318 | 323 | def formatrev(rev): |
@@ -326,14 +331,15 b' def annotate(ui, repo, *pats, **opts):' | |||
|
326 | 331 | return '%d+' % ctx.p1().rev() |
|
327 | 332 | else: |
|
328 | 333 | return '%d ' % rev |
|
329 |
def formathex(h |
|
|
330 |
if h |
|
|
331 |
return '%s+' % |
|
|
334 | def formathex(h): | |
|
335 | if h is None: | |
|
336 | return '%s+' % shorthex(hex(ctx.p1().node())) | |
|
332 | 337 | else: |
|
333 | return '%s ' % hex | |
|
338 | return '%s ' % shorthex(h) | |
|
334 | 339 | else: |
|
335 |
hexfn = |
|
|
336 | formatrev = formathex = pycompat.bytestr | |
|
340 | hexfn = hex | |
|
341 | formatrev = b'%d'.__mod__ | |
|
342 | formathex = shorthex | |
|
337 | 343 | |
|
338 | 344 | opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser), |
|
339 | 345 | ('rev', ' ', lambda x: x.fctx.rev(), formatrev), |
General Comments 0
You need to be logged in to leave comments.
Login now