2017-04-25 17:29:39 +03:00
|
|
|
#require p4
|
|
|
|
|
2017-05-12 03:13:31 +03:00
|
|
|
$ . $TESTDIR/p4setup.sh
|
|
|
|
$ cat >> $HGRCPATH<<EOF
|
|
|
|
> [extensions]
|
|
|
|
> lfs=$TESTDIR/../hgext3rd/lfs
|
|
|
|
> [p4fastimport]
|
|
|
|
> lfspointeronly=True
|
|
|
|
> lfsmetadata=lfs.sql
|
|
|
|
> [lfs]
|
|
|
|
> threshold=10
|
|
|
|
> EOF
|
2017-04-25 17:29:39 +03:00
|
|
|
|
|
|
|
populate the depot
|
|
|
|
$ mkdir Main
|
|
|
|
$ mkdir Main/b
|
|
|
|
$ echo a > Main/a
|
|
|
|
$ echo c > Main/b/c
|
|
|
|
$ echo thisisasuperlargefilebewithmorethank10ksize >> Main/largefile
|
|
|
|
$ p4 add Main/a Main/b/c Main/largefile
|
|
|
|
//depot/Main/a#1 - opened for add
|
|
|
|
//depot/Main/b/c#1 - opened for add
|
|
|
|
//depot/Main/largefile#1 - opened for add
|
|
|
|
$ p4 submit -d initial
|
|
|
|
Submitting change 1.
|
|
|
|
Locking 3 files ...
|
|
|
|
add //depot/Main/a#1
|
|
|
|
add //depot/Main/b/c#1
|
|
|
|
add //depot/Main/largefile#1
|
|
|
|
Change 1 submitted.
|
|
|
|
|
|
|
|
$ p4 edit Main/a Main/b/c Main/largefile
|
|
|
|
//depot/Main/a#1 - opened for edit
|
|
|
|
//depot/Main/b/c#1 - opened for edit
|
|
|
|
//depot/Main/largefile#1 - opened for edit
|
|
|
|
$ echo a >> Main/a
|
|
|
|
$ echo c >> Main/b/c
|
|
|
|
$ echo thisisasuperlargefilebewithmorethank10ksize >> Main/largefile
|
|
|
|
$ p4 submit -d second
|
|
|
|
Submitting change 2.
|
|
|
|
Locking 3 files ...
|
|
|
|
edit //depot/Main/a#2
|
|
|
|
edit //depot/Main/b/c#2
|
|
|
|
edit //depot/Main/largefile#2
|
|
|
|
Change 2 submitted.
|
|
|
|
|
|
|
|
Simple import
|
|
|
|
|
|
|
|
$ cd $hgwd
|
|
|
|
$ hg init --config 'format.usefncache=False'
|
|
|
|
$ hg p4fastimport --debug -P $P4ROOT hg-p4-import
|
|
|
|
loading changelist numbers.
|
|
|
|
2 changelists to import.
|
|
|
|
loading list of files.
|
|
|
|
3 files to import.
|
2017-05-02 06:43:11 +03:00
|
|
|
reading filelog * (glob)
|
|
|
|
reading filelog * (glob)
|
|
|
|
reading filelog * (glob)
|
2017-04-25 17:29:39 +03:00
|
|
|
importing repository.
|
2017-04-25 17:29:39 +03:00
|
|
|
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
|
|
|
|
writing filelog: a80d06849b33, p1 b789fdd96dc2, linkrev 1, 4 bytes, src: *, path: Main/a (glob)
|
|
|
|
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
|
|
|
|
writing filelog: b11e10a88bfa, p1 149da44f2a4e, linkrev 1, 4 bytes, src: *, path: Main/b/c (glob)
|
|
|
|
writing filelog: b3a729dd094e, p1 000000000000, linkrev 0, 44 bytes, src: *, path: Main/largefile (glob)
|
|
|
|
largefile: Main/largefile, oid: 37a7b43abd9e105a0e6b22088b140735a02f288767fe7a6f4f436cb46b064ca9
|
|
|
|
writing filelog: 9f14f96519e1, p1 b3a729dd094e, linkrev 1, 88 bytes, src: *, path: Main/largefile (glob)
|
|
|
|
largefile: Main/largefile, oid: b0d5c1968efbabbff9d94160f284cd7b52686ca3c46cfffdd351de07384fce9c
|
|
|
|
changelist 1: writing manifest. node: 0637b0361958 p1: 000000000000 p2: 000000000000 linkrev: 0
|
2017-04-25 17:29:39 +03:00
|
|
|
changelist 1: writing changelog: initial
|
2017-04-25 17:29:39 +03:00
|
|
|
changelist 2: writing manifest. node: 31c95d82cc49 p1: 0637b0361958 p2: 000000000000 linkrev: 1
|
2017-04-25 17:29:39 +03:00
|
|
|
changelist 2: writing changelog: second
|
2017-04-25 17:29:39 +03:00
|
|
|
writing lfs metadata to sqlite
|
2017-05-19 01:19:14 +03:00
|
|
|
updating the branch cache (?)
|
2017-04-25 17:29:39 +03:00
|
|
|
2 revision(s), 3 file(s) imported.
|
|
|
|
|
|
|
|
Verify
|
2017-05-12 03:13:31 +03:00
|
|
|
(waiting for https://patchwork.mercurial-scm.org/patch/20582/)
|
2017-04-25 17:29:39 +03:00
|
|
|
|
2017-05-19 08:21:34 +03:00
|
|
|
$ hg --debug verify --config verify.skipflags=8192
|
2017-04-25 17:29:39 +03:00
|
|
|
repository uses revlog format 1
|
|
|
|
checking changesets
|
|
|
|
checking manifests
|
|
|
|
crosschecking files in changesets and manifests
|
|
|
|
checking files
|
|
|
|
3 files, 2 changesets, 6 total revisions
|
|
|
|
|
2017-05-08 21:21:34 +03:00
|
|
|
$ test -d .hg/store/lfs/objects
|
2017-04-25 17:29:39 +03:00
|
|
|
[1]
|
2017-04-25 17:29:39 +03:00
|
|
|
$ sqlite3 lfs.sql "SELECT * FROM p4_lfs_map"
|
|
|
|
1|1|*|37a7b43abd9e105a0e6b22088b140735a02f288767fe7a6f4f436cb46b064ca9|//depot/Main/largefile (glob)
|
|
|
|
2|2|*|b0d5c1968efbabbff9d94160f284cd7b52686ca3c46cfffdd351de07384fce9c|//depot/Main/largefile (glob)
|
2017-04-25 17:29:39 +03:00
|
|
|
|
|
|
|
End Test
|
|
|
|
|
|
|
|
stopping the p4 server
|