Show More
@@ -160,12 +160,9 b' class kwtemplater(object):' | |||||
160 | Caveat: localrepository._link fails on Windows.''' |
|
160 | Caveat: localrepository._link fails on Windows.''' | |
161 | return self.match(path) and not 'l' in flagfunc(path) |
|
161 | return self.match(path) and not 'l' in flagfunc(path) | |
162 |
|
162 | |||
163 |
def overwrite(self, node, expand, candidates |
|
163 | def overwrite(self, node, expand, candidates): | |
164 | '''Overwrites selected files expanding/shrinking keywords.''' |
|
164 | '''Overwrites selected files expanding/shrinking keywords.''' | |
165 | if recctx is None: |
|
165 | ctx = self.repo[node] | |
166 | ctx = self.repo[node] |
|
|||
167 | else: |
|
|||
168 | ctx = recctx |
|
|||
169 | mf = ctx.manifest() |
|
166 | mf = ctx.manifest() | |
170 | if node is not None: # commit, record |
|
167 | if node is not None: # commit, record | |
171 | candidates = [f for f in ctx.files() if f in mf] |
|
168 | candidates = [f for f in ctx.files() if f in mf] | |
@@ -175,7 +172,7 b' class kwtemplater(object):' | |||||
175 | msg = (expand and _('overwriting %s expanding keywords\n') |
|
172 | msg = (expand and _('overwriting %s expanding keywords\n') | |
176 | or _('overwriting %s shrinking keywords\n')) |
|
173 | or _('overwriting %s shrinking keywords\n')) | |
177 | for f in candidates: |
|
174 | for f in candidates: | |
178 |
if |
|
175 | if not self.record: | |
179 | data = self.repo.file(f).read(mf[f]) |
|
176 | data = self.repo.file(f).read(mf[f]) | |
180 | else: |
|
177 | else: | |
181 | data = self.repo.wread(f) |
|
178 | data = self.repo.wread(f) | |
@@ -507,7 +504,7 b' def reposetup(ui, repo):' | |||||
507 | ret = orig(ui, repo, commitfunc, *pats, **opts) |
|
504 | ret = orig(ui, repo, commitfunc, *pats, **opts) | |
508 | recctx = repo['.'] |
|
505 | recctx = repo['.'] | |
509 | if ctx != recctx: |
|
506 | if ctx != recctx: | |
510 |
kwt.overwrite('.', True, None |
|
507 | kwt.overwrite('.', True, None) | |
511 | return ret |
|
508 | return ret | |
512 | finally: |
|
509 | finally: | |
513 | wlock.release() |
|
510 | wlock.release() |
@@ -3109,15 +3109,21 b' def summary(ui, repo, **opts):' | |||||
3109 | ui.status(m, label='log.branch') |
|
3109 | ui.status(m, label='log.branch') | |
3110 |
|
3110 | |||
3111 | st = list(repo.status(unknown=True))[:6] |
|
3111 | st = list(repo.status(unknown=True))[:6] | |
|
3112 | ||||
3112 | ms = mergemod.mergestate(repo) |
|
3113 | ms = mergemod.mergestate(repo) | |
3113 | st.append([f for f in ms if ms[f] == 'u']) |
|
3114 | st.append([f for f in ms if ms[f] == 'u']) | |
|
3115 | ||||
|
3116 | subs = [s for s in ctx.substate if ctx.sub(s).dirty()] | |||
|
3117 | st.append(subs) | |||
|
3118 | ||||
3114 | labels = [ui.label(_('%d modified'), 'status.modified'), |
|
3119 | labels = [ui.label(_('%d modified'), 'status.modified'), | |
3115 | ui.label(_('%d added'), 'status.added'), |
|
3120 | ui.label(_('%d added'), 'status.added'), | |
3116 | ui.label(_('%d removed'), 'status.removed'), |
|
3121 | ui.label(_('%d removed'), 'status.removed'), | |
3117 | ui.label(_('%d deleted'), 'status.deleted'), |
|
3122 | ui.label(_('%d deleted'), 'status.deleted'), | |
3118 | ui.label(_('%d unknown'), 'status.unknown'), |
|
3123 | ui.label(_('%d unknown'), 'status.unknown'), | |
3119 | ui.label(_('%d ignored'), 'status.ignored'), |
|
3124 | ui.label(_('%d ignored'), 'status.ignored'), | |
3120 |
ui.label(_('%d unresolved'), 'resolve.unresolved') |
|
3125 | ui.label(_('%d unresolved'), 'resolve.unresolved'), | |
|
3126 | ui.label(_('%d subrepos'), 'status.modified')] | |||
3121 | t = [] |
|
3127 | t = [] | |
3122 | for s, l in zip(st, labels): |
|
3128 | for s, l in zip(st, labels): | |
3123 | if s: |
|
3129 | if s: | |
@@ -3130,7 +3136,7 b' def summary(ui, repo, **opts):' | |||||
3130 | t += _(' (merge)') |
|
3136 | t += _(' (merge)') | |
3131 | elif branch != parents[0].branch(): |
|
3137 | elif branch != parents[0].branch(): | |
3132 | t += _(' (new branch)') |
|
3138 | t += _(' (new branch)') | |
3133 | elif (not st[0] and not st[1] and not st[2]): |
|
3139 | elif (not st[0] and not st[1] and not st[2] and not st[7]): | |
3134 | t += _(' (clean)') |
|
3140 | t += _(' (clean)') | |
3135 | cleanworkdir = True |
|
3141 | cleanworkdir = True | |
3136 | elif pnode not in bheads: |
|
3142 | elif pnode not in bheads: |
@@ -16,6 +16,7 b' hg add .hgsub' | |||||
16 | hg init s |
|
16 | hg init s | |
17 | echo a > s/a |
|
17 | echo a > s/a | |
18 | hg -R s ci -Ams0 |
|
18 | hg -R s ci -Ams0 | |
|
19 | hg sum | |||
19 | hg ci -m1 |
|
20 | hg ci -m1 | |
20 |
|
21 | |||
21 | echo % add sub sub |
|
22 | echo % add sub sub | |
@@ -24,7 +25,9 b' hg init s/ss' | |||||
24 | echo a > s/ss/a |
|
25 | echo a > s/ss/a | |
25 | hg -R s add s/.hgsub |
|
26 | hg -R s add s/.hgsub | |
26 | hg -R s/ss add s/ss/a |
|
27 | hg -R s/ss add s/ss/a | |
|
28 | hg sum | |||
27 | hg ci -m2 |
|
29 | hg ci -m2 | |
|
30 | hg sum | |||
28 |
|
31 | |||
29 | echo % bump sub rev |
|
32 | echo % bump sub rev | |
30 | echo b > s/a |
|
33 | echo b > s/a |
@@ -2,10 +2,25 b'' | |||||
2 | adding a |
|
2 | adding a | |
3 | % add first sub |
|
3 | % add first sub | |
4 | adding a |
|
4 | adding a | |
|
5 | parent: 0:f7b1eb17ad24 tip | |||
|
6 | 0 | |||
|
7 | branch: default | |||
|
8 | commit: 1 added, 1 subrepos | |||
|
9 | update: (current) | |||
5 | committing subrepository s |
|
10 | committing subrepository s | |
6 | % add sub sub |
|
11 | % add sub sub | |
|
12 | parent: 1:7cf8cfea66e4 tip | |||
|
13 | 1 | |||
|
14 | branch: default | |||
|
15 | commit: 1 subrepos | |||
|
16 | update: (current) | |||
7 | committing subrepository s |
|
17 | committing subrepository s | |
8 | committing subrepository ss |
|
18 | committing subrepository ss | |
|
19 | parent: 2:df30734270ae tip | |||
|
20 | 2 | |||
|
21 | branch: default | |||
|
22 | commit: (clean) | |||
|
23 | update: (current) | |||
9 | % bump sub rev |
|
24 | % bump sub rev | |
10 | committing subrepository s |
|
25 | committing subrepository s | |
11 | % leave sub dirty |
|
26 | % leave sub dirty |
General Comments 0
You need to be logged in to leave comments.
Login now