Mercurial > dotfiles
changeset 446:edefbb8ea16a
Mercurial tweaks.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 21 May 2018 21:59:23 -0700 |
parents | 05ab0353cd6e |
children | 48933cecdf7f |
files | hgrc/hgrc hgrc/logstyles install.py |
diffstat | 3 files changed, 54 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/hgrc/hgrc Sun May 13 21:41:57 2018 -0700 +++ b/hgrc/hgrc Mon May 21 21:59:23 2018 -0700 @@ -8,22 +8,17 @@ [extensions] color = -purge = -fetch = +extdiff = +histedit = pager = -shelve = +purge = rebase = +schemes = shelve = -convert = -extdiff = -schemes = -histedit = -graphlog = -progress = -parentrevspec = [alias] -clog = glog --limit 10 --template "{rev} {branches} {bookmarks} {tags} {node|short} {date|shortdate} {author|user}\n{desc}\n\n" +glog = log -G +clog = glog --pager=yes --template "{rev} {branches} {bookmarks} {tags} {node|short} {date|shortdate} {author|user}\n{desc}\n\n" [revsetalias] wip = (parents(not public()) or not public() or . or head()) and (not obsolete() or unstable()^ and not closed()) @@ -41,6 +36,16 @@ cmd.sbsdiff = diff opts.sbsdiff = -N -b --side-by-side --width=90 +[color] +log.activebookmark = magenta bold +log.activechangeset = yellow bold +log.bookmark = magenta +log.branch = cyan +log.changeset = yellow +log.phase_draft = red bold +log.phase_secret = blue bold +log.tag = green + # OS-specific settings %include hgrc-${OS}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hgrc/logstyles Mon May 21 21:59:23 2018 -0700 @@ -0,0 +1,21 @@ +changeset_common = '{label(ifcontains(rev, revset('parents()'), + "log.activechangeset", + "log.changeset"), + "commit {rev}:{node}")}\ + {label("log.phase_{phase}", + ifeq(phase, "public", + "", + " {ifeq(phase,"draft","D","S")}"))}\ + {label("log.branch", ifeq(branch, "default", "", " {branch}"))}\ + {label("log.tag", if(tags, " {tags}"))}\ + {bookmarks % "{ifeq(bookmark, currentbookmark, + label('log.activebookmark', " {bookmark}"), + label('log.bookmark', " {bookmark}"))}"} + {ifeq(parents,"","","{ifeq(p2rev,-1,"Parent: ","Merge: ")}{parents}\n")}\ + Author: {author} + Date: {date(date,"%c %z")}\n + {indent(desc," ")}\n' +changeset_files = '{ifeq(files, "", "", "\n {join(files,\"\n \")}\n")}' + +changeset_verbose = '{changeset_common}{changeset_files}\n' +changeset = '{changeset_common}\n'
--- a/install.py Sun May 13 21:41:57 2018 -0700 +++ b/install.py Mon May 21 21:59:23 2018 -0700 @@ -179,16 +179,24 @@ 'terse-status = %s' % _p('lib/hg/terse-status/terse-status.py'), '[alias]', ('dlog = log --pager=yes --style=%s' % - _p('lib/hg/mercurial-cli-templates/map-cmdline.dlog', force_unix=True)), + _p('lib/hg/mercurial-cli-templates/map-cmdline.dlog', + force_unix=True)), ('slog = log --pager=yes --style=%s' % - _p('lib/hg/mercurial-cli-templates/map-cmdline.slog', force_unix=True)), + _p('lib/hg/mercurial-cli-templates/map-cmdline.slog', + force_unix=True)), ('nlog = log --pager=yes --style=%s' % - _p('lib/hg/mercurial-cli-templates/map-cmdline.nlog', force_unix=True)), + _p('lib/hg/mercurial-cli-templates/map-cmdline.nlog', + force_unix=True)), ('sglog = glog --pager=yes --style=%s' % - _p('lib/hg/mercurial-cli-templates/map-cmdline.sglog', force_unix=True)), - ('nglog = log --pager=yes -G --style=%s' % - _p('lib/hg/mercurial-cli-templates/map-cmdline.nlog', force_unix=True)), - 'wip = glog --pager=yes --style=$DOTFILESPATH/hgrc/wip.style --rev wip' + _p('lib/hg/mercurial-cli-templates/map-cmdline.sglog', + force_unix=True)), + ('nglog = glog --pager=yes --style=%s' % + _p('lib/hg/mercurial-cli-templates/map-cmdline.nlog', + force_unix=True)), + ('blog = glog --page=yes --style=%s' % + _p('hgrc/logstyles')), + ('wip = glog --pager=yes --style=%s --rev wip' % + _p('hgrc/wip.style', force_unix=True)) ]) if is_nix: print("Building fast-hg-prompt...") @@ -247,8 +255,8 @@ func(path) else: raise - - + + def _is_non_empty_dir_with(path, contains=None): if not os.path.isdir(path): return False