Show More
@@ -88,7 +88,7 b" commands.optionalrepo += ' kwdemo'" | |||||
88 |
|
88 | |||
89 | # hg commands that do not act on keywords |
|
89 | # hg commands that do not act on keywords | |
90 | nokwcommands = ('add addremove bundle copy export grep identify incoming init' |
|
90 | nokwcommands = ('add addremove bundle copy export grep identify incoming init' | |
91 | ' log outgoing push remove rename rollback tip convert') |
|
91 | ' log outgoing push remove rename rollback tip convert email') | |
92 |
|
92 | |||
93 | # hg commands that trigger expansion only when writing to working dir, |
|
93 | # hg commands that trigger expansion only when writing to working dir, | |
94 | # not when reading filelog, and unexpand when reading from working dir |
|
94 | # not when reading filelog, and unexpand when reading from working dir | |
@@ -410,8 +410,12 b' def reposetup(ui, repo):' | |||||
410 | This is done for local repos only, and only if there are |
|
410 | This is done for local repos only, and only if there are | |
411 | files configured at all for keyword substitution.''' |
|
411 | files configured at all for keyword substitution.''' | |
412 |
|
412 | |||
413 | if not repo.local(): |
|
413 | try: | |
414 | return |
|
414 | if (not repo.local() or '.hg' in repo.root.split('/') | |
|
415 | or repo._url.startswith('bundle:')): | |||
|
416 | return | |||
|
417 | except AttributeError: | |||
|
418 | pass | |||
415 |
|
419 | |||
416 | hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:]) |
|
420 | hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:]) | |
417 | if hgcmd in nokwcommands.split(): |
|
421 | if hgcmd in nokwcommands.split(): | |
@@ -426,7 +430,7 b' def reposetup(ui, repo):' | |||||
426 | if node1 is not None and node1 != repo.changectx().node(): |
|
430 | if node1 is not None and node1 != repo.changectx().node(): | |
427 | hgcmd = 'diff1' |
|
431 | hgcmd = 'diff1' | |
428 |
|
432 | |||
429 |
inc, exc = [], ['.hg |
|
433 | inc, exc = [], ['.hg*'] | |
430 | for pat, opt in ui.configitems('keyword'): |
|
434 | for pat, opt in ui.configitems('keyword'): | |
431 | if opt != 'ignore': |
|
435 | if opt != 'ignore': | |
432 | inc.append(pat) |
|
436 | inc.append(pat) |
@@ -24,8 +24,8 b' hg --quiet kwdemo --default \\' | |||||
24 |
|
24 | |||
25 | hg --quiet kwdemo "Branch = {branches}" |
|
25 | hg --quiet kwdemo "Branch = {branches}" | |
26 |
|
26 | |||
27 | hg init Test |
|
27 | hg init Test-bndl | |
28 | cd Test |
|
28 | cd Test-bndl | |
29 |
|
29 | |||
30 | echo % kwshrink should exit silently in empty/invalid repo |
|
30 | echo % kwshrink should exit silently in empty/invalid repo | |
31 | hg kwshrink |
|
31 | hg kwshrink | |
@@ -69,6 +69,16 b" sed -e '/\\[hooks\\]/,$ d' $HGRCPATH > $HG" | |||||
69 | mv $HGRCPATH.nohook $HGRCPATH |
|
69 | mv $HGRCPATH.nohook $HGRCPATH | |
70 | rm hooktest |
|
70 | rm hooktest | |
71 |
|
71 | |||
|
72 | echo % bundle | |||
|
73 | hg bundle --base null ../kw.hg | |||
|
74 | ||||
|
75 | cd .. | |||
|
76 | hg init Test | |||
|
77 | cd Test | |||
|
78 | ||||
|
79 | echo % pull from bundle | |||
|
80 | hg pull -u ../kw.hg | |||
|
81 | ||||
72 | echo % touch |
|
82 | echo % touch | |
73 | touch a b |
|
83 | touch a b | |
74 | echo % status |
|
84 | echo % status | |
@@ -90,8 +100,12 b' hg -v kwexpand' | |||||
90 | echo % compare changenodes in a c |
|
100 | echo % compare changenodes in a c | |
91 | cat a c |
|
101 | cat a c | |
92 |
|
102 | |||
|
103 | echo % qinit -c | |||
|
104 | hg qinit -c | |||
93 | echo % qimport |
|
105 | echo % qimport | |
94 | hg qimport -r tip -n mqtest.diff |
|
106 | hg qimport -r tip -n mqtest.diff | |
|
107 | echo % qcommit | |||
|
108 | hg qcommit -mqtest | |||
95 | echo % keywords should not be expanded in patch |
|
109 | echo % keywords should not be expanded in patch | |
96 | cat .hg/patches/mqtest.diff |
|
110 | cat .hg/patches/mqtest.diff | |
97 | echo % qpop |
|
111 | echo % qpop |
@@ -138,6 +138,16 b' ignore $Id$' | |||||
138 | a |
|
138 | a | |
139 | % diff a hooktest |
|
139 | % diff a hooktest | |
140 | % removing commit hook from config |
|
140 | % removing commit hook from config | |
|
141 | % bundle | |||
|
142 | 1 changesets found | |||
|
143 | % pull from bundle | |||
|
144 | pulling from ../kw.hg | |||
|
145 | requesting all changes | |||
|
146 | adding changesets | |||
|
147 | adding manifests | |||
|
148 | adding file changes | |||
|
149 | added 1 changesets with 3 changes to 3 files | |||
|
150 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
141 | % touch |
|
151 | % touch | |
142 | % status |
|
152 | % status | |
143 | % update |
|
153 | % update | |
@@ -162,7 +172,9 b' do not process $Id:' | |||||
162 | xxx $ |
|
172 | xxx $ | |
163 | $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $ |
|
173 | $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $ | |
164 | tests for different changenodes |
|
174 | tests for different changenodes | |
|
175 | % qinit -c | |||
165 | % qimport |
|
176 | % qimport | |
|
177 | % qcommit | |||
166 | % keywords should not be expanded in patch |
|
178 | % keywords should not be expanded in patch | |
167 | # HG changeset patch |
|
179 | # HG changeset patch | |
168 | # User User Name <user@example.com> |
|
180 | # User User Name <user@example.com> |
General Comments 0
You need to be logged in to leave comments.
Login now