[PATCH 4 of 4 V2] schemas: add tests to cover schema transmission
Durham Goode
durham at fb.com
Thu Aug 8 23:31:48 UTC 2013
# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1375827639 25200
# Tue Aug 06 15:20:39 2013 -0700
# Node ID bec5b841f08e4b372545a97d31818fba3dfaec23
# Parent 104bd137ee26983d7ea77ffbc5e265657c21365c
schemas: add tests to cover schema transmission
Adds tests for how schema transmission happens during clone and pull.
diff --git a/tests/test-schemas.t b/tests/test-schemas.t
new file mode 100644
--- /dev/null
+++ b/tests/test-schemas.t
@@ -0,0 +1,43 @@
+ $ hg init one
+ $ cd one
+
+ $ echo a > a
+ $ hg add a
+ $ hg commit -ma
+ $ echo "test = test:foo" >> .hg/schemas
+ $ cd ..
+
+# Schemas are transmitted on clone
+
+ $ hg clone -q one two
+ $ cd two
+ $ cat .hg/schemas
+ test = test:foo
+
+# Schemas are updated on pull
+
+ $ echo "test2 = test:bar" >> ../one/.hg/schemas
+ $ hg pull -q
+ $ cat .hg/schemas
+ test = test:foo
+ test2 = test:bar
+
+# Existing schemas are not deleted if remote doesn't have them
+
+ $ echo "test3 = test:zoo" > ../one/.hg/schemas
+ $ hg pull -q
+ $ cat .hg/schemas
+ test = test:foo
+ test3 = test:zoo
+ test2 = test:bar
+
+# Empty schema is ok
+
+ $ rm ../one/.hg/schemas
+ $ hg pull -q
+ $ cat .hg/schemas
+ test = test:foo
+ test3 = test:zoo
+ test2 = test:bar
+
+ $ cd ..
More information about the Mercurial-devel
mailing list