diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs --- a/rust/hg-core/src/dirstate/status.rs +++ b/rust/hg-core/src/dirstate/status.rs @@ -583,9 +583,11 @@ where .unwrap(); } } else if self.is_ignored(&filename) && self.options.list_ignored { - files_sender - .send((filename.to_owned(), Dispatch::Ignored)) - .unwrap(); + if self.matcher.matches(&filename) { + files_sender + .send((filename.to_owned(), Dispatch::Ignored)) + .unwrap(); + } } } else if let Some(entry) = entry_option { // Used to be a file or a folder, now something else. diff --git a/tests/test-http-bundle1.t b/tests/test-http-bundle1.t --- a/tests/test-http-bundle1.t +++ b/tests/test-http-bundle1.t @@ -192,10 +192,10 @@ test http authentication $ cat pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg id http://localhost:$HGPORT2/ diff --git a/tests/test-http.t b/tests/test-http.t --- a/tests/test-http.t +++ b/tests/test-http.t @@ -181,10 +181,10 @@ test http authentication $ cat pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg id http://localhost:$HGPORT2/ diff --git a/tests/test-largefiles-wireproto.t b/tests/test-largefiles-wireproto.t --- a/tests/test-largefiles-wireproto.t +++ b/tests/test-largefiles-wireproto.t @@ -425,10 +425,10 @@ a large file from the server rather than > -d -p $HGPORT --pid-file hg.pid -A access.log $ cat hg.pid >> $DAEMON_PIDS $ cat << EOF > get_pass.py - > import getpass - > def newgetpass(arg): + > from mercurial import util + > def newgetpass(): > return "pass" - > getpass.getpass = newgetpass + > util.get_password = newgetpass > EOF $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \ > http://user@localhost:$HGPORT credentialclone diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -881,3 +881,20 @@ Deeply nested files in an ignored direct $ hg status --ignored I ignored I ignored-dir/subdir/1 + +Check using include flag while listing ignored composes correctly (issue6514) + + $ cd .. + $ hg init issue6514 + $ cd issue6514 + $ mkdir ignored-folder + $ touch A.hs B.hs C.hs ignored-folder/other.txt ignored-folder/ctest.hs + $ cat >.hgignore < A.hs + > B.hs + > ignored-folder/ + > EOF + $ hg st -i -I 're:.*\.hs$' + I A.hs + I B.hs + I ignored-folder/ctest.hs