# HG changeset patch # User Martin von Zweigbergk # Date 1614149910 28800 # Node ID ced66295ea90fc0ba66da3c5d616e975289ae5eb # Parent 946a07f0890630fc960395a90f5ff718d3aad01d narrow: remove assertion about working copy being clean The user can always modify the working copy, including while they're running `hg tracked --remove-include `. Nothing really bad happens when they do that, and we already have code for printing a nice warning, so we can safely remove the assertion we had. Differential Revision: https://phab.mercurial-scm.org/D10063 diff -r 946a07f08906 -r ced66295ea90 mercurial/narrowspec.py --- a/mercurial/narrowspec.py Tue Feb 23 22:55:26 2021 -0800 +++ b/mercurial/narrowspec.py Tue Feb 23 22:58:30 2021 -0800 @@ -329,7 +329,6 @@ trackeddirty = status.modified + status.added clean = status.clean if assumeclean: - assert not trackeddirty clean.extend(lookup) else: trackeddirty.extend(lookup) diff -r 946a07f08906 -r ced66295ea90 tests/test-narrow.t --- a/tests/test-narrow.t Tue Feb 23 22:55:26 2021 -0800 +++ b/tests/test-narrow.t Tue Feb 23 22:58:30 2021 -0800 @@ -515,5 +515,10 @@ $ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \ > --include d0 --include d1 $ cd narrow-concurrent-modify - $ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0 2>&1 | grep AssertionError - AssertionError + $ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0 + comparing with ssh://user@dummy/master + searching for changes + looking for local changes to affected paths + deleting data/d0/f.i + deleting meta/d0/00manifest.i (tree !) + not deleting possibly dirty file d0/f