# HG changeset patch # User Martin von Zweigbergk # Date 2017-02-09 06:12:27 # Node ID 23eed7d423b4d6d40dd5c0ae9e5ebd1420a265e0 # Parent a8786013f056a52f3d4e93c70e9b15514ba79720 tests: add test for updating to null revision While working on merge.py, I realized that we don't (as far as I could tell) have any tests for updating to the null revision with a dirty working copy. This adds some simple tests for that. diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -177,6 +177,28 @@ Cases are run as shown in that table, ro $ cd .. +Test updating to null revision + + $ hg init null-repo + $ cd null-repo + $ echo a > a + $ hg add a + $ hg ci -m a + $ hg up -qC 0 + $ echo b > b + $ hg add b + $ hg up null + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg st + A b + $ hg up -q 0 + $ hg st + A b + $ hg up -qC null + $ hg st + ? b + $ cd .. + Test updating with closed head ---------------------------------------------------------------------