[PATCH 4 of 4] largefiles: add test for removing largefiles

Na'Tosha Bard natosha at unity3d.com
Wed Oct 5 11:31:28 CDT 2011


# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1317831700 -7200
# Node ID ca5474e72b2849ae5daf647c1bd9f14c1c5ed416
# Parent  001e00c052f2908f4469ade50738ef064f43a6b5
largefiles: add test for removing largefiles

diff -r 001e00c052f2 -r ca5474e72b28 tests/test-largefiles-remove.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-largefiles-remove.t	Wed Oct 05 18:21:40 2011 +0200
@@ -0,0 +1,35 @@
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > largefiles=
+  > EOF
+
+Create repo and test removing a largefile (this has been very error-prone
+in the past)
+
+  $ hg init a
+  $ cd a
+  $ echo large1 > large1
+  $ hg add --large large1
+  $ hg st
+  A large1
+  $ hg commit -m "add largefile"
+  $ hg st
+  $ hg remove large1
+  $ hg st
+  R large1
+  $ hg commit -m "remove largefile"
+  $ hg st
+
+Test the same thing, but specify the removed file in the commit.
+
+  $ echo large2 > large2
+  $ hg add --large large2
+  $ hg st
+  A large2
+  $ hg commit -m "add largefile"
+  $ hg st
+  $ hg remove large2
+  $ hg st
+  R large2
+  $ hg commit large2 -m "remove largefile"
+  $ hg st


More information about the Mercurial-devel mailing list