comparison hgext/censor.py @ 51269:db121ddd171e

censor: be more verbose about the other steps too If we informs the user about head checking, we should tell him when the other operation happens too. Otherwise the user can imagine to still be in the head checking part.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Dec 2023 22:46:46 +0100
parents 622f00b350be
children ceeb8fa23cc8
comparison
equal deleted inserted replaced
51268:622f00b350be 51269:db121ddd171e
127 raise error.Abort( 127 raise error.Abort(
128 _(b'cannot censor file in heads (%s)') % headlist, 128 _(b'cannot censor file in heads (%s)') % headlist,
129 hint=_(b'clean/delete and commit first'), 129 hint=_(b'clean/delete and commit first'),
130 ) 130 )
131 131
132 msg = b'checking for the censored content in the working directory\n'
133 ui.status(msg)
132 wp = wctx.parents() 134 wp = wctx.parents()
133 if ctx.node() in [p.node() for p in wp]: 135 if ctx.node() in [p.node() for p in wp]:
134 raise error.Abort( 136 raise error.Abort(
135 _(b'cannot censor working directory'), 137 _(b'cannot censor working directory'),
136 hint=_(b'clean/delete/update first'), 138 hint=_(b'clean/delete/update first'),
137 ) 139 )
138 140
141 msg = b'censoring 1 file revision\n'
142 ui.status(msg)
139 with repo.transaction(b'censor') as tr: 143 with repo.transaction(b'censor') as tr:
140 flog.censorrevision(tr, fnode, tombstone=tombstone) 144 flog.censorrevision(tr, fnode, tombstone=tombstone)