[PATCH] RE: largefiles: lfconvert testcase
Carter, Eli
Eli.Carter at tektronix.com
Tue Oct 18 17:31:16 CDT 2011
Finally found the problem. Testcase and bugfix patch included. This patch applies on top of my earlier "[PATCH] largefiles: fix requirements for converted repositories" patch.
Eli
# HG changeset patch
# User Eli Carter <eli.carter at tektronix.com>
# Date 1318976906 18000
# Branch stable
# Node ID 0ad1be36c8f36b86bf31bbb6003c5287ed74a15b
# Parent 3b136c0314a52b64db3c6afc6269805959b765fd
largefiles: fix newline for lfconverted repos
diff -r 3b136c0314a5 -r 0ad1be36c8f3 hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py Tue Oct 18 16:40:59 2011 -0500
+++ b/hgext/largefiles/lfcommands.py Tue Oct 18 17:28:26 2011 -0500
@@ -291,7 +291,7 @@
# doesn't change after rename or copy
renamed = lfutil.standin(renamed[0])
- return context.memfilectx(f, lfiletohash[srcfname], 'l' in
+ return context.memfilectx(f, lfiletohash[srcfname] + '\n', 'l' in
fctx.flags(), 'x' in fctx.flags(), renamed)
else:
try:
diff -r 3b136c0314a5 -r 0ad1be36c8f3 tests/test-largefiles.t
--- a/tests/test-largefiles.t Tue Oct 18 16:40:59 2011 -0500
+++ b/tests/test-largefiles.t Tue Oct 18 17:28:26 2011 -0500
@@ -465,5 +465,21 @@
fncache
store
dotencode
+
+Make sure that lfconvert includes a newline at the end of the standin files.
+ $ cd largefiles-repo
+ $ hg up
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ getting changed largefiles
+ 1 largefiles updated, 0 removed
+ $ cat .hglf/a-large-file
+ 8b0629c630f530cde051aeb42ce561756738fbe7
+ $ dd if=/dev/zero bs=1k count=11k > another-large-file 2> /dev/null
+ $ hg add another-large-file
+ $ hg commit -m "Commit another file that should get automatically added as a largefile"
+ $ cat .hglf/a-large-file .hglf/another-large-file
+ 8b0629c630f530cde051aeb42ce561756738fbe7
+ 187a0f76e02aac9c24f71c820be1f34ef1c76e76
+ $ cd ..
$ rm -rf bigfile-repo largefiles-repo
More information about the Mercurial-devel
mailing list