Mercurial > hg
comparison tests/test-status.t @ 47130:cfbbafb04037
dirstate-tree: Add a test showing that issue 6335 is fixed
… when using the new status algorithm and the tree-based dirstate.
The previous algorithm still has this bug.
Differential Revision: https://phab.mercurial-scm.org/D10699
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Fri, 07 May 2021 16:41:07 +0200 |
parents | 93eb6c8035a9 |
children | 46c6be5f1efa |
comparison
equal
deleted
inserted
replaced
47129:93eb6c8035a9 | 47130:cfbbafb04037 |
---|---|
697 $ cd issue6483 | 697 $ cd issue6483 |
698 $ touch a.py b.rs | 698 $ touch a.py b.rs |
699 $ hg add a.py b.rs | 699 $ hg add a.py b.rs |
700 $ hg st -aI "*.py" | 700 $ hg st -aI "*.py" |
701 A a.py | 701 A a.py |
702 | |
703 issue6335 | |
704 When a directory containing a tracked file gets symlinked, as of 5.8 | |
705 `hg st` only gives the correct answer about clean (or deleted) files | |
706 if also listing unknowns. | |
707 The tree-based dirstate and status algorithm fix this: | |
708 | |
709 #if symlink no-dirstate-v1 | |
710 | |
711 $ cd .. | |
712 $ hg init issue6335 | |
713 $ cd issue6335 | |
714 $ mkdir foo | |
715 $ touch foo/a | |
716 $ hg ci -Ama | |
717 adding foo/a | |
718 $ mv foo bar | |
719 $ ln -s bar foo | |
720 $ hg status | |
721 ! foo/a | |
722 ? bar/a | |
723 ? foo | |
724 | |
725 $ hg status -c # incorrect output with `dirstate-v1` | |
726 $ hg status -cu | |
727 ? bar/a | |
728 ? foo | |
729 $ hg status -d # incorrect output with `dirstate-v1` | |
730 ! foo/a | |
731 $ hg status -du | |
732 ! foo/a | |
733 ? bar/a | |
734 ? foo | |
735 | |
736 #endif |