diff tests/test-narrow.t @ 46477:3c360ab2688d

narrow: add --no-backup option for narrowing Most of our users at Google use Mercurial on a file system that keeps backups of previous versions of all files, including those in `.hg/`. They therefore don't need a separate backup in the file system when narrowing their repo (which they typically do by running `hg tracked --auto-remove-includes`). Backups can be very slow. `hg strip` already has a `--no-backup` option. This patch adds the same option to `hg tracked --removeinclude/--addexclude`. Differential Revision: https://phab.mercurial-scm.org/D9951
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 Feb 2021 13:55:58 -0800
parents 6cc269bd1c29
children 946a07f08906
line wrap: on
line diff
--- a/tests/test-narrow.t	Fri Jan 29 15:23:07 2021 +0100
+++ b/tests/test-narrow.t	Wed Feb 03 13:55:58 2021 -0800
@@ -492,3 +492,20 @@
   searching for changes
   looking for unused includes to remove
   found no unused includes
+Test --no-backup
+  $ hg tracked --addinclude d0 --addinclude d2 -q
+  $ hg unbundle .hg/strip-backup/*-narrow.hg -q
+  $ rm .hg/strip-backup/*
+  $ hg tracked --auto-remove-includes --no-backup
+  comparing with ssh://user@dummy/master
+  searching for changes
+  looking for unused includes to remove
+  path:d0
+  path:d2
+  remove these unused includes (yn)? y
+  looking for local changes to affected paths
+  deleting data/d0/f.i
+  deleting data/d2/f.i
+  deleting meta/d0/00manifest.i (tree !)
+  deleting meta/d2/00manifest.i (tree !)
+  $ ls .hg/strip-backup/