[PATCH] largefiles: add tests for archive use cases that have been known to fail in the past
Na'Tosha Bard
natosha at unity3d.com
Thu Oct 6 06:44:43 CDT 2011
# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1317900776 -7200
# Node ID 22bfc34fa1ad6f7083dcff0672257054fd504b19
# Parent 14c0eeedbd0701e4188285eccaba2ecfcef4bc99
largefiles: add tests for archive use cases that have been known to fail in the past.
diff -r 14c0eeedbd07 -r 22bfc34fa1ad tests/test-largefiles-archive.t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-largefiles-archive.t Thu Oct 06 13:32:56 2011 +0200
@@ -0,0 +1,73 @@
+ $ cat >> $HGRCPATH <<EOF
+ > [extensions]
+ > largefiles=
+ > EOF
+
+Create the repo and test archiving a few versions of a largefiles repo
+
+ $ hg init a
+ $ cd a
+ $ mkdir sub
+ $ echo normal1 > normal1
+ $ echo normal2 > sub/normal2
+ $ echo large1 > large1
+ $ echo large2 > sub/large2
+ $ hg add normal1 sub/normal2
+ $ hg add --large large1 sub/large2
+ $ hg commit -m "add files"
+ $ echo normal11 > normal1
+ $ echo normal22 > sub/normal2
+ $ echo large11 > large1
+ $ echo large22 > sub/large2
+ $ hg commit -m "edit files"
+ $ hg remove normal1 large1
+ $ hg commit -m "remove files"
+ $ echo normal22 > normal1
+ $ echo large22 > large1
+ $ hg add normal1
+ $ hg add --large large1
+ $ hg commit -m "re-add and remove files"
+
+Test archiving the various revisions
+
+ $ hg archive -r 0 ../archive0
+ $ hg archive -r 1 ../archive1
+ $ hg archive -r 2 ../archive2
+ $ hg archive -r 3 ../archive3
+
+Test the contents of the files in the archives
+
+ $ cd ../archive0
+ $ cat normal1
+ normal1
+ $ cat large1
+ large1
+ $ cat sub/normal2
+ normal2
+ $ cat sub/large2
+ large2
+ $ cd ../archive1
+ $ cat normal1
+ normal11
+ $ cat large1
+ large11
+ $ cat sub/normal2
+ normal22
+ $ cat sub/large2
+ large22
+ $ cd ../archive2
+ $ ls
+ sub
+ $ cat sub/normal2
+ normal22
+ $ cat sub/large2
+ large22
+ $ cd ../archive3
+ $ cat normal1
+ normal22
+ $ cat large1
+ large22
+ $ cat sub/normal2
+ normal22
+ $ cat sub/large2
+ large22
More information about the Mercurial-devel
mailing list