##// END OF EJS Templates
censor: use a reasonable amount of memory...
Valentin Gatien-Baron -
r39651:a658f97c default
parent child Browse files
Show More
@@ -83,8 +83,11 b" def _docensor(ui, repo, path, rev='', to"
83 raise error.Abort(_('file does not exist at revision %s') % rev)
83 raise error.Abort(_('file does not exist at revision %s') % rev)
84
84
85 fnode = fctx.filenode()
85 fnode = fctx.filenode()
86 headctxs = [repo[c] for c in repo.heads()]
86 heads = []
87 heads = [c for c in headctxs if path in c and c.filenode(path) == fnode]
87 for headnode in repo.heads():
88 c = repo[headnode]
89 if path in c and c.filenode(path) == fnode:
90 heads.append(c)
88 if heads:
91 if heads:
89 headlist = ', '.join([short(c.node()) for c in heads])
92 headlist = ', '.join([short(c.node()) for c in heads])
90 raise error.Abort(_('cannot censor file in heads (%s)') % headlist,
93 raise error.Abort(_('cannot censor file in heads (%s)') % headlist,
General Comments 0
You need to be logged in to leave comments. Login now