[PATCH 1 of 5] tests: add test for updating to null revision
Martin von Zweigbergk
martinvonz at google.com
Fri Feb 10 06:00:28 UTC 2017
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1486620747 28800
# Wed Feb 08 22:12:27 2017 -0800
# Node ID 14817ea5de6a92ef99fd4b5983e5a644c8fcb170
# Parent 1f51b4658f21bbb797e922d155c1046eddccf91d
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 -r 1f51b4658f21 -r 14817ea5de6a tests/test-update-branches.t
--- a/tests/test-update-branches.t Thu Feb 02 14:19:48 2017 +0100
+++ b/tests/test-update-branches.t Wed Feb 08 22:12:27 2017 -0800
@@ -177,6 +177,28 @@
$ 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
---------------------------------------------------------------------
More information about the Mercurial-devel
mailing list