mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
a94a1bd72a
Summary: This diff adds a shared `p4setup.sh` that de-duplicates common logic among tests. It also uses absolute path to make sure the extension being tested is the version being developed. The LFS test is also workarounded temporarily waiting for upstream change. Test Plan: Run existing tests Reviewers: #mercurial, davidsp Reviewed By: davidsp Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D5049279 Signature: t1:5049279:1494547832:28222fd2034115faca73860d6dd2f19206701aaa
80 lines
2.3 KiB
Perl
80 lines
2.3 KiB
Perl
#require p4
|
|
|
|
$ . $TESTDIR/p4setup.sh
|
|
|
|
populate the depot
|
|
$ mkdir Main
|
|
$ mkdir Main/b
|
|
$ echo a > Main/a
|
|
$ echo c > Main/b/c
|
|
$ echo d > Main/d
|
|
$ p4 add Main/a Main/b/c Main/d
|
|
//depot/Main/a#1 - opened for add
|
|
//depot/Main/b/c#1 - opened for add
|
|
//depot/Main/d#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/d#1
|
|
Change 1 submitted.
|
|
|
|
$ p4 delete Main/a
|
|
//depot/Main/a#1 - opened for delete
|
|
$ p4 submit -d second
|
|
Submitting change 2.
|
|
Locking 1 files ...
|
|
delete //depot/Main/a#2
|
|
Change 2 submitted.
|
|
|
|
$ echo a > Main/a
|
|
$ p4 add Main/a
|
|
//depot/Main/a#2 - opened for add
|
|
$ p4 submit -d third
|
|
Submitting change 3.
|
|
Locking 1 files ...
|
|
add //depot/Main/a#3
|
|
Change 3 submitted.
|
|
|
|
Simple import
|
|
|
|
$ cd $hgwd
|
|
$ hg init --config 'format.usefncache=False'
|
|
$ hg p4fastimport --debug -P $P4ROOT hg-p4-import
|
|
loading changelist numbers.
|
|
3 changelists to import.
|
|
loading list of files.
|
|
3 files to import.
|
|
reading filelog * (glob)
|
|
reading filelog * (glob)
|
|
reading filelog * (glob)
|
|
importing repository.
|
|
writing filelog: b789fdd96dc2, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/a (glob)
|
|
writing filelog: f9597ff22e3f, p1 b789fdd96dc2, linkrev 2, 2 bytes, src: *, path: Main/a (glob)
|
|
writing filelog: 149da44f2a4e, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/b/c (glob)
|
|
writing filelog: a9092a3d84a3, p1 000000000000, linkrev 0, 2 bytes, src: *, path: Main/d (glob)
|
|
changelist 1: writing manifest. node: a9f7e8df2a65 p1: 000000000000 p2: 000000000000 linkrev: 0
|
|
changelist 1: writing changelog: initial
|
|
changelist 2: writing manifest. node: 572c24bb3dc1 p1: a9f7e8df2a65 p2: 000000000000 linkrev: 1
|
|
changelist 2: writing changelog: second
|
|
changelist 3: writing manifest. node: f1f6d03759eb p1: 572c24bb3dc1 p2: 000000000000 linkrev: 2
|
|
changelist 3: writing changelog: third
|
|
3 revision(s), 3 file(s) imported.
|
|
|
|
Verify
|
|
|
|
$ hg verify
|
|
checking changesets
|
|
checking manifests
|
|
crosschecking files in changesets and manifests
|
|
checking files
|
|
3 files, 3 changesets, 4 total revisions
|
|
|
|
$ hg update tip
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
End Test
|
|
|
|
stopping the p4 server
|