mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
Merge with main
This commit is contained in:
commit
9a40d342ae
@ -160,12 +160,9 @@ class kwtemplater(object):
|
||||
Caveat: localrepository._link fails on Windows.'''
|
||||
return self.match(path) and not 'l' in flagfunc(path)
|
||||
|
||||
def overwrite(self, node, expand, candidates, recctx=None):
|
||||
def overwrite(self, node, expand, candidates):
|
||||
'''Overwrites selected files expanding/shrinking keywords.'''
|
||||
if recctx is None:
|
||||
ctx = self.repo[node]
|
||||
else:
|
||||
ctx = recctx
|
||||
ctx = self.repo[node]
|
||||
mf = ctx.manifest()
|
||||
if node is not None: # commit, record
|
||||
candidates = [f for f in ctx.files() if f in mf]
|
||||
@ -175,7 +172,7 @@ class kwtemplater(object):
|
||||
msg = (expand and _('overwriting %s expanding keywords\n')
|
||||
or _('overwriting %s shrinking keywords\n'))
|
||||
for f in candidates:
|
||||
if recctx is None:
|
||||
if not self.record:
|
||||
data = self.repo.file(f).read(mf[f])
|
||||
else:
|
||||
data = self.repo.wread(f)
|
||||
@ -507,7 +504,7 @@ def reposetup(ui, repo):
|
||||
ret = orig(ui, repo, commitfunc, *pats, **opts)
|
||||
recctx = repo['.']
|
||||
if ctx != recctx:
|
||||
kwt.overwrite('.', True, None, recctx)
|
||||
kwt.overwrite('.', True, None)
|
||||
return ret
|
||||
finally:
|
||||
wlock.release()
|
||||
|
@ -3109,15 +3109,21 @@ def summary(ui, repo, **opts):
|
||||
ui.status(m, label='log.branch')
|
||||
|
||||
st = list(repo.status(unknown=True))[:6]
|
||||
|
||||
ms = mergemod.mergestate(repo)
|
||||
st.append([f for f in ms if ms[f] == 'u'])
|
||||
|
||||
subs = [s for s in ctx.substate if ctx.sub(s).dirty()]
|
||||
st.append(subs)
|
||||
|
||||
labels = [ui.label(_('%d modified'), 'status.modified'),
|
||||
ui.label(_('%d added'), 'status.added'),
|
||||
ui.label(_('%d removed'), 'status.removed'),
|
||||
ui.label(_('%d deleted'), 'status.deleted'),
|
||||
ui.label(_('%d unknown'), 'status.unknown'),
|
||||
ui.label(_('%d ignored'), 'status.ignored'),
|
||||
ui.label(_('%d unresolved'), 'resolve.unresolved')]
|
||||
ui.label(_('%d unresolved'), 'resolve.unresolved'),
|
||||
ui.label(_('%d subrepos'), 'status.modified')]
|
||||
t = []
|
||||
for s, l in zip(st, labels):
|
||||
if s:
|
||||
@ -3130,7 +3136,7 @@ def summary(ui, repo, **opts):
|
||||
t += _(' (merge)')
|
||||
elif branch != parents[0].branch():
|
||||
t += _(' (new branch)')
|
||||
elif (not st[0] and not st[1] and not st[2]):
|
||||
elif (not st[0] and not st[1] and not st[2] and not st[7]):
|
||||
t += _(' (clean)')
|
||||
cleanworkdir = True
|
||||
elif pnode not in bheads:
|
||||
|
@ -16,6 +16,7 @@ hg add .hgsub
|
||||
hg init s
|
||||
echo a > s/a
|
||||
hg -R s ci -Ams0
|
||||
hg sum
|
||||
hg ci -m1
|
||||
|
||||
echo % add sub sub
|
||||
@ -24,7 +25,9 @@ hg init s/ss
|
||||
echo a > s/ss/a
|
||||
hg -R s add s/.hgsub
|
||||
hg -R s/ss add s/ss/a
|
||||
hg sum
|
||||
hg ci -m2
|
||||
hg sum
|
||||
|
||||
echo % bump sub rev
|
||||
echo b > s/a
|
||||
|
@ -2,10 +2,25 @@
|
||||
adding a
|
||||
% add first sub
|
||||
adding a
|
||||
parent: 0:f7b1eb17ad24 tip
|
||||
0
|
||||
branch: default
|
||||
commit: 1 added, 1 subrepos
|
||||
update: (current)
|
||||
committing subrepository s
|
||||
% add sub sub
|
||||
parent: 1:7cf8cfea66e4 tip
|
||||
1
|
||||
branch: default
|
||||
commit: 1 subrepos
|
||||
update: (current)
|
||||
committing subrepository s
|
||||
committing subrepository ss
|
||||
parent: 2:df30734270ae tip
|
||||
2
|
||||
branch: default
|
||||
commit: (clean)
|
||||
update: (current)
|
||||
% bump sub rev
|
||||
committing subrepository s
|
||||
% leave sub dirty
|
||||
|
Loading…
Reference in New Issue
Block a user