<!DOCTYPE author [ <!ENTITY non_empty_re "qr/./" > ]> <machine id="VCP::Source::p4" xmlns="http://slaysys.com/StateML/1.0"> <!-- ================ TRANSITIONS =================== --> <state id="source_p4_run_p4d_prompt" class-ids="prompt_class"> <name>Launch a p4d for the source</name> <description> In order to convert to a Perforce (p4) destination repository, you must have a Perforce server (p4d) running and accessible to VCP. If you do not have a p4d running, select "yes". VCP will automatically start a p4d daemon listening on a random high- numbered TCP port. This daemon will create an offline Perforce repository in a local directory that you specify. If you already have a p4d server running, and you want to store your converted repository in this server, select "no". You will be prompted for the P4PORT of the server. Launch a new p4d for the destination repository? </description> <entry-handler> if ( $ui->in_edit_mode ) { $default = $ui->source->{P4_RUN_P4D} ? "yes" : "no" ; $is_current_value = 1; } else { $default = "no"; } </entry-handler> <arc from="source_type_prompt" guard="'p4'"> <description>p4</description> <handler> $ui->new_source( $answer ); </handler> </arc> <arc to="source_p4_p4d_dir_prompt" guard="'yes'"> <description>yes</description> <handler> my $old = $ui->source->{P4_RUN_P4D} ? 1 : 0; $answer = 1; $ui->source->repo_server( undef ) if $ui->in_edit_mode and $old != $answer; $ui->source->{P4_RUN_P4D} = $answer; </handler> </arc> <arc to="source_p4_host_prompt" guard="'no'"> <description>no</description> <handler> my $old = $ui->source->{P4_RUN_P4D} ? 1 : 0; $answer = 0; $ui->source->repo_server( undef ) if $ui->in_edit_mode and $old != $answer; $ui->source->{P4_RUN_P4D} = $answer; </handler> </arc> </state> <state id="source_p4_p4d_dir_prompt" class-ids="prompt_class"> <name>Source P4ROOT</name> <description> The directory of the source repository. The source p4d will be launched here. </description> <entry-handler> if ( $ui->in_edit_mode ) { $default = $ui->source->repo_server ; $is_current_value = 1; } </entry-handler> <arc to="source_p4_user_prompt" guard="&non_empty_re;"> <handler> # will set repo_server $ui->source->ui_set_p4d_dir( $answer ) ; </handler> </arc> </state> <state id="source_p4_host_prompt" class-ids="prompt_class"> <name>Source P4PORT</name> <description> Enter the name and port of the p4d to read from, separated by a colon. Defaults to what is in config file, then the P4HOST environment variable if set or "perforce:1666" if not. </description> <entry-handler> my $h = $ui->source->p4_get_settings; if ( $ui->in_edit_mode ) { $default = $ui->source->repo_server ; $is_current_value = 1; } else { $default = empty $h->{P4HOST} ? "perforce:1666" : $h->{P4HOST} ; } </entry-handler> <arc to="source_p4_user_prompt" guard="&non_empty_re;"> <description>perforce:1666</description> <handler> $ui->source->repo_server( $answer ); </handler> </arc> </state> <state id="source_p4_user_prompt" class-ids="prompt_class"> <name>Source P4USER</name> <description> Enter the P4USER value needed to access the server. Defaults to the P4USER value reported by p4 set (with a final default to the USER environment variable if p4 set does not return anything). </description> <entry-handler> if ( $ui->in_edit_mode ) { $default = $ui->source->repo_user; $is_current_value = 1; } else { my $h = $ui->source->p4_get_settings; $default = empty $h->{P4USER} ? ( empty $ENV{USER} ? undef : $ENV{USER} ) : $h->{P4USER} ; } </entry-handler> <arc to="source_p4_password_prompt" guard="&non_empty_re;"> <handler> $ui->source->repo_user( $answer ); </handler> </arc> </state> <state id="source_p4_password_prompt" class-ids="prompt_class"> <name>Source P4PASSWD</name> <description> If a password (P4PASSWD) is needed to access the server, enter it here. Defaults to the current P4PASSWD if one is set. WARNING: entering a password will cause it to be echoed in plain text to the terminal. NOTE: When running VCP, if you have a P4PASSWD set in environment or in the registry (on Win32, that is), it will be used by the p4 command if you don't enter a password here. </description> <entry-handler> if ( $ui->in_edit_mode ) { unless ( empty $ui->source->repo_password ) { $description .= "Enter \"NONE\" to use no password.\n\n"; $default = "** current password **"; $is_current_value = 1; } } else { my $h = $ui->source->p4_get_settings; unless ( empty $h->{P4PASSWD} ) { $description .= "Enter \"NONE\" to use no password.\n\n"; $default = "** current P4PASSWD **" } } </entry-handler> <arc to="source_p4_filespec_prompt"> <handler> if ( $answer =~ /\A"?NONE"?\z/i ) { $answer = undef; print "\nP4PASSWD will not be set.\n"; } elsif ( $answer eq "** current password **" ) { $answer = $ui->source->repo_password; } elsif ( $answer eq "** current P4PASSWD **" ) { $answer = $ui->source->p4_get_settings->{P4PASSWD}; } $ui->source->repo_password( $answer ); </handler> </arc> </state> <state id="source_p4_filespec_prompt" class-ids="prompt_class"> <name>Source File specification</name> <description> If you want to copy a portion of the source repository, enter a p4 filespec starting with the depot name. Do not enter any revision or change number information. </description> <entry-handler> if ( $ui->in_edit_mode ) { $default = $ui->source->repo_filespec; $is_current_value = 1; } </entry-handler> <arc to="dest_id_prompt" guard="qr{\A//.+}"> <description>//depot/directory-path/...</description> <handler> $ui->source->repo_filespec( $answer ); </handler> </arc> </state> <!-- leave bootstrap off the GUI for now <state id="source_p4_bootstrap_prompt" class-ids="prompt_class"> <name>Files to export in bootstrap mode</name> <description> Forces bootstrap mode for an entire export ("-b ...") or for certain files. Filenames may contain wildcards, see the Regexp::Shellish manpage for details on what wildcards are accepted. </description> <arc to="continue" guard="validate Regexp::Shellish wildcard"/> </state> --> <!-- leave continue out of the GUI for now <state id="source_p4_continue_prompt" class-ids="prompt_class"> <name>Continue</name> <description> Starts this transfer where the previous one (to the same destination) left off. This uses the destination's state database to detect what was transferred last time and to begin this transfer where the previous one left off. </description> <arc to="follow_branch_into" /> </state> --> <!-- leave follow branch into out of the GUI for now (because rev-root not in gui) <state id="source_p4_follow_branch_into_prompt" class-ids="prompt_class"> <name>Follow 'branch into' flag</name> <description> Causes VCP to notice "branch into" messages in the output of p4's filelog command and. If the file that's the target of the p4 integrate (branch) command is revision number #1, adds the target to the list of exported files. This usually needs a rev-root option to set the rev root to be high enough in the directory tree to include all branches (it's an error to export a file that is not under the rev root). </description> <arc to="dest_id_prompt" /> </state> --> </machine>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 6118 | Dimitry Andric | Integ from //public/revml to //guest/dimitry_andric/revml/main. | ||
//guest/perforce_software/revml/ui_machines/VCP-Source-p4.stml | |||||
#37 | 5397 | Barrie Slaymaker | - Update P4PASSWD prompts to allow for not setting P4PASSWD | ||
#36 | 4581 | Barrie Slaymaker | - user prompts have been improved, but not tested | ||
#35 | 4064 | Barrie Slaymaker |
- RevML is no longer offered in the UI - Sources and dests are given an id in the UI - The .vcp file name defaulting now works |
||
#34 | 3859 | Barrie Slaymaker | - New UI files | ||
#33 | 3669 | Barrie Slaymaker | - VCP-Source-*.stml now use new_source | ||
#32 | 3647 | Barrie Slaymaker |
- All UI prompts & descriptions rewritten. - Minor tweak to VCP::Dest::p4 P4USER defaulting |
||
#31 | 3640 | Barrie Slaymaker |
- xmllint no longer require to build UI - UI now offers multiple choices where appropriate |
||
#30 | 3547 | John Fetkovich | Added defaults to yes/no questions (no in all cases) | ||
#29 | 3538 | John Fetkovich | bug fix P4PASSWD defaulting | ||
#28 | 3518 | John Fetkovich | more interactive ui improvements | ||
#27 | 3515 | John Fetkovich | added P4HOST default | ||
#26 | 3514 | John Fetkovich | p4 password defaulting | ||
#25 | 3513 | John Fetkovich | defaulting of p4 user variable | ||
#24 | 3512 | John Fetkovich | enhanced ui checks on repo_server | ||
#23 | 3502 | John Fetkovich | removed obsolete commented out (source,dest)->init calls in stml files | ||
#22 | 3486 | John Fetkovich | moved (source or dest)->init calls to bin/vcp | ||
#21 | 3403 | John Fetkovich |
options given on all multiple choice prompts, and most free-form prompts where it makes sense |
||
#20 | 3398 | John Fetkovich | prompt language improvement | ||
#19 | 3395 | John Fetkovich | various ui refinements | ||
#18 | 3383 | John Fetkovich |
removed setting of repo_id, it's now done in 'sub init' in the sources and dests |
||
#17 | 3375 | John Fetkovich | more ui changes | ||
#16 | 3306 | Barrie Slaymaker | Add StateML namespace support | ||
#15 | 3305 | John Fetkovich |
added calls to set fields in p4 source and dest state machines, and then call to init |
||
#14 | 3289 | John Fetkovich | |||
#13 | 3260 | John Fetkovich | Improve some help texts | ||
#12 | 3255 | Barrie Slaymaker |
Add in support for <arc> <handler>s. Requires latest StateML. See VCP-Source-p4.stml for an example. Calls VCP::Source::p4 in an unsupported way resulting in death. |
||
#11 | 3254 | Barrie Slaymaker | Redo machine naminf convention. | ||
#10 | 3249 | John Fetkovich | small fix | ||
#9 | 3248 | John Fetkovich |
Created VCP-Source-cvs.stml. Small changes VCP-Source-p4.stml. |
||
#8 | 3240 | Barrie Slaymaker | UI definition cleanup | ||
#7 | 3239 | Barrie Slaymaker | Fix VCP-Source-p4 stml buglets. | ||
#6 | 3238 | John Fetkovich | small changes | ||
#5 | 3237 | Barrie Slaymaker | More work on the UI StateML conventions | ||
#4 | 3236 | John Fetkovich | added more states, but not complete | ||
#3 | 3234 | Barrie Slaymaker | More updates, passes make ui now. | ||
#2 | 3231 | Barrie Slaymaker | work on STML->source code conventions | ||
#1 | 3229 | Barrie Slaymaker | Add more .stml files |