Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

merge with stable

Changeset 66f2921bbb9f

Parents bb7a3caa41c4

Parents 3cf9c40cd9de

by Steve Borho

Changes to 192 files · Browse files at 66f2921bbb9f Showing diff from parent bb7a3caa41c4 3cf9c40cd9de Diff from another changeset...

Change 1 of 1 Show Entire File .hgignore Stacked
 
3
4
5
6
 
 
7
8
9
10
11
 
 
 
 
 
3
4
5
 
6
7
8
9
10
11
12
13
14
15
16
@@ -3,9 +3,14 @@
 *.orig  *.rej  *.pyc -hggtk/__version__.py +thgutil/__version__.py +thgutil/__paths__.py  build/  dist/  Output/  .*.swp  Thumbs.db +MANIFEST +*.o +*.dll +*.exe
Change 1 of 1 Show Entire File MANIFEST.in Stacked
 
 
 
 
 
 
1
2
3
4
@@ -0,0 +1,4 @@
+recursive-include icons *.png *.ico *.svg +include contrib/_hgtk +include contrib/nautilus-thg.py +include COPYING.txt ReleaseNotes.txt
Change 1 of 1 Show Entire File contrib/​_hgtk Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
@@ -0,0 +1,552 @@
+#compdef hgtk + +# Zsh completion script for hgtk. +# copy it into your zsh function path (/usr/share/zsh/site-functions) +# +# Copyright (C) 2009 Steve Borho +# +# This is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your +# option) any later version. + +emulate -LR zsh +setopt extendedglob + +local curcontext="$curcontext" state line +typeset -A _hg_cmd_globals + +_hgtk() { + local cmd _hg_root + integer i=2 + _hg_cmd_globals=() + + while (( i < $#words )) + do + case "$words[$i]" in + -R|--repository) + eval _hg_root="$words[$i+1]" + _hg_cmd_globals+=("$words[$i]" "$_hg_root") + (( i += 2 )) + continue + ;; + -R*) + _hg_cmd_globals+="$words[$i]" + eval _hg_root="${words[$i]#-R}" + (( i++ )) + continue + ;; + --cwd|--config) + # pass along arguments to hg completer + _hg_cmd_globals+=("$words[$i]" "$words[$i+1]") + (( i += 2 )) + continue + ;; + -*) + # skip option + (( i++ )) + continue + ;; + esac + if [[ -z "$cmd" ]] + then + cmd="$words[$i]" + words[$i]=() + (( CURRENT-- )) + fi + (( i++ )) + done + + if [[ -z "$cmd" ]] + then + _arguments -s -w : $_hg_global_opts \ + ':hgtk command:_hg_commands' + return + fi + + # resolve abbreviations and aliases + if ! (( $+functions[_hg_cmd_${cmd}] )) + then + local cmdexp + (( $#_hg_cmd_list )) || _hg_get_commands + + cmdexp=$_hg_cmd_list[(r)${cmd}*] + if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]] + then + # might be nice to rewrite the command line with the expansion + cmd="$cmdexp" + fi + if [[ -n $_hg_alias_list[$cmd] ]] + then + cmd=$_hg_alias_list[$cmd] + fi + fi + + curcontext="${curcontext%:*:*}:hg-${cmd}:" + + zstyle -s ":completion:$curcontext:" cache-policy update_policy + + if [[ -z "$update_policy" ]] + then + zstyle ":completion:$curcontext:" cache-policy _hg_cache_policy + fi + + if (( $+functions[_hg_cmd_${cmd}] )) + then + _hg_cmd_${cmd} + else + # complete unknown commands normally + _arguments -s -w : $_hg_global_opts \ + '*:files:_hg_files' + fi +} + +_hg_cache_policy() { + typeset -a old + + # cache for a minute + old=( "$1"(mm+10) ) + (( $#old )) && return 0 + + return 1 +} + +_hg_get_commands() { + typeset -ga _hg_cmd_list + typeset -gA _hg_alias_list + local hline cmd cmdalias + + _call_program hgtk hgtk debugcomplete -v 2>/dev/null | while read -A hline + do + cmd=$hline[1] + _hg_cmd_list+=($cmd) + + for cmdalias in $hline[2,-1] + do + _hg_cmd_list+=($cmdalias) + _hg_alias_list+=($cmdalias $cmd) + done + done +} + +_hg_commands() { + (( $#_hg_cmd_list )) || _hg_get_commands + _describe -t commands 'hgtk command' _hg_cmd_list +} + +_hg_revrange() { + compset -P 1 '*:' + _hg_tags "$@" +} + +_hg_tags() { + typeset -a tags + local tag rev + + _hg_cmd tags 2> /dev/null | while read tag + do + tags+=(${tag/ # [0-9]#:*}) + done + (( $#tags )) && _describe -t tags 'tags' tags +} + +_hg_files() { + if [[ -n "$_hg_root" ]] + then + [[ -d "$_hg_root/.hg" ]] || return + case "$_hg_root" in + /*) + _files -W $_hg_root + ;; + *) + _files -W $PWD/$_hg_root + ;; + esac + else + _files + fi +} + +_hg_status() { + [[ -d $PREFIX ]] || PREFIX=$PREFIX:h + status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"}) +} + +_hg_unknown() { + typeset -a status_files + _hg_status u + _wanted files expl 'unknown files' _multi_parts / status_files +} + +_hg_missing() { + typeset -a status_files + _hg_status d + _wanted files expl 'missing files' _multi_parts / status_files +} + +_hg_modified() { + typeset -a status_files + _hg_status m + _wanted files expl 'modified files' _multi_parts / status_files +} + +_hg_resolve() { + local rstate rpah + + [[ -d $PREFIX ]] || PREFIX=$PREFIX:h + + _hg_cmd resolve -l ./$PREFIX 2> /dev/null | while read rstate rpath + do + [[ $rstate == 'R' ]] && resolved_files+=($rpath) + [[ $rstate == 'U' ]] && unresolved_files+=($rpath) + done +} + +_hg_resolved() { + typeset -a resolved_files unresolved_files + _hg_resolve + _wanted files expl 'resolved files' _multi_parts / resolved_files +} + +_hg_unresolved() { + typeset -a resolved_files unresolved_files + _hg_resolve + _wanted files expl 'unresolved files' _multi_parts / unresolved_files +} + +_hg_config() { + typeset -a items + items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*}) + (( $#items )) && _describe -t config 'config item' items +} + +_hg_addremove() { + _alternative 'files:unknown files:_hg_unknown' \ + 'files:missing files:_hg_missing' +} + +_hg_ssh_urls() { + if [[ -prefix */ ]] + then + if zstyle -T ":completion:${curcontext}:files" remote-access + then + local host=${PREFIX%%/*} + typeset -a remdirs + compset -p $(( $#host + 1 )) + local rempath=${(M)PREFIX##*/} + local cacheid="hg:${host}-${rempath//\//_}" + cacheid=${cacheid%[-_]} + compset -P '*/' + if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid" + then + remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}" 2> /dev/null)"}##*/}%/}) + _store_cache "$cacheid" remdirs + fi + _describe -t directories 'remote directory' remdirs -S/ + else + _message 'remote directory' + fi + else + if compset -P '*@' + then + _hosts -S/ + else + _alternative 'hosts:remote host name:_hosts -S/' \ + 'users:user:_users -S@' + fi + fi +} + +_hg_urls() { + if compset -P bundle:// + then + _files + elif compset -P ssh:// + then + _hg_ssh_urls + elif [[ -prefix *: ]] + then + _urls + else + local expl + compset -S '[^:]*' + _wanted url-schemas expl 'URL schema' compadd -S '' - \ + http:// https:// ssh:// bundle:// + fi +} + +_hg_paths() { + typeset -a paths pnames + _hg_cmd paths 2> /dev/null | while read -A pnames + do + paths+=($pnames[1]) + done + (( $#paths )) && _describe -t path-aliases 'repository alias' paths +} + +_hg_remote() { + _alternative 'path-aliases:repository alias:_hg_paths' \ + 'directories:directory:_files -/' \ + 'urls:URL:_hg_urls' +} + +_hg_clone_dest() { + _alternative 'directories:directory:_files -/' \ + 'urls:URL:_hg_urls' +} + +# Common options +_hg_global_opts=( + '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' + '(--verbose -v)'{-v,--verbose}'[enable additional output]' + '(--quiet -q)'{-q,--quiet}'[suppress output]' + '(--help -h)'{-h,--help}'[display help and exit]' + '--debugger[start debugger]' +) + +_hg_pat_opts=( + '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/' + '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/') + +_hg_diff_opts=( + '(--text -a)'{-a,--text}'[treat all files as text]' + '(--git -g)'{-g,--git}'[use git extended diff format]' + "--nodates[don't include dates in diff headers]") + +_hg_style_opts=( + '--style[display using template map file]:' + '--template[display with template]:') + +_hg_commit_opts=( + '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]' + '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:' + '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files') + +_hg_remote_opts=( + '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' + '--remotecmd[specify hg command to run on the remote side]:') + +_hg_cmd() { + _call_program hg hg "$_hg_cmd_globals[@]" "$@" +} + +_hg_cmd_add() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '*:unknown files:_hg_unknown' +} + +_hg_cmd_annotate() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_tags' \ + '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \ + '(--text -a)'{-a,--text}'[treat all files as text]' \ + '(--user -u)'{-u,--user}'[list the author]' \ + '(--date -d)'{-d,--date}'[list the date]' \ + '(--number -n)'{-n,--number}'[list the revision number (default)]' \ + '(--changeset -c)'{-c,--changeset}'[list the changeset]' \ + '*:files:_hg_files' +} + +_hg_cmd_clone() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ + '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \ + '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \ + '--uncompressed[use uncompressed transfer (fast over LAN)]' \ + ':source repository:_hg_remote' \ + ':destination:_hg_clone_dest' +} + +_hg_cmd_commit() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \ + '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \ + '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \ + '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \ + '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \ + '*:file:_hg_files' +} + +_hg_cmd_vdiff() { + typeset -A opt_args + _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \ + '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \ + '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \ + '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \ + '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \ + '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \ + '*:file:->diff_files' + + if [[ $state == 'diff_files' ]] + then + if [[ -n $opt_args[-r] ]] + then + _hg_files + else + _hg_modified + fi + fi +} + +_hg_cmd_export() { + _arguments -s -w : $_hg_global_opts $_hg_diff_opts \ + '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \ + '--switch-parent[diff against the second parent]' \ + '*:revision:_hg_tags' +} + +_hg_cmd_grep() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \ + '--all[print all revisions with matches]' \ + '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \ + '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \ + '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \ + '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \ + '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \ + '(--user -u)'{-u,--user}'[print user who committed change]' \ + '1:search pattern:' \ + '*:files:_hg_files' +} + +_hg_cmd_heads() { + _arguments -s -w : $_hg_global_opts $_hg_style_opts \ + '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_tags' +} + +_hg_cmd_help() { + _arguments -s -w : $_hg_global_opts \ + '*:hgtk command:_hg_commands' +} + +_hg_cmd_incoming() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ + '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ + '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ + '(--patch -p)'{-p,--patch}'[show patch]' \ + '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \ + '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ + '--bundle[file to store the bundles into]:bundle file:_files' \ + ':source:_hg_remote' +} + +_hg_cmd_init() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ + ':dir:_files -/' +} + +_hg_cmd_log() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \ + '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \ + '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \ + '(--copies -C)'{-C,--copies}'[show copied files]' \ + '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \ + '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \ + '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \ + '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \ + '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ + '(--patch -p)'{-p,--patch}'[show patch]' \ + '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_tags' \ + '*:files:_hg_files' +} + +_hg_cmd_outgoing() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \ + '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \ + '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ + '(--patch -p)'{-p,--patch}'[show patch]' \ + '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \ + '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \ + ':destination:_hg_remote' +} + +_hg_cmd_pull() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ + '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \ + '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \ + '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \ + ':source:_hg_remote' +} + +_hg_cmd_push() { + _arguments -s -w : $_hg_global_opts $_hg_remote_opts \ + '(--force -f)'{-f,--force}'[force push]' \ + '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_tags' \ + ':destination:_hg_remote' +} + +_hg_cmd_remove() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--after -A)'{-A,--after}'[record remove that has already occurred]' \ + '(--force -f)'{-f,--force}'[remove file even if modified]' \ + '*:file:_hg_files' +} + +_hg_cmd_rename() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \ + '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \ + '*:file:_hg_files' +} + +_hg_cmd_revert() { + local context state line + typeset -A opt_args + + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \ + '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \ + '--no-backup[do not save backup copies of files]' \ + '*:file:->diff_files' + + if [[ $state == 'diff_files' ]] + then + if [[ -n $opt_args[-r] ]] + then + _hg_files + else + typeset -a status_files + _hg_status mard + _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files + fi + fi +} + +_hg_cmd_serve() { + _arguments -s -w : $_hg_global_opts \ + '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \ + '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \ + '(--daemon -d)'{-d,--daemon}'[run server in background]' \ + '(--port -p)'{-p+,--port}'[listen port]:listen port:' \ + '(--address -a)'{-a+,--address}'[interface address]:interface address:' \ + '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \ + '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \ + '--style[web template style]:style' \ + '--stdio[for remote clients]' \ + '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]' +} + +_hg_cmd_status() { + _arguments -s -w : $_hg_global_opts $_hg_pat_opts \ + '(--all -A)'{-A,--all}'[show status of all files]' \ + '(--modified -m)'{-m,--modified}'[show only modified files]' \ + '(--added -a)'{-a,--added}'[show only added files]' \ + '(--removed -r)'{-r,--removed}'[show only removed files]' \ + '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \ + '(--clean -c)'{-c,--clean}'[show only files without changes]' \ + '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \ + '(--ignored -i)'{-i,--ignored}'[show ignored files]' \ + '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \ + '(--copies -C)'{-C,--copies}'[show source of copied files]' \ + '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \ + '--rev[show difference from revision]:revision:_hg_tags' \ + '*:files:_files' +} + +_hg_cmd_update() { + _arguments -s -w : $_hg_global_opts \ + '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \ + '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \ + ':revision:_hg_tags' +} + +_hgtk "$@"
Change 1 of 1 Show Entire File contrib/​hg Stacked
 
8
9
10
11
 
 
 
 
 
 
 
 
12
 
 
13
 
 
 
 
14
 
8
9
10
 
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@@ -8,7 +8,20 @@
 # of the GNU General Public License, incorporated herein by reference.    # enable importing on demand to reduce startup time -from mercurial import demandimport; demandimport.enable() +try: + from mercurial import demandimport; demandimport.enable() +except ImportError: + import sys + sys.stderr.write("abort: couldn't find mercurial libraries in [%s]\n" % + ' '.join(sys.path)) + sys.stderr.write("(check your install and PYTHONPATH)\n") + sys.exit(-1)   +import sys +import mercurial.util  import mercurial.dispatch + +for fp in (sys.stdin, sys.stdout, sys.stderr): + mercurial.util.set_binary(fp) +  mercurial.dispatch.run()
 
1
 
2
3
 
4
5
6
 
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
 
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
 
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
196
197
198
199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
 
 
 
 
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
 
 
 
431
432
433
 
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
 
 
 
 
 
 
 
 
 
 
 
467
468
 
 
 
 
 
469
470
471
472
473
474
475
476
477
478
479
 
 
 
 
 
 
 
 
 
480
481
482
 
 
 
483
484
485
 
486
487
488
489
 
490
491
492
493
494
495
496
 
497
498
499
 
505
506
507
508
509
510
 
511
512
513
 
514
515
516
 
528
529
530
531
532
533
534
 
 
 
 
535
536
537
538
539
540
 
 
 
 
 
541
542
 
543
544
 
545
546
547
 
548
549
 
 
 
1
2
 
3
4
5
6
 
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
 
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
 
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
196
197
198
199
200
201
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
204
205
206
207
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
210
211
212
213
214
 
217
218
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
 
 
 
 
 
 
 
 
 
 
239
240
241
242
243
244
245
246
247
248
 
 
249
250
251
252
253
 
254
255
256
257
 
258
259
260
261
262
263
264
 
265
266
267
268
 
274
275
276
 
277
 
278
279
280
 
281
282
283
284
 
296
297
298
 
 
 
 
299
300
301
302
303
 
 
 
 
 
304
305
306
307
308
309
 
310
311
 
312
313
 
 
314
315
 
