# HG changeset patch # User Pierre-Yves David # Date 1504280267 -7200 # Node ID bd04a614b866d647b4fa5bd4bd533cebc7a36d2f # Parent 462adae9fea74a58b4c23127c1f01222b5dbe204 topic: move a status message in the right scope The finally get runs on failure so we should not advertise rewrite topic in the case. In addition the 'rewrote' variable can be undefined in the finally. diff -r 462adae9fea7 -r bd04a614b866 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Wed Aug 09 11:32:19 2017 +0200 +++ b/hgext3rd/topic/__init__.py Fri Sep 01 17:37:47 2017 +0200 @@ -388,10 +388,10 @@ txn = repo.transaction('rewrite-topics') rewrote = _changetopics(ui, repo, rev, topic) txn.close() + ui.status('changed topic on %d changes\n' % rewrote) finally: lockmod.release(txn, l, wl) repo.invalidate() - ui.status('changed topic on %d changes\n' % rewrote) return if clear: