diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py --- a/mercurial/narrowspec.py +++ b/mercurial/narrowspec.py @@ -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 --git a/tests/test-narrow.t b/tests/test-narrow.t --- a/tests/test-narrow.t +++ b/tests/test-narrow.t @@ -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