diff hgext/narrow/narrowcommands.py @ 47026:20eba5cef2e0

narrow: add more status messages when narrowing Each of the steps I added status messages for in this patch frequently take minutes or tens of minutes for our internal users. It would be nice to also have a progress bar but that will have to come later. Differential Revision: https://phab.mercurial-scm.org/D10503
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 20 Apr 2021 11:22:35 -0700
parents 124fe94016c0
children 090fc6a95e50
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py	Tue Apr 20 10:24:03 2021 -0700
+++ b/hgext/narrow/narrowcommands.py	Tue Apr 20 11:22:35 2021 -0700
@@ -281,6 +281,10 @@
                 )
                 hg.clean(repo, urev)
             overrides = {(b'devel', b'strip-obsmarkers'): False}
+            if backup:
+                ui.status(_(b'moving unwanted changesets to backup\n'))
+            else:
+                ui.status(_(b'deleting unwanted changesets\n'))
             with ui.configoverride(overrides, b'narrow'):
                 repair.strip(ui, unfi, tostrip, topic=b'narrow', backup=backup)
 
@@ -316,6 +320,7 @@
                 util.unlinkpath(repo.svfs.join(f))
                 repo.store.markremoved(f)
 
+            ui.status(_(b'deleting unwanted files from working copy\n'))
             narrowspec.updateworkingcopy(repo, assumeclean=True)
             narrowspec.copytoworkingcopy(repo)