316
@@ -1,6 +1,6 @@
-# Trivial Mercurial plugin for Nautilus +# TortoiseHg plugin for Nautilus  # -# Copyright (C) 2007 Steve Borho +# Copyright (C) 2007-9 Steve Borho  #  # Stolen mercilessly from nautilus-bzr, thanks guys  # Copyright (C) 2006 Jeff Bailey @@ -9,26 +9,31 @@
 #  # Published under the GNU GPL   -import gconf  import gtk  import gobject -from mercurial import hg, ui, match, util -from mercurial.node import short  import nautilus + +try: + from mercurial import demandimport +except ImportError: + # workaround to use user's local python libs + userlib = os.path.expanduser('~/lib/python') + if os.path.exists(userlib) and userlib not in sys.path: + sys.path.append(userlib) + from mercurial import demandimport +demandimport.enable() +  import os  import subprocess  import sys -import tempfile -import time  import urllib   -try: - from mercurial.error import RepoError -except ImportError: - from mercurial.repo import RepoError +from mercurial import hg, ui, match, util +from mercurial.node import short   -TORTOISEHG_PATH = '~/tools/tortoisehg-dev' -TERMINAL_KEY = '/desktop/gnome/applications/terminal/exec' +nofilecmds = 'about serve synch repoconfig userconfig merge unmerge'.split() +nocachecmds = 'about serve repoconfig userconfig'.split() +    class HgExtension(nautilus.MenuProvider,   nautilus.ColumnProvider, @@ -38,26 +43,44 @@
  def __init__(self):   self.cacherepo = None   self.cacheroot = None - self.client = gconf.client_get_default() - thgpath = os.environ.get('TORTOISEHG_PATH', - os.path.expanduser(TORTOISEHG_PATH)) - os.environ['TORTOISEHG_PATH'] = thgpath - os.environ['THG_ICON_PATH'] = os.path.join(thgpath, 'icons') - self.hgproc = os.path.join(thgpath, 'hgproc.py') - self.ipath = os.path.join(thgpath, 'icons', 'tortoise') + self.scanStack = [] + + # check if nautilus-thg.py is a symlink first + pfile = __file__ + if pfile.endswith('.pyc'): + pfile = pfile[:-1] + path = os.path.dirname(os.path.dirname(os.path.realpath(pfile))) + thgpath = os.path.normpath(path) + testpath = os.path.join(thgpath, 'thgutil') + if os.path.isdir(testpath) and thgpath not in sys.path: + sys.path.insert(0, thgpath) + + # else assume thgutil is already in PYTHONPATH + try: + from thgutil import paths, debugthg, menuthg + except ImportError, e: + print e + self.menu = None + return + + self.hgtk = paths.find_in_path('hgtk') + self.menu = menuthg.menuThg() + + global debugf + if debugthg.debug('N'): + debugf = debugthg.debugf + else: + debugf = debugthg.debugf_No     def icon(self, iname): - return os.path.join(self.ipath, iname) + from thgutil import paths + return paths.get_tortoise_icon(iname)     def get_path_for_vfs_file(self, vfs_file): - if vfs_file.get_uri_scheme() != 'file': + if vfs_file.is_gone() or vfs_file.get_uri_scheme() != 'file':   return None   return urllib.unquote(vfs_file.get_uri()[7:])   - def clear_cached_repo(self): - self.cacheroot = None - self.cacherepo = None -   def get_repo_for_path(self, path):   '''   Find mercurial repository for vfs_file @@ -72,362 +95,120 @@
    if p == self.cacheroot:   return self.cacherepo + from thgutil import hglib   # Keep one repo cached   try:   self.cacheroot = p   self.cacherepo = hg.repository(ui.ui(), path=p)   return self.cacherepo - except RepoError: + except hglib.RepoError:   self.cacheroot = None   self.cacherepo = None   return None + except StandardError, e: + debugf(e) + return None   - def _open_terminal_cb(self, window, vfs_file): - path = self.get_path_for_vfs_file(vfs_file) - if path is None: + def run_dialog(self, menuitem, hgtkcmd, cwd = None): + ''' + hgtkcmd - hgtk subcommand + ''' + if cwd: #bg + self.files = [] + else: + cwd = self.cwd + repo = self.get_repo_for_path(cwd) + + cmdopts = [sys.executable, self.hgtk, hgtkcmd] + + if hgtkcmd not in nofilecmds and self.files: + pipe = subprocess.PIPE + cmdopts += ['--listfile', '-'] + else: + pipe = None + + proc = subprocess.Popen(cmdopts, cwd=cwd, stdin=pipe, shell=False) + if pipe: + proc.stdin.write('\n'.join(self.files)) + proc.stdin.close() + + if hgtkcmd not in nocachecmds: + # Remove cached repo object, dirstate may change + self.cacherepo = None + self.cacheroot = None + + def buildMenu(self, vfs_files, bg): + '''Build menu''' + self.pos = 0 + self.files = [] + files = [] + for vfs_file in vfs_files: + f = self.get_path_for_vfs_file(vfs_file) + if f: + files.append(f) + if not files:   return - os.chdir(path) - terminal = self.client.get_string(TERMINAL_KEY) - os.system('%s &' % terminal) + if bg or len(files) == 1 and vfs_files[0].is_directory(): + cwd = files[0] + files = [] + else: + cwd = os.path.dirname(files[0]) + repo = self.get_repo_for_path(cwd) + if repo: + menus = self.menu.get_commands(repo, cwd, files) + self.files = files + else: + menus = self.menu.get_norepo_commands(cwd, files) + self.cwd = cwd + return self._buildMenu(menus)   - def _about_cb(self, window, vfs_file): - self._run_dialog('about', [vfs_file]) - - def _add_cb(self, window, vfs_files): - self._run_dialog('add', vfs_files) - self.clear_cached_repo() - - def _clone_cb(self, window, vfs_file): - self._run_dialog('clone', [vfs_file]) - - def _commit_cb(self, window, vfs_files): - self._run_dialog('commit', vfs_files) - self.clear_cached_repo() - - def _datamine_cb(self, window, vfs_files): - self._run_dialog('datamine', vfs_files) - - def _diff_cb(self, window, vfs_files): - path = self.get_path_for_vfs_file(vfs_files[0]) - if path is None: - return - repo = self.get_repo_for_path(path) - if repo is None: - return - diffcmd = repo.ui.config('tortoisehg', 'vdiff', 'vdiff') - if not diffcmd: - self._run_dialog('diff', vfs_files) - else: - cmdline = ['hg', diffcmd] - cwd = os.path.isdir(path) and path or os.path.dirname(path) - paths = [self.get_path_for_vfs_file(f) for f in vfs_files] - subprocess.Popen(cmdline + paths, shell=False, cwd=cwd) - - def _history_cb(self, window, vfs_files): - self._run_dialog('history', vfs_files) - self.clear_cached_repo() - - def _init_cb(self, window, vfs_file): - self._run_dialog('init', [vfs_file]) - - def _recovery_cb(self, window, vfs_file): - self._run_dialog('recovery', [vfs_file]) - self.clear_cached_repo() - - def _revert_cb(self, window, vfs_files): - self._run_dialog('revert', vfs_files) - self.clear_cached_repo() - - def _serve_cb(self, window, vfs_file): - self._run_dialog('serve', [vfs_file], filelist=False) - - def _status_cb(self, window, vfs_file): - self._run_dialog('status', [vfs_file]) - - def _sync_cb(self, window, vfs_file): - self._run_dialog('synch', [vfs_file], filelist=False) - self.clear_cached_repo() - - def _thgconfig_repo_cb(self, window, vfs_file): - self._run_dialog('config', [vfs_file]) - - def _thgconfig_user_cb(self, window, vfs_file): - self._run_dialog('config', [vfs_file], filelist=False) - - def _unmerge_cb(self, window, vfs_file): - self._run_dialog('checkout', [vfs_file], filelist=False, - extras=['--', '--clean', str(self.rev0)]) - self.clear_cached_repo() - - def _run_dialog(self, hgcmd, vfs_files, filelist=True, extras=[]): - ''' - hgcmd - hgproc subcommand - vfs_files - directory, or list of selected files - filelist - bool for whether to generate file list for hgproc - ''' - paths = [self.get_path_for_vfs_file(f) for f in vfs_files] - if paths[0] is None: - return - - path = paths[0] - repo = self.get_repo_for_path(path) - cwd = os.path.isdir(path) and path or os.path.dirname(path) - - if repo is not None: - root = repo.root - else: - root = cwd - - cmdopts = [sys.executable, self.hgproc] - cmdopts += ['--root', root] - cmdopts += ['--cwd', cwd] - cmdopts += ['--command', hgcmd] - - if filelist: - # Use temporary file to store file list (avoid shell command - # line limitations) - fd, tmpfile = tempfile.mkstemp(prefix="tortoisehg_filelist_") - os.write(fd, "\n".join(paths)) - os.close(fd) - cmdopts += ['--listfile', tmpfile, '--deletelistfile'] - cmdopts.extend(extras) - - subprocess.Popen(cmdopts, cwd=cwd, shell=False) - - # Remove cached repo object, dirstate may change - self.cacherepo = None - self.cacheroot = None + def _buildMenu(self, menus): + '''Build one level of a menu''' + items = [] + if self.files: + passcwd = None + else: #bg + passcwd = self.cwd + for menu_info in menus: + idstr = 'HgNautilus::%02d%s' % (self.pos, menu_info.hgcmd) + self.pos += 1 + if menu_info.isSep(): + # can not insert a separator till now + pass + elif menu_info.isSubmenu(): + if hasattr(nautilus, 'Menu'): + item = nautilus.MenuItem(idstr, menu_info.menutext, + menu_info.helptext) + submenu = nautilus.Menu() + item.set_submenu(submenu) + for subitem in self._buildMenu(menu_info.get_menus()): + submenu.append_item(subitem) + items.append(item) + else: #submenu not suported + for subitem in self._buildMenu(menu_info.get_menus()): + items.append(subitem) + else: + if menu_info.state: + item = nautilus.MenuItem(idstr, + menu_info.menutext, + menu_info.helptext, + self.icon(menu_info.icon)) + item.connect('activate', self.run_dialog, menu_info.hgcmd, + passcwd) + items.append(item) + return items     def get_background_items(self, window, vfs_file):   '''Build context menu for current directory''' - mainitem = nautilus.MenuItem('HgNautilus', 'Mercurial', '') - submenu = nautilus.Menu() - mainitem.set_submenu(submenu) - - path = self.get_path_for_vfs_file(vfs_file) - if path is None: - return - - repo = self.get_repo_for_path(path) - if repo is None: - ''' The name given to nautilus.MenuItem decides the - of the menu, which is ordered alpahbetically ''' - item = nautilus.MenuItem('HgNautilus::newtree', - 'Create New Repository', - 'Make directory versioned', - self.icon('menucreaterepos.ico')) - item.connect('activate', self._init_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::clone', - 'Create Clone', - 'Create clone here from source', - self.icon('menuclone.ico')) - item.connect('activate', self._clone_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::99about', - 'About TortoiseHg', - 'Information about TortoiseHg installation', - self.icon('menuabout.ico')) - item.connect('activate', self._about_cb, vfs_file) - submenu.append_item(item) - - return mainitem, - - if len(repo.changectx(None).parents()) > 1: - self.rev0 = repo.changectx(None).parents()[0].rev() - item = nautilus.MenuItem('HgNautilus::undomerge', - 'Undo Merge', - 'Clean checkout of original parent revision', - self.icon('menuunmerge.ico')) - item.connect('activate', self._unmerge_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::10commit', - 'Commit', - 'Commit changes', - self.icon('menucommit.ico')) - item.connect('activate', self._commit_cb, [vfs_file]) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::20status', - 'Show Status', - 'Show Repository Status', - self.icon('menushowchanged.ico')) - item.connect('activate', self._status_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::30diff', - 'Visual Diff', - 'Show Changes to Repository', - self.icon('menudiff.ico')) - item.connect('activate', self._diff_cb, [vfs_file]) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::40dag', - 'Revision History', - 'Show revision DAG', - self.icon('menurevisiongraph.ico')) - item.connect('activate', self._history_cb, [vfs_file]) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::50datamine', - 'Data Mining', - 'Search revision history', - self.icon('menulog.ico')) - item.connect('activate', self._datamine_cb, [vfs_file]) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::60sync', - 'Synchronize', - 'Sync with another repository', - self.icon('menusynch.ico')) - item.connect('activate', self._sync_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::70serve', - 'Web Server', - 'Start internal web server', - self.icon('proxy.ico')) - item.connect('activate', self._serve_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::75recover', - 'Recovery', - 'General repair and recovery of repository', - self.icon('general.ico')) - item.connect('activate', self._recovery_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::80repoconfig', - 'Repository Settings', - 'Configure Mercurial settings for this repo', - self.icon('menusettings.ico')) - item.connect('activate', self._thgconfig_repo_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::85userconfig', - 'User-Global Settings', - 'Configure global Mercurial settings', - self.icon('menusettings.ico')) - item.connect('activate', self._thgconfig_user_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::99about', - 'About TortoiseHg', - 'Information about TortoiseHg installation', - self.icon('menuabout.ico')) - item.connect('activate', self._about_cb, vfs_file) - submenu.append_item(item) - - return mainitem, + if vfs_file and self.menu: + return self.buildMenu([vfs_file], True) + else: + self.files = []     def get_file_items(self, window, vfs_files): - mainitem = nautilus.MenuItem('HgNautilus', 'Mercurial', '') - submenu = nautilus.Menu() - mainitem.set_submenu(submenu) - - '''Build context menu for selected files''' - if not vfs_files: - return None - - vfs_file = vfs_files[0] - path = self.get_path_for_vfs_file(vfs_file) - repo = self.get_repo_for_path(path) - if repo is None: - if not vfs_file.is_directory(): - return None - - # Menu for unrevisioned subdirectory - name = vfs_files[0].get_name() - item = nautilus.MenuItem('HgNautilus::10newtree', - 'Make directory versioned', - 'Create Repository in %s' % name, - self.icon('menucreaterepos.ico')) - item.connect('activate', self._init_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::20clone', - 'Create clone from source', - 'Create Clone in %s' % name, - self.icon('menuclone.ico')) - item.connect('activate', self._clone_cb, vfs_file) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::99about', - 'About TortoiseHg', - 'Information about TortoiseHg installation', - self.icon('menuabout.ico')) - item.connect('activate', self._about_cb, vfs_file) - submenu.append_item(item) - - return mainitem, - - localpaths = [] - for vfs_file in vfs_files: - path = self.get_path_for_vfs_file(vfs_file) - if path is None: - continue - localpath = path[len(repo.root)+1:] - localpaths.append(localpath) - - if not localpaths: - return - path = localpaths[0] - cwd = os.path.isdir(path) and path or os.path.dirname(path) - matcher = match.exact(repo.root, cwd, localpaths) - changes = repo.dirstate.status(matcher, True, True, True) - (lookup, modified, added, removed, deleted, unknown, - ignored, clean) = changes - - # Add menu items based on states list - if unknown: - item = nautilus.MenuItem('HgNautilus::30add', - 'Add Files', - 'Add unversioned files', - self.icon('menuadd.ico')) - item.connect('activate', self._add_cb, vfs_files) - submenu.append_item(item) - - if modified or added or removed or deleted or unknown: - item = nautilus.MenuItem('HgNautilus::40commit', - 'Commit Files', - 'Commit changes', - self.icon('menucommit.ico')) - item.connect('activate', self._commit_cb, vfs_files) - submenu.append_item(item) - - item = nautilus.MenuItem('HgNautilus::50revert', - 'Undo Changes', - 'Revert changes to files', - self.icon('menurevert.ico')) - item.connect('activate', self._revert_cb, vfs_files) - submenu.append_item(item) - - if modified or clean: - item = nautilus.MenuItem('HgNautilus::60log', - 'File Changelog', - 'Show file revision history', - self.icon('menulog.ico')) - item.connect('activate', self._history_cb, vfs_files) - item = nautilus.MenuItem('HgNautilus::annotate', - 'Annotate File', - 'Annotate file at current revision', - self.icon('menulog.ico')) - item.connect('activate', self._datamine_cb, vfs_files) - submenu.append_item(item) - - - if modified: - item = nautilus.MenuItem('HgNautilus::70diff', - 'File Diffs', - 'Show file changes', - self.icon('menudiff.ico')) - item.connect('activate', self._diff_cb, vfs_files) - submenu.append_item(item) - - return mainitem, + '''Build context menu for selected files/directories''' + if vfs_files and self.menu: + return self.buildMenu(vfs_files, False)     def get_columns(self):   return nautilus.Column("HgNautilus::80hg_status", @@ -436,64 +217,52 @@
  "Version control status"),     def _get_file_status(self, repo, localpath): - emblem = None - status = '?' - - # This is not what the API is optimized for, but this appears - # to work efficiently enough - matcher = match.always(repo.root, localpath) - changes = repo.dirstate.status(matcher, True, True, True) - (lookup, modified, added, removed, deleted, unknown, - ignored, clean) = changes - - if localpath in clean: - emblem = 'default' - status = 'clean' - elif localpath in modified: - emblem = 'cvs-modified' - status = 'modified' - elif localpath in added: - emblem = 'cvs-aded' - status = 'added' - elif localpath in unknown: - emblem = 'new' - status = 'unrevisioned' - elif localpath in ignored: - status = 'ignored' - elif localpath in deleted: - # Should be hard to reach this state - emblem = 'stockmail-priority-high' - status = 'deleted' + from thgutil import cachethg + cachestate = cachethg.get_state(localpath, repo) + cache2state = {cachethg.UNCHANGED: ('default', 'clean'), + cachethg.ADDED: ('cvs-added', 'added'), + cachethg.MODIFIED: ('cvs-modified', 'modified'), + cachethg.UNKNOWN: ('new', 'unrevisioned'), + cachethg.IGNORED: (None, 'ignored'), + cachethg.NOT_IN_REPO: (None, ''), + cachethg.ROOT: ('generic', 'root'), + cachethg.UNRESOLVED: ('cvs-confilict', 'unresolved')} + emblem, status = cache2state.get(cachestate, (None, '?'))   return emblem, status   + def update_file_info(self, file): + '''Queue file for emblem and hg status update''' + self.scanStack.append(file) + if len(self.scanStack) == 1: + gobject.idle_add(self.fileinfo_on_idle)   - def update_file_info(self, file): - '''Return emblem and hg status for this file''' - path = self.get_path_for_vfs_file(file) - if path is None or file.is_directory(): - return - repo = self.get_repo_for_path(path) - if repo is None: - return - localpath = path[len(repo.root)+1:] - emblem, status = self._get_file_status(repo, localpath) + def fileinfo_on_idle(self): + '''Update emblem and hg status for files when there is time''' + if not self.scanStack: + return False + vfs_file = self.scanStack.pop() + path = self.get_path_for_vfs_file(vfs_file) + if not path: + return True + emblem, status = self._get_file_status(self.cacherepo, path)   if emblem is not None: - file.add_emblem(emblem) - file.add_string_attribute('hg_status', status) + vfs_file.add_emblem(emblem) + vfs_file.add_string_attribute('hg_status', status) + return True     # property page borrowed from http://www.gnome.org/~gpoo/hg/nautilus-hg/ - def __add_row(self, table, row, label_item, label_value): + def __add_row(self, row, label_item, label_value):   label = gtk.Label(label_item)   label.set_use_markup(True)   label.set_alignment(1, 0) - table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL, 0, 0) + self.table.attach(label, 0, 1, row, row + 1, gtk.FILL, gtk.FILL, 0, 0)   label.show()     label = gtk.Label(label_value)   label.set_use_markup(True)   label.set_alignment(0, 1)   label.show() - table.attach(label, 1, 2, row, row + 1, gtk.FILL, 0, 0, 0) + self.table.attach(label, 1, 2, row, row + 1, gtk.FILL, 0, 0, 0)     def get_property_pages(self, vfs_files):   if len(vfs_files) != 1: @@ -505,12 +274,11 @@
  repo = self.get_repo_for_path(path)   if repo is None:   return -   localpath = path[len(repo.root)+1:] - emblem, status = self._get_file_status(repo, localpath) + emblem, status = self._get_file_status(repo, path)     # Get the information from Mercurial - ctx = repo.changectx(None).parents()[0] + ctx = repo['.']   try:   fctx = ctx.filectx(localpath)   rev = fctx.filelog().linkrev(fctx.filerev()) @@ -528,22 +296,21 @@
    self.property_label = gtk.Label('Mercurial')   - table = gtk.Table(7, 2, False) - table.set_border_width(5) - table.set_row_spacings(5) - table.set_col_spacings(5) + self.table = gtk.Table(7, 2, False) + self.table.set_border_width(5) + self.table.set_row_spacings(5) + self.table.set_col_spacings(5)   - self.__add_row(table, 0, '<b>Status</b>:', status) - self.__add_row(table, 1, '<b>Last-Commit-Revision</b>:', str(rev)) - self.__add_row(table, 2, '<b>Last-Commit-Description</b>:', description) - self.__add_row(table, 3, '<b>Last-Commit-Date</b>:', date) - self.__add_row(table, 4, '<b>Last-Commit-User</b>:', user) + self.__add_row(0, '<b>Status</b>:', status) + self.__add_row(1, '<b>Last-Commit-Revision</b>:', str(rev)) + self.__add_row(2, '<b>Last-Commit-Description</b>:', description) + self.__add_row(3, '<b>Last-Commit-Date</b>:', date) + self.__add_row(4, '<b>Last-Commit-User</b>:', user)   if tags: - self.__add_row(table, 5, '<b>Tags</b>:', tags) + self.__add_row(5, '<b>Tags</b>:', tags)   if branch != 'default': - self.__add_row(table, 6, '<b>Branch</b>:', branch) + self.__add_row(6, '<b>Branch</b>:', branch)   - table.show() - + self.table.show()   return nautilus.PropertyPage("MercurialPropertyPage::status", - self.property_label, table), + self.property_label, self.table),
