mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
1d63473120
Summary: This change: Moves some opts sanitizing logic into function `sanitizeopts` Adds checks for `limit` being a positive integer Uses `sanitizeopts` new function in p4seqimport Adds a test covering `sanitizeopts` For a high-level overview of p4seqimport, please check https://our.intern.facebook.com/intern/wiki/IDI/p4seqimport/ Differential Revision: D7035217 fbshipit-source-id: cd677fb254ff83d123673d51a1c682639de08a30
25 lines
536 B
Perl
25 lines
536 B
Perl
#require p4
|
|
|
|
$ . $TESTDIR/p4setup.sh
|
|
$ cd $hgwd
|
|
$ hg init --config 'format.usefncache=False'
|
|
|
|
Verifies limit is a positive integer
|
|
|
|
$ hg p4seqimport --limit -10 -P $P4ROOT $P4CLIENT
|
|
abort: --limit should be > 0, got -10
|
|
[255]
|
|
$ hg p4seqimport --limit foo -P $P4ROOT $P4CLIENT
|
|
abort: --limit should be an integer, got foo
|
|
[255]
|
|
|
|
Ensures --base requests bookmark to be provided
|
|
|
|
$ hg p4seqimport --base 10 -P $P4ROOT $P4CLIENT
|
|
abort: must set --bookmark when using --base
|
|
[255]
|
|
|
|
End Test
|
|
|
|
stopping the p4 server
|