[PATCH 2 of 2] tests: check update of transplants file when transplanted changesets are added
Georg Brandl
georg at python.org
Sat Aug 28 17:28:25 CDT 2010
# HG changeset patch
# User Georg Brandl <georg at python.org>
# Date 1283034422 -7200
# Node ID 6cba0fb8bb4569db6919afc9e818ef7e99325b90
# Parent cff637d2f3a40aebe640dc3d4ea1fc3ff72bc343
tests: check update of transplants file when transplanted changesets are added
diff -r cff637d2f3a4 -r 6cba0fb8bb45 tests/test-transplant.t
--- a/tests/test-transplant.t Sun Aug 29 00:25:57 2010 +0200
+++ b/tests/test-transplant.t Sun Aug 29 00:27:02 2010 +0200
@@ -351,3 +351,41 @@
$ python -c "print repr(file('b', 'rb').read())"
'a\r\nb\r\n'
$ cd ..
+
+Test update of transplants file on pull:
+
+first create a nice repository with some changes
+
+ $ hg init repo1
+ $ cd repo1
+ $ echo a > a
+ $ hg ci -Am a
+ adding a
+ $ echo b > b
+ $ hg ci -Am b
+ adding b
+ $ echo c > c
+ $ hg ci -Am c
+ adding c
+ $ cd ..
+
+then make a clone and transplant a change
+
+ $ hg -q clone -r0 repo1 repo2
+ $ cd repo2
+ $ hg transplant -s ../repo1 tip
+ searching for changes
+ applying 177f92b77385
+ 177f92b77385 transplanted to 229c260e510e
+ $ cd ..
+
+then make another clone and check if the same transplant is skipped
+
+ $ hg init repo3
+ $ cd repo3
+ $ hg -q pull -u ../repo2
+ $ hg transplant -s ../repo1 tip
+ searching for changes
+ skipping already applied revision 2:177f92b77385
+ $ cd ..
+
More information about the Mercurial-devel
mailing list