Change 1 of 1 Show Entire File contrib/​win32/​__paths__.py Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,27 @@
+""" +__paths__.py + Copyright (C) 2009 Steve Borho <steve@borho.org> + +This software may be used and distributed according to the terms +of the GNU General Public License, incorporated herein by reference. +""" + +# This version of __paths__.py is used in the binary installer +# distributions of TortoiseHg on Windows. Since we no longer need to +# worry about Python shell extensions, we can use the path of the +# current executable to find our package data. + +import os +import win32api, win32process + +proc = win32api.GetCurrentProcess() +try: + # This will fail on windows < NT + procpath = win32process.GetModuleFileNameEx(proc, 0) +except: + procpath = win32api.GetModuleFileName(0) + +bin_path = os.path.dirname(procpath) +license_path = os.path.join(bin_path, 'COPYING.txt') +locale_path = os.path.join(bin_path, 'locale') +icon_path = os.path.join(bin_path, 'icons')
Change 1 of 1 Show Entire File contrib/​win32/​mercurial.ini Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,188 @@
+; System-wide Mercurial config file. + +; +; !!! Do Not Edit This File !!! +; +; This file is intended to be replaced by the installer on every upgrade. +; Editing this file can cause strange side effects on Vista. +; +; http://bitbucket.org/tortoisehg/stable/issue/135 +; +; To change settings you see in this file, override (or enable) them in +; your user Mercurial.ini file. See the hgrc man page for details. +; + +[ui] +; editor used to enter commit logs, etc. Most any text editor +; will suffice. +editor = notepad + +; In order to push/pull over ssh you must specify a ssh tool +ssh = "{app}\TortoisePlink.exe" -ssh -2 +;ssh = C:\cygwin\bin\ssh + +[merge-tools] +kdiff3.priority=-1 +kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output +kdiff3.regkey=Software\KDiff3 +kdiff3.regappend=\kdiff3.exe +kdiff3.fixeol=True +kdiff3.gui=True +beyondcompare3.priority=-2 +beyondcompare3.args=$local $other $base $output /ro /lefttitle=local /centertitle=base /righttitle=other /automerge /reviewconflicts /solo +beyondcompare3.regkey=Software\Scooter Software\Beyond Compare 3 +beyondcompare3.regname=ExePath +beyondcompare3.gui=True +diffmerge.priority=-7 +diffmerge.args=--nosplash --merge --title1=base --title2=local --title3=other $base $local $other +diffmerge.checkchanged=True +diffmerge.gui=True +p4merge.priority=-8 +p4merge.args=$base $local $other $output +p4merge.regkey=Software\Perforce\Environment +p4merge.regname=P4INSTROOT +p4merge.regappend=\p4merge.exe +p4merge.gui=True +tortoisemerge.priority=-9 +tortoisemerge.args=/base:$output /mine:$local /theirs:$other /merged:$output +tortoisemerge.regkey=Software\TortoiseSVN +tortoisemerge.gui=True +winmergeu.regkey=Software\Thingamahoochie\WinMerge\ +winmergeu.regname=Executable +winmergeu.priority=-10 +winmergeu.args=/e /ub /dl other /dr local $other $local $output +winmergeu.fixeol=True +winmergeu.gui=True + +; +; For more information about mercurial extensions, start here +; http://www.selenic.com/mercurial/wiki/index.cgi/UsingExtensions +; + +[extensions] +; extensions shipped with Mercurial by default +; +;acl = +;alias = +;bookmarks = +;bugzilla = +;children = +;churn = +; Warning: the color extension is not recommended for Windows +;color = +;convert = +extdiff = +;fetch = +;gpg = +;graphlog = +;hgcia = +;hgk = +;highlight = +;interhg = +;keyword = +;mq = +;notify = +;pager = +;parentrevspec = +;patchbomb = +;purge = +;rebase = +;record = +;transplant = +;win32mbcs = +;win32text = +;zeroconf = +; +; extra extensions provided by TortoiseHg +; +;qct = +;forest = +thgstatus = + +; To use cleverencode/cleverdecode, you must enable win32text extension +; +; By default, we try to encode and decode all files that do not +; contain ASCII NUL characters. What this means is that we try to set +; line endings to Windows style on update, and to Unix style on +; commit. This lets us cooperate with Linux and Unix users, so +; everybody sees files with their native line endings. + +[encode] +; Encode files that don't contain NUL characters. + +; ** = cleverencode: + +; Alternatively, you can explicitly specify each file extension that +; you want encoded (any you omit will be left untouched), like this: + +; *.txt = dumbencode: + + +[decode] +; Decode files that don't contain NUL characters. + +; ** = cleverdecode: + +; Alternatively, you can explicitly specify each file extension that +; you want decoded (any you omit will be left untouched), like this: + +; **.txt = dumbdecode: + + +; +; Define external diff commands +; +[extdiff] +cmd.vdiff = {app}\kdiff3 +;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe +;cmd.vimdiff = gvim.exe +;opts.vimdiff = -f '+next' '+execute "DirDiff ".argv(0)." ".argv(1)' + +[qct] +;See http://bitbucket.org/tortoisehg/stable/wiki/FAQ for details +;path="C:\Program Files\qct\qct.exe" + +[hgk] +;See http://bitbucket.org/tortoisehg/stable/wiki/FAQ for details +;path={app}\scripts\hgk.cmd +;vdiff=vdiff + +; +; The git extended diff format will properly store binary files, +; file permission changes, and rename information that the normal +; patch format cannot cover. However it is also not 100% compatible +; with tools which expect normal patches. so enable these at your +; own risk. +; +[diff] +;git = false +;nodates = false + +; +; Some optional defaults +; +[defaults] +;view = --limit 100 +;log = --limit 100 +;revert = --no-backup +;log = --style=changelog + +; +; Keyword extension example configuration. To use, one must +; enable the keyword extension, then uncomment and modify these +; two sections. Before using the keyword extension, be sure to +; thoroughly read it's documentation and understand how it works, +; and why it is not a core feature of Mercurial. +; +; http://www.selenic.com/mercurial/wiki/index.cgi/KeywordExtension +; http://www.selenic.com/mercurial/wiki/index.cgi/KeywordPlan +; +; If you encounter strange problems using Mercurial, a good first +; debugging step would be to disable this extension. +; +[keyword] +; expand keywords in all python files in working dir +;**.py = + +[keywordmaps] +; See documentation for examples
Change 1 of 1 Show Entire File contrib/​win32/​mercurial.iss Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,192 @@
+; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +[Setup] +AppCopyright=Copyright 2005-2009 Matt Mackall and others +AppName=TortoiseHg +AppVerName=TortoiseHg-0.8 +InfoAfterFile=contrib/win32/postinstall.txt +LicenseFile=COPYING.txt +ShowLanguageDialog=yes +AppPublisher=Steve Borho and others +AppPublisherURL=http://bitbucket.org/tortoisehg/stable/ +AppSupportURL=http://bitbucket.org/tortoisehg/stable/ +AppUpdatesURL=http://bitbucket.org/tortoisehg/stable/ +AppID=TortoiseHg +AppContact=teekaysoh@gmail.com +OutputBaseFilename=TortoiseHg-0.8 +DefaultDirName={pf}\TortoiseHg +SourceDir=..\.. +VersionInfoDescription=Mercurial distributed SCM +VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others +VersionInfoCompany=Matt Mackall and others +InternalCompressLevel=max +SolidCompression=true +SetupIconFile=..\icons\hgicon.ico +UninstallDisplayIcon={app}\hgicon.ico +WizardImageFile=..\icons\install-wizard.bmp +WizardImageStretch=no +WizardImageBackColor=$ffffff +WizardSmallImageFile=..\icons\install-wizard-small.bmp +AllowNoIcons=true +DefaultGroupName=TortoiseHg +PrivilegesRequired=poweruser +AlwaysRestart=yes +SetupLogging=yes + +[Files] +Source: contrib\mercurial.el; DestDir: {app}/contrib +Source: contrib\vim\*.*; DestDir: {app}/contrib/vim +Source: contrib\zsh_completion; DestDir: {app}/contrib +Source: contrib\hgk; DestDir: {app}/contrib +Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme +Source: {app}\Mercurial.ini; DestDir: {app}\backup; Flags: external skipifsourcedoesntexist uninsneveruninstall +Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; AfterInstall: FileExpandString('{app}\Mercurial.ini') +Source: ReleaseNotes.txt; DestDir: {app}; DestName: ReleaseNotes.txt +Source: ..\contrib\*.exe; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete +Source: ..\contrib\TortoiseOverlays\*.*; DestDir: {app}/TortoiseOverlays; +Source: dist\*.exe; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete +Source: win32\shellext\THgShell.dll; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete +Source: dist\*.dll; DestDir: {app}; Flags: ignoreversion restartreplace uninsrestartdelete +Source: dist\library.zip; DestDir: {app} +Source: doc\*.html; DestDir: {app}\docs +Source: icons\*; DestDir: {app}\icons; Flags: ignoreversion recursesubdirs createallsubdirs +Source: dist\gtk\*; DestDir: {app}\gtk; Flags: ignoreversion recursesubdirs createallsubdirs +Source: templates\*.*; DestDir: {app}\templates; Flags: recursesubdirs createallsubdirs +Source: locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs +Source: i18n\*.*; DestDir: {app}\i18n; Flags: +Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt +Source: COPYING.txt; DestDir: {app}; DestName: Copying.txt +Source: ..\icons\hgicon.ico; DestDir: {app} +Source: ..\files\gtkrc; DestDir: {app}\gtk\etc\gtk-2.0; AfterInstall: EditOptions() + +[INI] +Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/ +Filename: {app}\TortoiseHg.url; Section: InternetShortcut; Key: URL; String: http://bitbucket.org/tortoisehg/stable/ + +[Icons] +Name: {group}\TortoiseHg Web Site; Filename: {app}\TortoiseHg.url +Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url +Name: {group}\Mercurial Command Reference; Filename: {app}\docs\hg.1.html +Name: {group}\Uninstall TortoiseHg; Filename: {uninstallexe} + +[Run] +Filename: {app}\add_path.exe; Parameters: {app}; StatusMsg: Adding the installation path to the search path... +Filename: msiexec.exe; Parameters: "/i ""{app}\TortoiseOverlays\TortoiseOverlays-1.0.4.11886-win32.msi"" /qn /norestart ALLUSERS=1"; StatusMsg: Installing TortoiseOverlays.dll ... + +[UninstallRun] +Filename: {app}\add_path.exe; Parameters: /del {app} + +[UninstallDelete] +Type: files; Name: {app}\Mercurial.url +Type: files; Name: {app}\TortoiseHg.url + +[Registry] +Root: HKLM; Subkey: Software\TortoiseHg; Flags: uninsdeletekey; ValueData: {app} +Root: HKLM; Subkey: Software\Mercurial; Flags: uninsdeletekey; ValueData: {app}\Mercurial.ini + +[Code] +procedure FileExpandString(fn: String); +var + InFile: String; + i: Integer; + InFileLines: TArrayOfString; +begin + InFile := ExpandConstant(fn); + LoadStringsFromFile(InFile, InFileLines); + for i:= 0 to GetArrayLength(InFileLines)-1 do + InFileLines[i] := ExpandConstant(InFileLines[i]); + SaveStringsToFile(InFile, InFileLines, False); +end; + +var ThemePage: TInputOptionWizardPage; +var IsUpgrade: Boolean; + +procedure InitializeWizard; +begin + ThemePage := CreateInputOptionPage(wpSelectComponents, + 'Theme Selection', '', + 'Please select a theme, then click Next.', + True, False); + ThemePage.Add('Neutrino (recommended, especially on Vista)'); + ThemePage.Add('Brushed'); + ThemePage.Add('Blue-Steel'); + ThemePage.Add('MS-Windows (original)'); + + case GetPreviousData('Theme', '') of + 'Neutrino': ThemePage.SelectedValueIndex := 0; + 'Brushed': ThemePage.SelectedValueIndex := 1; + 'Blue-Steel': ThemePage.SelectedValueIndex := 2; + 'MS-Windows': ThemePage.SelectedValueIndex := 3; + else + ThemePage.SelectedValueIndex := 0; + end; +end; + +procedure RegisterPreviousData(PreviousDataKey: Integer); +var + Theme: String; +begin + { Store the settings so we can restore them next time } + case ThemePage.SelectedValueIndex of + 0: Theme := 'Neutrino'; + 1: Theme := 'Brushed'; + 2: Theme := 'Blue-Steel'; + 3: Theme := 'MS-Windows'; + end; + SetPreviousData(PreviousDataKey, 'Theme', Theme); +end; + +procedure SetCommentMarker(var lines: TArrayOfString; option: String; selected: boolean); +var + i : integer; +begin + if selected then exit; + for i := 0 to pred(GetArrayLength(lines)) do + if pos(option, lines[i]) > 0 then + begin + lines[i][1] := '#'; + end; +end; + +procedure EditOptions(); +var + lines : TArrayOfString; + filename : String; +begin + filename := ExpandConstant(CurrentFilename); + LoadStringsFromFile(filename, lines); + + SetCommentMarker(lines, 'gtk-theme-name = "Neutrino"', ThemePage.SelectedValueIndex = 0); + SetCommentMarker(lines, 'gtk-theme-name = "Brushed"', ThemePage.SelectedValueIndex = 1); + SetCommentMarker(lines, 'gtk-theme-name = "Blue-Steel"', ThemePage.SelectedValueIndex = 2); + SetCommentMarker(lines, 'gtk-theme-name = "MS-Windows"', ThemePage.SelectedValueIndex = 3); + + SaveStringsToFile(filename, lines, False); +end; + +function InitializeSetup(): Boolean; +var + ThgSwReg: String; +begin + Result := True; + + {abort installation if TortoiseHg 0.4 or earlier is installed} + if RegQueryStringValue(HKLM, 'Software\TortoiseHg', '', ThgSwReg) then + begin + IsUpgrade := True; + end; +end; + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + { Skip wpSelectDir page if upgrading; show all others } + case PageID of + wpSelectDir: + Result := IsUpgrade; + else + Result := False; + end; +end; + +#include "registry.iss"
Change 1 of 1 Show Entire File contrib/​win32/​registry.iss Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,55 @@
+[Registry] + +; register TortoiseHg config info +Root: HKLM; Subkey: Software\TortoiseHgShell; Flags: uninsdeletekey +Root: HKLM; Subkey: Software\TortoiseHgShell; ValueType: string; ValueName: ; ValueData: {app} +Root: HKLM; Subkey: Software\TortoiseHg; Flags: uninsdeletekey +Root: HKLM; Subkey: Software\TortoiseHg; ValueType: string; ValueName: ; ValueData: {app} + +; Icon handler COM controls +Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; Flags: uninsdeletekey +Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueType: string; ValueName: ; ValueData: TortoiseHg +Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ; ValueData: {app}\THgShell.dll +Root: HKCR; Subkey: CLSID\{{B456DBA0-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment + +Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; Flags: uninsdeletekey +Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueType: string; ValueName: ; ValueData: TortoiseHg +Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ; ValueData: {app}\THgShell.dll +Root: HKCR; Subkey: CLSID\{{B456DBA1-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment + +Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; Flags: uninsdeletekey +Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueType: string; ValueName: ; ValueData: TortoiseHg +Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ; ValueData: {app}\THgShell.dll +Root: HKCR; Subkey: CLSID\{{B456DBA2-7BF4-478c-937A-05130C2C212E}\InProcServer32; ValueType: string; ValueName: ThreadingModel; ValueData: Apartment + +; The actual icon overlay handlers for Explorer +Root: HKLM; Subkey: Software\TortoiseOverlays\Normal; ValueType: string; ValueName: TortoiseHg; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} +Root: HKLM; Subkey: Software\TortoiseOverlays\Added; ValueType: string; ValueName: TortoiseHg; ValueData: {{B456DBA1-7BF4-478c-937A-05130C2C212E} +Root: HKLM; Subkey: Software\TortoiseOverlays\Modified; ValueType: string; ValueName: TortoiseHg; ValueData: {{B456DBA2-7BF4-478c-937A-05130C2C212E} + +; Make them approved by administrator +Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved; ValueType: string; ValueName: {{B456DBA0-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: uninsdeletevalue +Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved; ValueType: string; ValueName: {{B456DBA1-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: uninsdeletevalue +Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved; ValueType: string; ValueName: {{B456DBA2-7BF4-478c-937A-05130C2C212E}; ValueData: TortoiseHg; Flags: uninsdeletevalue + +; Context menu handlers +Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: Directory\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +Root: HKCR; Subkey: Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: Directory\Background\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: Drive\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: Folder\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: *\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +Root: HKCR; Subkey: InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +Root: HKCR; Subkey: InternetShortcut\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E} + +;Root: HKCR; Subkey: lnkfile\shellex\ContextMenuHandlers\TortoiseHgCMenu; Flags: uninsdeletekey +;Root: HKCR; Subkey: lnkfile\shellex\ContextMenuHandlers\TortoiseHgCMenu; ValueType: string; ValueName: ; ValueData: {{B456DBA0-7BF4-478c-937A-05130C2C212E}
Change 1 of 1 Show Entire File contrib/​win32/​setup.cfg Stacked
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
@@ -0,0 +1,10 @@
+[py2exe] +excludes=pywin, pywin.dialogs, pywin.dialogs.list, PyQt, PyQt4.QtCode, PyQt4.QtGui +includes=cairo, pango, pangocairo, atk, gobject, dbhash +packages=email, hgext, hgext.convert, encodings, hggtk, hggtk.logview, thgutil, thgutil.iniparse + +dll_excludes=iconv.dll, intl.dll, libatk-1.0-0.dll, libgdk_pixbuf-2.0-0.dll, libgdk-win32-2.0-0.dll, libglib-2.0-0.dll, libgmodule-2.0-0.dll, libgobject-2.0-0.dll, libgthread-2.0-0.dll, libgtk-win32-2.0-0.dll, libpango-1.0-0.dll, libpangowin32-1.0-0.dll, libcairo-2.dll, libglade-2.0-0.dll, libpangocairo-1.0-0.dll, libpangoft2-1.0-0.dll + + +[build] +compiler=mingw32
Change 1 of 1 Show Entire File contrib/​win32/​setup.py Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
@@ -0,0 +1,240 @@
+#!/usr/bin/env python +# +# This is the mercurial setup script. +# +# 'python setup.py install', or +# 'python setup.py --help' for more options + +import sys +if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'): + raise SystemExit("Mercurial requires python 2.3 or later.") + +# Solaris Python packaging brain damage +try: + import hashlib + sha = hashlib.sha1() +except: + try: + import sha + except: + raise SystemExit( + "Couldn't import standard hashlib (incomplete Python install).") + +try: + import zlib +except: + raise SystemExit( + "Couldn't import standard zlib (incomplete Python install).") + +import os, time +import shutil +import tempfile +from distutils.core import setup, Extension +from distutils.dist import Distribution +from distutils.command.install_data import install_data +from distutils.command.build import build +from distutils.command.build_py import build_py +from distutils.spawn import spawn, find_executable +from distutils.ccompiler import new_compiler + +extra = {} +scripts = ['hg'] +if os.name == 'nt': + scripts.append('contrib/win32/hg.bat') + +# simplified version of distutils.ccompiler.CCompiler.has_function +# that actually removes its temporary files. +def has_function(cc, funcname): + tmpdir = tempfile.mkdtemp(prefix='hg-install-') + devnull = oldstderr = None + try: + try: + fname = os.path.join(tmpdir, 'funcname.c') + f = open(fname, 'w') + f.write('int main(void) {\n') + f.write(' %s();\n' % funcname) + f.write('}\n') + f.close() + # Redirect stderr to /dev/null to hide any error messages + # from the compiler. + # This will have to be changed if we ever have to check + # for a function on Windows. + devnull = open('/dev/null', 'w') + oldstderr = os.dup(sys.stderr.fileno()) + os.dup2(devnull.fileno(), sys.stderr.fileno()) + objects = cc.compile([fname]) + cc.link_executable(objects, os.path.join(tmpdir, "a.out")) + except: + return False + return True + finally: + if oldstderr is not None: + os.dup2(oldstderr, sys.stderr.fileno()) + if devnull is not None: + devnull.close() + shutil.rmtree(tmpdir) + +# py2exe needs to be installed to work +try: + import py2exe + + # Help py2exe to find win32com.shell + try: + import modulefinder + import win32com + for p in win32com.__path__[1:]: # Take the path to win32comext + modulefinder.AddPackagePath("win32com", p) + pn = "win32com.shell" + __import__(pn) + m = sys.modules[pn] + for p in m.__path__[1:]: + modulefinder.AddPackagePath(pn, p) + except ImportError: + pass + + extra['console'] = ['hg', 'hgtk'] +except ImportError: + pass + +try: + from mercurial.__version__ import version +except ImportError: + version = 'unknown' + +class install_package_data(install_data): + def finalize_options(self): + self.set_undefined_options('install', + ('install_lib', 'install_dir')) + install_data.finalize_options(self) + +class build_mo(build): + + description = "build translations (.mo files)" + + def run(self): + if not find_executable('msgfmt'): + self.warn("could not find msgfmt executable, no translations " + "will be built") + return + + podir = 'i18n' + if not os.path.isdir(podir): + self.warn("could not find %s/ directory" % podir) + return + + join = os.path.join + for po in os.listdir(podir): + if not po.endswith('.po'): + continue + pofile = join(podir, po) + modir = join('locale', po[:-3], 'LC_MESSAGES') + mofile = join(modir, 'hg.mo') + cmd = ['msgfmt', '-v', '-o', mofile, pofile] + if sys.platform != 'sunos5': + # msgfmt on Solaris does not know about -c + cmd.append('-c') + self.mkpath(modir) + self.make_file([pofile], mofile, spawn, (cmd,)) + self.distribution.data_files.append((join('mercurial', modir), + [mofile])) + +class build_shellext(build): + description = "Build TortoiseHg shell extensions" + + def run(self): + cwd = os.getcwd() + os.chdir("win32/shellext") + os.environ["DEBUG"] = "1" + os.system("mingw32-make") + os.chdir(cwd) + +build.sub_commands.append(('build_mo', None)) +build.sub_commands.append(('build_shellext', None)) + +Distribution.pure = 0 +Distribution.global_options.append(('pure', None, "use pure (slow) Python " + "code instead of C extensions")) + +class hg_build_py(build_py): + + def finalize_options(self): + build_py.finalize_options(self) + + if self.distribution.pure: + if self.py_modules is None: + self.py_modules = [] + for ext in self.distribution.ext_modules: + if ext.name.startswith("mercurial."): + self.py_modules.append("mercurial.pure.%s" % ext.name[10:]) + self.distribution.ext_modules = [] + + def find_modules(self): + modules = build_py.find_modules(self) + for module in modules: + if module[0] == "mercurial.pure": + if module[1] != "__init__": + yield ("mercurial", module[1], module[2]) + else: + yield module + +cmdclass = {'install_data': install_package_data, + 'build_mo': build_mo, + 'build_py': hg_build_py, + 'build_shellext' : build_shellext} + +ext_modules=[ + Extension('mercurial.base85', ['mercurial/base85.c']), + Extension('mercurial.bdiff', ['mercurial/bdiff.c']), + Extension('mercurial.diffhelpers', ['mercurial/diffhelpers.c']), + Extension('mercurial.mpatch', ['mercurial/mpatch.c']), + Extension('mercurial.parsers', ['mercurial/parsers.c']), + ] + +packages = ['mercurial', 'mercurial.hgweb', 'hgext', 'hgext.convert', + 'hgext.highlight', 'hgext.zeroconf', 'hggtk', + 'hggtk.logview', 'thgutil', 'thgutil.iniparse'] + +try: + import msvcrt + ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) +except ImportError: + pass + +try: + import posix + ext_modules.append(Extension('mercurial.osutil', ['mercurial/osutil.c'])) + + if sys.platform == 'linux2' and os.uname()[2] > '2.6': + # The inotify extension is only usable with Linux 2.6 kernels. + # You also need a reasonably recent C library. + cc = new_compiler() + if has_function(cc, 'inotify_add_watch'): + ext_modules.append(Extension('hgext.inotify.linux._inotify', + ['hgext/inotify/linux/_inotify.c'])) + packages.extend(['hgext.inotify', 'hgext.inotify.linux']) +except ImportError: + pass + +datafiles = [] +for root in ('templates', 'i18n'): + for dir, dirs, files in os.walk(root): + datafiles.append((os.path.join('mercurial', dir), + [os.path.join(dir, file_) for file_ in files])) + +setup(name='mercurial', + version=version, + author='Matt Mackall', + author_email='mpm@selenic.com', + url='http://selenic.com/mercurial', + description='Scalable distributed SCM', + license='GNU GPL', + scripts=scripts, + packages=packages, + ext_modules=ext_modules, + data_files=datafiles, + cmdclass=cmdclass, + options=dict(bdist_mpkg=dict(zipdist=True, + license='COPYING', + readme='contrib/macosx/Readme.html', + welcome='contrib/macosx/Welcome.html')), + **extra)
Change 1 of 1 Show Entire File hgext/​refreshicons.cmd Stacked
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
@@ -0,0 +1,7 @@
+@echo off + +:: calls hg thgstatus for all directories in current dir + +for /F "tokens=*" %%G in ('dir /b /A:D') do ( + echo %%G + hg -R %%G thgstatus)
Change 1 of 1 Show Entire File hgext/​thgstatus.py Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@@ -0,0 +1,102 @@
+# thgstatus.py - TortoiseHg status cache extension for Mercurial +# +# Copyright (C) 2009 Adrian Buehlmann +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +from mercurial.i18n import _ +from mercurial import commands +import os +import time + +def cachefilepath(repo): + return repo.root + "/.hg/thgstatus" + +def dirname(f): + return '/'.join(f.split('/')[:-1]) + +def showentry(f, e): + f("%s %s\n" % (e[0], e[1:-1])) + +def thgstatus(ui, repo, **opts): + '''update directory status cache for TortoiseHg + + Caches the information provided by 'hg status' in the file .hg/thgstatus + which can then be used by the TortoiseHg shell extension to display + overlay icons for directories. + + The file .hg/thgstatus contains one line for each directory that has + removed, modified or added files (in that order of preference). Each line + consists of one char for the status of the directory (r, m or a), followed + by the relative path of the directory in the repo. + If the file is empty, then the repo is clean. + + Specify --delay to wait until the system clock ticks to the next second + before accessing the dirstate. This is useful when the dirstate contains + unset entries (in output of "hg debugstate"). unset entries happen if the + dirstate was updated within the same second as the respective file in the + working tree was updated. This happens with a high probability for example + when cloning a repo. The TortoiseHg shell extension will display unset + dirstate entries as (potentially false) modified. Specifying --delay ensures + that there are no unset entries in the dirstate. + ''' + + if opts.get('remove'): + try: + os.remove(cachefilepath(repo)) + except OSError: + pass + return + + if opts.get('show'): + try: + f = open(cachefilepath(repo), 'rb') + for e in f: + showentry(ui.status, e) + f.close() + except IOError: + ui.status("*no status*\n") + return + + if opts.get('delay'): + tref = time.time() + tdelta = float(int(tref)) + 1.0 - tref + if (tdelta > 0.0): + time.sleep(tdelta) + + repostate = repo.status() + modified, added, removed, deleted, unknown, ignored, clean = repostate + dirstatus = {} + for fn in added: + dirstatus[dirname(fn)] = 'a' + for fn in modified: + dirstatus[dirname(fn)] = 'm' + for fn in removed: + dirstatus[dirname(fn)] = 'r' + f = open(cachefilepath(repo), 'wb') + for dn in sorted(dirstatus): + e = dirstatus[dn] + dn + '\n' + f.write(e) + showentry(ui.note, e) + f.close() + +cmdtable = { + 'thgstatus': + (thgstatus, + [ ('', 'delay', None, _('wait until the second ticks over')), + ('', 'remove', None, _('remove the status file')), + ('s', 'show', None, _('just show the contents of ' + 'the status file (no update)')) ], + _('hg thgstatus')), +}
Change 1 of 1 Show Entire File hggtk/​__init__.py Stacked
 
1
2
3
4
5
6
7
8
9
 
 
 
 
 
 
 
 
 
 
 
1
@@ -1,9 +1,1 @@
-import pygtk -pygtk.require('2.0') -import gtk - -# Default icon for apps which do not set one -from shlib import get_tortoise_icon -icon = get_tortoise_icon("hg.ico") -if icon: - gtk.window_set_default_icon_from_file(icon) +#placeholder
Show Entire File hggtk/​about.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Change 1 of 1 Show Entire File hggtk/​addremove.py Stacked
 
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
@@ -1,50 +0,0 @@
-# -# Add/Remove dialog for TortoiseHg -# -# Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> -# - -try: - import pygtk - pygtk.require("2.0") -except: - pass - -import gtk -import gobject -from mercurial import ui, util, hg -from mercurial.i18n import _ -from status import GStatus - -def run(hgcmd='add', root='', cwd='', files=[], **opts): - u = ui.ui() - u.updateopts(debug=False, traceback=False) - repo = hg.repository(u, path=root) - - cmdoptions = { - 'all':False, 'clean':False, 'ignored':False, 'modified':False, - 'added':True, 'removed':True, 'deleted':True, 'unknown':False, 'rev':[], - 'exclude':[], 'include':[], 'debug':True,'verbose':True - } - - if hgcmd == 'add': - cmdoptions['unknown'] = True - elif hgcmd == 'remove': - cmdoptions['clean'] = True - else: - raise "Invalid command '%s'" % hgcmd - - dialog = GStatus(u, repo, cwd, files, cmdoptions, True) - - gtk.gdk.threads_init() - gtk.gdk.threads_enter() - dialog.display() - gtk.main() - gtk.gdk.threads_leave() - -if __name__ == "__main__": - import sys - opts = {} - opts['hgcmd'] = 'adda' - opts['root'] = len(sys.argv) > 1 and sys.argv[1] or '' - run(**opts)
Show Entire File hggtk/​backout.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​bugreport.py Stacked
copied from hggtk/status.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​changeset.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​clone.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​commit.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​datamine.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​dialog.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​diff.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​gdialog.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​gtklib.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​gtools.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​guess.py Stacked
copied from hggtk/rename.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgcmd.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgemail.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgignore.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hginit.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgshelve.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgthread.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​hgtk.py Stacked
renamed from contrib/hgtk
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​history.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​histselect.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​logfilter.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​logview/​__init__.py Stacked
renamed from hggtk/vis/__init__.py
(No changes)
Show Entire File hggtk/​logview/​colormap.py Stacked
renamed from hggtk/vis/colormap.py
(No changes)
Show Entire File hggtk/​logview/​graphcell.py Stacked
renamed from hggtk/vis/graphcell.py
(No changes)
Change 1 of 2 Show Entire File hggtk/​logview/​revgraph.py Stacked
renamed from hggtk/vis/revgraph.py
 
14
15
16
17
 
18
19
20
 
37
38
39
 
 
 
40
41
42
 
14
15
16
 
17
18
19
20
 
37
38
39
40
41
42
43
44
45
@@ -14,7 +14,7 @@
 def __get_parents(repo, rev):   return [x for x in repo.changelog.parentrevs(rev) if x != nullrev]   -def revision_grapher(repo, start_rev, stop_rev, branch=None): +def revision_grapher(repo, start_rev, stop_rev, branch=None, noheads=False):   """incremental revision grapher     This generator function walks through the revision history from @@ -37,6 +37,9 @@
  while curr_rev >= stop_rev:   # Compute revs and next_revs.   if curr_rev not in revs: + if noheads and curr_rev != start_rev: + curr_rev -= 1 + continue   if branch:   ctx = repo.changectx(curr_rev)   if ctx.branch() != branch:
Show Entire File hggtk/​logview/​treemodel.py Stacked
renamed from hggtk/vis/treemodel.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​logview/​treeview.py Stacked
renamed from hggtk/vis/treeview.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​merge.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​recovery.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​rename.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​revisions.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​revtree.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​serve.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​status.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​synch.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​tagadd.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​tags.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​thgconfig.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​thgshelve.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​update.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hggtk/​visdiff.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hgproc.bat Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hgproc.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File hgtk Stacked
This file's diff was not loaded because this changeset is very large. Load changes
icons/​TortoiseMerge.ico Side by side
renamed from icons/tortoise/TortoiseMerge.ico
Removed image
Added image
Subtracted image Added image
Removed image
Removed image
icons/​detect_rename.ico Side by side
renamed from icons/tortoise/detect_rename.ico
Removed image
Added image
Subtracted image Added image
Removed image
Removed image
icons/​general.ico Side by side
renamed from icons/tortoise/general.ico
Removed image
Added image
Subtracted image Added image
icons/​hg.ico Side by side
renamed from icons/tortoise/hg.ico
Removed image
Added image
Subtracted image Added image
icons/​hg_60.ico Side by side
renamed from icons/tortoise/hg_60.ico
Removed image
Added image
Subtracted image Added image
icons/​ignore.ico Side by side
renamed from icons/tortoise/ignore.ico
Removed image
Added image
Subtracted image Added image
Removed image
Removed image
icons/​menuabout.ico Side by side
renamed from icons/tortoise/menuabout.ico
Removed image
Added image
Subtracted image Added image
icons/​menuadd.ico Side by side
renamed from icons/tortoise/menuadd.ico
Removed image
Added image
Subtracted image Added image
icons/​menublame.ico Side by side
renamed from icons/tortoise/menublame.ico
Removed image
Added image
Subtracted image Added image
icons/​menucheckout.ico Side by side
renamed from icons/tortoise/menucheckout.ico
Removed image
Added image
Subtracted image Added image
icons/​menuclone.ico Side by side
renamed from icons/tortoise/menuclone.ico
Removed image
Added image
Subtracted image Added image
icons/​menucommit.ico Side by side
renamed from icons/tortoise/menucommit.ico
Removed image
Added image
Subtracted image Added image
icons/​menucreaterepos.ico Side by side
renamed from icons/tortoise/menucreaterepos.ico
Removed image
Added image
Subtracted image Added image
icons/​menudelete.ico Side by side
renamed from icons/tortoise/menudelete.ico
Removed image
Added image
Subtracted image Added image
icons/​menudiff.ico Side by side
renamed from icons/tortoise/menudiff.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menuhelp.ico Side by side
renamed from icons/tortoise/menuhelp.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menulog.ico Side by side
renamed from icons/tortoise/menulog.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menumerge.ico Side by side
renamed from icons/tortoise/menumerge.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menurelocate.ico Side by side
renamed from icons/tortoise/menurelocate.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menurepobrowse.ico Side by side
renamed from icons/tortoise/menurepobrowse.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menurevert.ico Side by side
renamed from icons/tortoise/menurevert.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menurevisiongraph.ico Side by side
renamed from icons/tortoise/menurevisiongraph.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menusettings.ico Side by side
renamed from icons/tortoise/menusettings.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menushowchanged.ico Side by side
renamed from icons/tortoise/menushowchanged.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menusynch.ico Side by side
renamed from icons/tortoise/menusynch.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​menuunmerge.ico Side by side
renamed from icons/tortoise/menuunmerge.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​proxy.ico Side by side
renamed from icons/tortoise/proxy.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​python.ico Side by side
renamed from icons/tortoise/python.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​settings_repo.ico Side by side
renamed from icons/tortoise/settings_repo.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​settings_user.ico Side by side
renamed from icons/tortoise/settings_user.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​shelve.ico Side by side
renamed from icons/tortoise/shelve.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
This image was not loaded automatically because this changeset is very large. Click to load this image...
Show Entire File icons/​svg/​add.svg Stacked
renamed from icons/tortoise/svg/add.svg
(No changes)
Show Entire File icons/​svg/​checkout.svg Stacked
renamed from icons/tortoise/svg/checkout.svg
(No changes)
Show Entire File icons/​svg/​clone.svg Stacked
renamed from icons/tortoise/svg/clone.svg
(No changes)
Show Entire File icons/​svg/​commit.svg Stacked
renamed from icons/tortoise/svg/commit.svg
(No changes)
Show Entire File icons/​svg/​detect_rename.svg Stacked
renamed from icons/tortoise/svg/detect_rename.svg
(No changes)
Show Entire File icons/​svg/​ignore.svg Stacked
renamed from icons/tortoise/svg/ignore.svg
(No changes)
Show Entire File icons/​svg/​init.svg Stacked
renamed from icons/tortoise/svg/init.svg
(No changes)
Show Entire File icons/​svg/​log.svg Stacked
renamed from icons/tortoise/svg/log.svg
(No changes)
Show Entire File icons/​svg/​merge.svg Stacked
renamed from icons/tortoise/svg/merge.svg
(No changes)
Show Entire File icons/​svg/​proxy.svg Stacked
renamed from icons/tortoise/svg/proxy.svg
(No changes)
Show Entire File icons/​svg/​recovery.svg Stacked
renamed from icons/tortoise/svg/recovery.svg
(No changes)
Show Entire File icons/​svg/​remove.svg Stacked
renamed from icons/tortoise/svg/remove.svg
(No changes)
Show Entire File icons/​svg/​repobrowse.svg Stacked
renamed from icons/tortoise/svg/repobrowse.svg
(No changes)
Show Entire File icons/​svg/​revert.svg Stacked
renamed from icons/tortoise/svg/revert.svg
(No changes)
Show Entire File icons/​svg/​shelve.svg Stacked
renamed from icons/tortoise/svg/shelve.svg
(No changes)
Show Entire File icons/​svg/​status.svg Stacked
renamed from icons/tortoise/svg/status.svg
(No changes)
Show Entire File icons/​svg/​sync.svg Stacked
renamed from icons/tortoise/svg/sync.svg
(No changes)
Show Entire File icons/​svg/​thg_logo.svg Stacked
renamed from icons/tortoise/svg/thg_logo.svg
(No changes)
icons/​thg_logo.ico Side by side
renamed from icons/tortoise/thg_logo.ico
This image was not loaded automatically because this changeset is very large. Click to load this image...
icons/​thg_logo_92x50.png Side by side
renamed from icons/tortoise/thg_logo_92x50.png
This image was not loaded automatically because this changeset is very large. Click to load this image...
Show Entire File installer/​build.txt Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File installer/​tortoisehg.iss Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File setup.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Change 1 of 1 Show Entire File thgutil/​__init__.py Stacked
 
 
 
1
@@ -0,0 +1,1 @@
+#placeholder
Show Entire File thgutil/​cachethg.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​debugthg.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​hglib.py Stacked
renamed from hggtk/hglib.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​i18n.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​iniparse/​__init__.py Stacked
renamed from hggtk/iniparse/__init__.py
(No changes)
Show Entire File thgutil/​iniparse/​compat.py Stacked
renamed from hggtk/iniparse/compat.py
(No changes)
Show Entire File thgutil/​iniparse/​config.py Stacked
renamed from hggtk/iniparse/config.py
(No changes)
Show Entire File thgutil/​iniparse/​ini.py Stacked
renamed from hggtk/iniparse/ini.py
(No changes)
Show Entire File thgutil/​menuthg.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​paths.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​shlib.py Stacked
renamed from hggtk/shlib.py
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File thgutil/​thread2.py Stacked
renamed from hggtk/thread2.py
This file's diff was not loaded because this changeset is very large. Load changes
Change 1 of 1 Show Entire File tortoise/​__init__.py Stacked
 
1
2
3
4
5
6
 
 
 
 
 
 
 
@@ -1,6 +0,0 @@
- -import gettext - -# Add '_' to the builtin namespace -gettext.install('olive-gtk') -
Show Entire File tortoise/​contextmenu.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoise/​iconoverlay.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoise/​shellconf.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoise/​test/​__init__.py Stacked
(No changes)
Show Entire File tortoise/​test/​testcontextmenu.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoise/​test/​testiconoverlay.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoise/​thgutil.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tortoisehg.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File tracelog.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​rpcserver.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ContextMenu.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Directory.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Directory.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​DirectoryStatus.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Direntry.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Direntry.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Dirstatecache.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Dirstatecache.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​FixWinDefs.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​IconOverlay.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Makefile Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​PipeUtils.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Change 1 of 1 Show Entire File win32/​shellext/​PipeUtils.h Stacked
 
 
 
 
 
 
 
 
1
2
3
4
5
6
@@ -0,0 +1,6 @@
+#ifndef __NTServiceManager_PipeUtils_Defined__ +#define __NTServiceManager_PipeUtils_Defined__ + +int query_pipe(LPCSTR lpszWrite, TCHAR *chReadBuf, int bufsize); + +#endif
Show Entire File win32/​shellext/​QueryDirstate.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​QueryDirstate.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Registry.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Registry.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellExt.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellExt.def Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellExt.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellUtils.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellUtils.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ShellUtils2.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​StringUtils.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​StringUtils.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​ThgShell.iss Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​TortoiseUtils.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​TortoiseUtils.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Winstat.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​Winstat.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​dirstate.cpp Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​dirstate.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​shellext/​stdafx.h Stacked
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File win32/​taskbar.py Stacked
This file's diff was not loaded because this changeset is very large. Load changes