/
.hgrc
195 lines (166 loc) · 5.69 KB
/
.hgrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[ui]
username = Steve Losh <steve@stevelosh.com>
editor = vim
commitsubrepos = False
[extensions]
transplant =
graphlog =
record =
bookmarks =
rebase =
purge =
mq =
patchbomb =
extdiff =
color =
parentrevspec =
schemes =
progress =
fetch =
attic = ~/lib/hg/hgattic/attic.py
paste = ~/lib/hg/hg-paste/paste.py
prompt = ~/lib/hg/hg-prompt/prompt.py
histedit = ~/lib/hg/histedit/hg_histedit.py
crecord = ~/lib/hg/crecord/crecord
hggit = ~/lib/hg/hg-git/hggit
collapse = ~/lib/hg/hgcollapse/hgext/collapse.py
review = ~/src/hg-review/review
[progress]
delay = 1.0
[schemes]
webf = ssh://sjl@sjl.webfactional.com/repos/
bbs = ssh://hg@bitbucket.org/
gh = git://github.com/
ghs = git+ssh://git@github.com/
cb = ssh://hg@codebasehq.com/
cbdw = ssh://hg@codebasehq.com/dwaiter/
cbsl = ssh://hg@codebasehq.com/stevelosh/
stable = ssh://hg@bitbucket.org/stable/
dwd = ssh://hg@bitbucket.org/dwaiter/
nyh = ssh://sjl@gotham.nyhacker.org/
dl = ssh://hg@hg.dwaiter.com:38038/
[diff]
git = True
unified = 5
[extdiff]
cmd.vd = mvim
opts.vd = -c 'set lines=70' -c 'set columns=240' -f '+next' '+execute "DirDiff" argv(0) argv(1)'
cmd.ksdiff = /usr/local/bin/ksdiff-wrapper
opts.ksdiff = hg
cmd.dd = diffuse
opts.dd =
[merge-tools]
[email]
method = smtp
from = Steve Losh <steve@stevelosh.com>
[smtp]
host = smtp.gmail.com
port = 587
username = steve@stevelosh.com
tls = True
[color]
status.modified = cyan
status.added = green
status.removed = red
status.deleted = yellow bold underline
status.unknown = magenta bold underline
status.ignored = black bold
diff.diffline = none
diff.extended = cyan
diff.file_a = red
diff.file_b = green
diff.hunk = yellow bold
diff.deleted = red
diff.inserted = green
diff.changed = white
diff.trailingwhitespace = white_background
[bookmarks]
track.current = True
[defaults]
rebase = --keepbranches
addremove = --similarity 100
[alias]
nudge = push --branch .
st = status -C
? = summary
cm = commit -m
cus = commit -m 'Update subrepository state.'
cuf = commit -m 'Update fixtures.' -I '**fixtures**.json'
cmm = commit -m 'Merge.'
mergelocal = $HG --config ui.merge=internal:local merge $@
mergeother = $HG --config ui.merge=internal:other merge $@
mergefail = $HG --config ui.merge=internal:fail merge $@
fdiff = diff -U 10000000000000
qfdiff = qdiff -U 10000000000000
kd = !/opt/local/bin/hg ksdiff $@
ks = !/opt/local/bin/hg ksdiff -c $@
dlog = log --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.dlog
_ = dlog -l15
__ = _ -l100000000
o_ = outgoing -n --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.dlog
i_ = incoming -n --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.dlog
slog = log --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.slog
. = slog -l15
.. = . -l100000000
o. = outgoing -n --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.slog
i. = incoming -n --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.slog
sglog = glog --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.sglog
, = sglog -l7
,, = , -l100000000
o, = outgoing --graph --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.sglog
i, = incoming --graph --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.sglog
nlog = log --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.nlog
n = nlog -vr
show = nlog --color=always -vpr
fet = fetch --message 'Automated merge.'
qpp = push -r qparent
# Make a new repo with some sensible defaults.
mkrepo = !$HG init $1 && cd $1 && \
echo 'syntax: glob' > .hgignore && \
echo '' >> .hgignore && \
echo '.DS_Store' >> .hgignore && \
echo '*.pyc' >> .hgignore && \
echo '*.swp' >> .hgignore && \
echo '*.swo' >> .hgignore && \
echo '*.un~' >> .hgignore && \
echo '.ropeproject' >> .hgignore && \
echo 'tags' >> .hgignore && \
echo "[paths]\n" >> .hg/hgrc
# Empty the current MQ patch.
qempty = !$HG qrefresh -X `$HG root`
# Commit under any applied MQ patches, and go back to where you were after doing so.
# `hg ciunder` will use `$EDITOR` to get the commit message
# `hg cmunder 'message'` takes it on the command line
ciunder = !HG_CUR_PATCH=`$HG qtop --color=never` && \
$HG qnew temp-for-under && \
$HG qpop -a && \
$HG qpush --move temp-for-under && \
$HG qrefresh -e && \
$HG qfinish temp-for-under && \
$HG qpush $HG_CUR_PATCH
cmunder = !HG_CUR_PATCH=`$HG qtop --color=never` && \
$HG qnew temp-for-under && \
$HG qpop -a && \
$HG qpush --move temp-for-under && \
$HG qrefresh -m "$@" && \
$HG qfinish temp-for-under && \
$HG qpush $HG_CUR_PATCH
pushunder = !HG_CUR_PATCH=`$HG qtop --color=never` && \
$HG qpop -a && \
$HG push $@ && \
$HG qpush $HG_CUR_PATCH
# Edit the current repo's hgrc file.
erc = !$EDITOR `$HG root`/.hg/hgrc
# Simple bug/todo tracking
# Idea from Justin: http://gist.github.com/464871
# Install t first: http://bitbucket.org/sjl/t/
bug = !~/lib/t/t.py --task-dir="`$HG root`" --list=BUGS $@
todo = !~/lib/t/t.py --task-dir="`$HG root`" --list=TODO $@
# Easily add ignore patterns.
ignore = ![ -n "$@" ] && echo '$@' >> `$HG root`/.hgignore && \
$HG commit `$HG root`/.hgignore -Am 'Add "$@" to .hgignore.'
# hgd management commands
rund = !dtach -n /tmp/hgd.sock ~/lib/virtualenvs/hgd/bin/python ~/src/hgd/hgd.py
statd = !ps auxww | grep -v grep | grep hgd.py >/dev/null && echo 'running' || echo "not running"
killt = !ps auxww | grep "hgd/hgd.py" | grep -v grep | sed -e 's/ */ /g' | cut -d" " -f2 | cat
killd = !ps auxww | grep "hgd/hgd.py" | grep -v grep | sed -e 's/ */ /g' | cut -d" " -f2 | xargs kill