comparison dot_hgrc @ 857:bdd538139b08

feat: enable some hgrc options and add templates
author Zeger Van de Vannet <zeger@vandevan.net>
date Wed, 27 Mar 2024 08:50:12 +0100
parents 1a144a878e46
children ffd8a15ceee9
comparison
equal deleted inserted replaced
856:ccf4b28f04f9 857:bdd538139b08
2 2
3 [ui] 3 [ui]
4 # We recommend enabling tweakdefaults to get slight improvements to 4 # We recommend enabling tweakdefaults to get slight improvements to
5 # the UI over time. Make sure to set HGPLAIN in the environment when 5 # the UI over time. Make sure to set HGPLAIN in the environment when
6 # writing scripts! 6 # writing scripts!
7 tweakdefaults = True 7 tweakdefaults = yes
8 8
9 # uncomment to disable color in command output 9 # Dump merge conflict markers in files in 3-way format
10 # (see 'hg help color' for details) 10 merge = internal:merge3
11 # color = never
12 11
13 # uncomment to disable command output pagination 12 # Global ignore file
14 # (see 'hg help pager' for details) 13 ignore = ~/.hgignore
15 # paginate = never 14
16 merge = internal:merge3 15 # Show copies in status
16 statuscopies = yes
17
18 # Disable rollback
19 rollback = no
20
21 # Use curses interface for rebase, histedit
22 interface = curses
23
24 # Use helix as editor
25 editor = hx
17 26
18 [merge-tools] 27 [merge-tools]
19 meld.disabled = yes 28 meld.disabled = yes
20 vimdiff.disabled = yes 29 vimdiff.disabled = yes
21 30
22 [extensions] 31 [extensions]
23 # uncomment the lines below to enable some popular extensions
24 # (see 'hg help extensions' for more info)
25 #
26 histedit = 32 histedit =
27 rebase = 33 rebase =
28 topic = 34 topic =
29 evolve = 35 evolve =
30 # confman =
31 # hggit =
32 absorb = 36 absorb =
33 largefiles = 37 largefiles =
38 # Store http(s) passwords in a keyring
39 # Configure schemes via:
40 # [auth]
41 # schemename.prefix = https://example.com
42 # schemename.username = jdoe
34 mercurial_keyring = 43 mercurial_keyring =
35 44
45 [commands]
46 # Require to pass an explicit revision when pushing
47 push.require-revs = yes
48 # Show paths relative to cwd
49 status.relative = yes
50 # Determines what level of checking 'hg resolve --mark' will perform
51 resolve.mark-check = abort
52 # "noconflict" will allow any update which would not trigger a merge
53 update.check = noconflict
54
55 [paths]
56 # Always push current revision unless specified
57 default:pushrev = .
58
36 [experimental] 59 [experimental]
37 topic-mode = warn 60 topic-mode = random
38 evolution = all 61 evolution = all
39 auto-publish = warn 62 auto-publish = warn
40
41 63
42 [phases] 64 [phases]
43 publish = false 65 publish = false
44 66
45 [alias] 67 [alias]
49 71
50 [rhg] 72 [rhg]
51 on-unsupported = fallback 73 on-unsupported = fallback
52 fallback-executable = /usr/local/bin/hg 74 fallback-executable = /usr/local/bin/hg
53 allowed-extensions = rebase, absorb, evolve, topic 75 allowed-extensions = rebase, absorb, evolve, topic
76
77 [diff]
78 git = yes
79 nodates = no
80 showfunc = 1
81 word-diff = 1
54 82
55 [committemplate] 83 [committemplate]
56 changeset = {desc}\n\n 84 changeset = {desc}\n\n
57 HG: Enter commit message. Lines beginning with 'HG:' are removed. 85 HG: Enter commit message. Lines beginning with 'HG:' are removed.
58 HG: {extramsg} 86 HG: {extramsg}
68 "HG: no files changed\n")} 96 "HG: no files changed\n")}
69 HG: ------------------------ >8 ------------------------ 97 HG: ------------------------ >8 ------------------------
70 HG: Do not touch the line above. 98 HG: Do not touch the line above.
71 HG: Everything below will be removed. 99 HG: Everything below will be removed.
72 {diff()} 100 {diff()}
101
102 changeset.commit.normal.normal = {desc}\n\n
103 HG: Enter commit message. Lines beginning with 'HG:' are removed.
104 HG: {extramsg}
105 HG: --
106 HG: user: {author}\n{ifeq(p2rev, "-1", "",
107 "HG: branch merge\n")
108 }HG: branch: '{branch}'\n{if(topic,
109 "HG: topic: '{topic}'\n") }{subrepos %
110 "HG: subrepo: {subrepo}\n" }{file_adds %
111 "HG: added {file}\n" }{file_mods %
112 "HG: changed {file}\n" }{file_dels %
113 "HG: removed {file}\n" }{if(files, "",
114 "HG: no files changed\n")}
115 HG: ------------------------ >8 ------------------------
116 HG: Do not touch the line above.
117 HG: Everything below will be removed.
118 {diff()}
119
120 [templatealias]
121 commitinfo = '{date|shortdate} {pad(label("grep.user", author|person), 20, left=True, truncate=True)} {desc|strip|firstline}'
122
123 [templates]
124 oneline_stack = '{pad("{label("stack.index", "s{stack_index}")}{label("stack.state.{state}", symbol)}", 5, left=True)} {label("stack.state.{state}", pad(state, 8))} {commitinfo}\n'
125 oneline = '{label("changeset.{phase}", node|short)} {pad(label("log.branch", fqbn), 25, truncate=True)} {commitinfo}\n'
126
127 [color]
128 mode=auto
129
130 log.branch=cyan
131 log.bookmark=green
132 log.topic=yellow
133 log.tag=green
134 log.activebookmark = green bold underline
135
136 changeset.public=green
137 changeset.secret=blue bold
138 changeset.draft=red
139
140 desc.here=green_background black
141 stack.state = red
142
143 [alias]
144 node = parent --template '{node}'
145 ls = log --template=oneline --limit=50 --pager=auto
146 stack = stack --color=always --template=oneline_stack
147 status = status -mard
148 st = status -mard
149 stat = status -mard
150 incoming = incoming --template=oneline
151 in = incoming --template=oneline
152 outgoing = outgoing --template=oneline
153 out = outgoing --template=oneline
154 mark = resolve --mark