put info about what version of perforce this is intended so simulate.

Fix the users to allways have an @something.  Fix the time function
to match the real output.
This commit is contained in:
kestes%walrus.com 2003-05-12 21:54:38 +00:00
Родитель b627674def
Коммит 8004263bb1
1 изменённых файлов: 38 добавлений и 11 удалений

Просмотреть файл

@ -19,8 +19,8 @@
# date/time pairs.
# $Revision: 1.3 $
# $Date: 2003/05/12 17:25:23 $
# $Revision: 1.4 $
# $Date: 2003/05/12 21:54:38 $
# $Author: kestes%walrus.com $
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/vcsim/p4,v $
# $Name: $
@ -83,7 +83,7 @@ $STATE_FILE = "$FileStructure::TINDERBOX_HTML_DIR/p4sim_statefile.txt";
@AUTHORS = qw(
bob@my_workspace steve@ProjectWorkSpace
joe@tmp alice@elm_ws
john jane sue
john@john jane@jane-new sue@micro-pc
) ;
# A list of typical file names.
@ -303,9 +303,13 @@ sub time2perforceFormat {
my ($date_str);
$date_str = sprintf("%04u/%02u/%02u %02u:%02u:%02u",
$year, $mon, $mday, $hour, $min, $sec);
return $date_str;
my $date_str = sprintf("%04u/%02u/%02u",
$year, $mon, $mday);
$time_str = sprintf("%02u:%02u:%02u",
$hour, $min, $sec);
return ($date_str, $time_str);
}
sub perforce_date_str2time {
@ -530,9 +534,10 @@ sub simulate_changes_cmd {
# now print the output.
foreach $i ($start_here .. $#CHANGE_NUMS) {
my ($day, $time)= time2perforceFormat($CHANGE_NUMS[$i]);
my ($date_str, $time_str)=
time2perforceFormat($CHANGE_NUMS[$i]);
my $author = pickone(@AUTHORS);
print "Change $i on $day by $author ".
print "Change $i on $date_str by $author ".
"'some generic truncated comment'\n";
}
@ -569,9 +574,10 @@ sub simulate_describe_cmd {
my $author = pickone(@AUTHORS);
my $comment = pickone(@CHANGESET_COMMENTS);
my $date = time2perforceFormat($change_nums[$change_number]);
my ($date_str, $time_str) =
time2perforceFormat($change_nums[$change_number]);
print "Change $change_number by $author on $date\n";
print "Change $change_number by $author on $date_str\n";
print "\n";
print "$comment";
print "\n";
@ -605,6 +611,13 @@ __END__
-------------------------------------------------
kestes@linux:~/p4> p4 changes -s submitted @2003/05/11,@now
Change 4 on 2003/05/11 by kestes@testworkspace 'try removing a file.<enter desc'
Change 3 on 2003/05/11 by kestes@testworkspace 'test this comment with tabs in '
Change 2 on 2003/05/11 by kestes@testworkspace 'more changes to this test to se'
Change 1 on 2003/05/11 by kestes@testworkspace 'first create a bunch of files w'
kestes@linux:~/p4>
kestes@linux:~/p4> p4 describe -s 3
Change 3 by kestes@testworkspace on 2003/05/11 18:58:44
@ -633,4 +646,18 @@ Affected files ...
... //depot/t2#3 edit
... //depot/t3#3 edit
kestes@linux>
kestes@linux:~/p4>
kestes@linux:~/p4> p4 info
User name: kestes
Client name: testworkspace
Client host: linux
Client root: /home/kestes/p4
Current directory: /home/kestes/p4
Client address: 127.0.0.1:15660
Server address: localhost:1666
Server root: /home/kestes/p4/p4root
Server date: 2003/05/12 14:57:23 -0400 EDT
Server version: P4D/LINUX24X86/2002.2/43337 (2003/04/07)
Server license: none
kestes@linux:~/p4>