Show More
@@ -235,7 +235,7 b' def colordiff(orig, ui, repo, *pats, **o' | |||||
235 | 'changed': ['white'], |
|
235 | 'changed': ['white'], | |
236 | 'trailingwhitespace': ['bold', 'red_background']} |
|
236 | 'trailingwhitespace': ['bold', 'red_background']} | |
237 |
|
237 | |||
238 |
def |
|
238 | def extsetup(ui): | |
239 | '''Initialize the extension.''' |
|
239 | '''Initialize the extension.''' | |
240 | _setupcmd(ui, 'diff', commands.table, colordiff, _diff_effects) |
|
240 | _setupcmd(ui, 'diff', commands.table, colordiff, _diff_effects) | |
241 | _setupcmd(ui, 'incoming', commands.table, None, _diff_effects) |
|
241 | _setupcmd(ui, 'incoming', commands.table, None, _diff_effects) | |
@@ -249,15 +249,17 b' def uisetup(ui):' | |||||
249 | _setupcmd(ui, 'qdiff', mq.cmdtable, colordiff, _diff_effects) |
|
249 | _setupcmd(ui, 'qdiff', mq.cmdtable, colordiff, _diff_effects) | |
250 | _setupcmd(ui, 'qseries', mq.cmdtable, colorqseries, _patch_effects) |
|
250 | _setupcmd(ui, 'qseries', mq.cmdtable, colorqseries, _patch_effects) | |
251 | except KeyError: |
|
251 | except KeyError: | |
252 | # The mq extension is not enabled |
|
252 | mq = None | |
253 | pass |
|
|||
254 |
|
253 | |||
255 | try: |
|
254 | try: | |
256 | rec = extensions.find('record') |
|
255 | rec = extensions.find('record') | |
257 | _setupcmd(ui, 'record', rec.cmdtable, colordiff, _diff_effects) |
|
256 | _setupcmd(ui, 'record', rec.cmdtable, colordiff, _diff_effects) | |
258 | except KeyError: |
|
257 | except KeyError: | |
259 | # The record extension is not enabled |
|
258 | rec = None | |
260 | pass |
|
259 | ||
|
260 | if mq and rec: | |||
|
261 | _setupcmd(ui, 'qrecord', rec.cmdtable, colordiff, _diff_effects) | |||
|
262 | ||||
261 |
|
263 | |||
262 | def _setupcmd(ui, cmd, table, func, effectsmap): |
|
264 | def _setupcmd(ui, cmd, table, func, effectsmap): | |
263 | '''patch in command to command table and load effect map''' |
|
265 | '''patch in command to command table and load effect map''' |
@@ -51,3 +51,14 b' y' | |||||
51 | y |
|
51 | y | |
52 | EOF |
|
52 | EOF | |
53 | echo |
|
53 | echo | |
|
54 | ||||
|
55 | echo "[extensions]" >> $HGRCPATH | |||
|
56 | echo "mq=" >> $HGRCPATH | |||
|
57 | ||||
|
58 | hg rollback | |||
|
59 | echo % qrecord | |||
|
60 | hg qrecord --color=always -m moda patch <<EOF | |||
|
61 | y | |||
|
62 | y | |||
|
63 | EOF | |||
|
64 | echo |
@@ -41,3 +41,19 b" examine changes to 'a'? [Ynsfdaq?] \x1b[0;3" | |||||
41 | a |
|
41 | a | |
42 | c |
|
42 | c | |
43 | record this change to 'a'? [Ynsfdaq?] |
|
43 | record this change to 'a'? [Ynsfdaq?] | |
|
44 | rolling back last transaction | |||
|
45 | % qrecord | |||
|
46 | [0;1mdiff --git a/a b/a[0m | |||
|
47 | [0;36;1mold mode 100644[0m | |||
|
48 | [0;36;1mnew mode 100755[0m | |||
|
49 | 1 hunks, 2 lines changed | |||
|
50 | examine changes to 'a'? [Ynsfdaq?] [0;35m@@ -2,7 +2,7 @@[0m | |||
|
51 | c | |||
|
52 | a | |||
|
53 | a | |||
|
54 | [0;31m-b[0m | |||
|
55 | [0;32m+dd[0m | |||
|
56 | a | |||
|
57 | a | |||
|
58 | c | |||
|
59 | record this change to 'a'? [Ynsfdaq?] |
General Comments 0
You need to be logged in to leave comments.
Login now