comparison tests/test-branches.t @ 11969:52ec5c813723

color: enable branches support This commit updates the branches command to use ui.label for the branch names and the changeset. This implementation allows assigning colors to the four states of a branch: active, closed, current and inactive. While you can configure color for the four states, only current and closed have default colors of green and black bold respectively.
author Jeremy Whitlock <jcscoobyrs@gmail.com>
date Wed, 28 Jul 2010 23:05:03 -0600
parents 062052b0d737
children 4134686b83e1
comparison
equal deleted inserted replaced
11968:66521d25c2a6 11969:52ec5c813723
339 branch: b 339 branch: b
340 user: test 340 user: test
341 date: Thu Jan 01 00:00:09 1970 +0000 341 date: Thu Jan 01 00:00:09 1970 +0000
342 summary: prune bad branch 342 summary: prune bad branch
343 343
344 default branch colors:
345
346 $ echo "[extensions]" >> $HGRCPATH
347 $ echo "color =" >> $HGRCPATH
348
349 $ hg up -C c
350 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
351 $ hg commit -d '9 0' --close-branch -m 'reclosing this branch'
352 $ hg up -C b
353 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
354 $ hg branches --color=always
355 b  13:6ac12926b8c3
356 a branch name much longer than the default justification used by branches 7:10ff5895aa57
357 a  5:d8cbc61dbaa6 (inactive)
358 default  0:19709c5a4e75 (inactive)
359
360 default closed branch color:
361
362 $ hg branches --color=always --closed
363 b  13:6ac12926b8c3
364 a branch name much longer than the default justification used by branches 7:10ff5895aa57
365 c  14:717d2e6fabe1 (closed)
366 a  5:d8cbc61dbaa6 (inactive)
367 default  0:19709c5a4e75 (inactive)
368
369 $ echo "[extensions]" >> $HGRCPATH
370 $ echo "color =" >> $HGRCPATH
371 $ echo "[color]" >> $HGRCPATH
372 $ echo "branches.active = green" >> $HGRCPATH
373 $ echo "branches.closed = blue" >> $HGRCPATH
374 $ echo "branches.current = red" >> $HGRCPATH
375 $ echo "branches.inactive = magenta" >> $HGRCPATH
376 $ echo "log.changeset = cyan" >> $HGRCPATH
377
378 custom branch colors:
379
380 $ hg branches --color=always
381 b  13:6ac12926b8c3
382 a branch name much longer than the default justification used by branches 7:10ff5895aa57
383 a  5:d8cbc61dbaa6 (inactive)
384 default  0:19709c5a4e75 (inactive)
385
386 custom closed branch color:
387
388 $ hg branches --color=always --closed
389 b  13:6ac12926b8c3
390 a branch name much longer than the default justification used by branches 7:10ff5895aa57
391 c  14:717d2e6fabe1 (closed)
392 a  5:d8cbc61dbaa6 (inactive)
393 default  0:19709c5a4e75 (inactive)