VCP-Source-cvs.stml #6

  • //
  • guest/
  • perforce_software/
  • revml/
  • ui_machines/
  • VCP-Source-cvs.stml
  • View
  • Commits
  • Open Download .zip Download (4 KB)
<!DOCTYPE author [
  <!ENTITY yes_re "qr/\Ay(es)?\z/i" >
  <!ENTITY no_re "qr/\Ano?\z/i" >
  <!ENTITY non_empty_re "qr/./" >
]>

<machine id="VCP::Source::cvs" xmlns="http://slaysys.com/StateML/1.0">

  <!-- ================ TRANSITIONS =================== -->

  <state id="source_cvs_cvsroot_prompt" class-ids="prompt_class">
    <name>cvsroot</name>
    <description>

Enter the cvsroot spec.  Leave empty to use the CVSROOT environment
variable if set.

    </description>

    <arc from="source_prompt" guard="'cvs'" >
      <description>cvs</description>
      <handler>
        require VCP::Source::cvs;
        $ui->{Source} = VCP::Source::cvs->new;
        $ui->{Source}->repo_scheme( 'cvs' );
      </handler>
    </arc>

    <arc to="source_cvs_filespec_prompt" guard="&non_empty_re;">
      <description>cvsroot spec</description>
      <handler>
        $ui->{Source}->repo_server( $answer );
      </handler>
    </arc>

  </state>


  <state id="source_cvs_filespec_prompt" class-ids="prompt_class">
    <name>cvs filespec</name>
    <description>

Enter the cvs filespec.  This must be in the form "module/filespec".
The filespec may contain trailing wildcards, like "a/b/..." to extract
an entire directory tree.

    </description>
    <arc to="source_cvs_working_directory_prompt" guard="&non_empty_re;">
      <handler>
        $ui->{Source}->repo_filespec( $answer );
      </handler>
    </arc>
  </state>


  <state id="source_cvs_working_directory_prompt" class-ids="prompt_class">
    <name>Enter CVS working directory</name>
    <description>

Enter the CVS working directory (Optional). VCP::Source::cvs will cd
to this directory before calling cvs, and won't initialize a CVS
workspace of it's own (normally, VCP::Source::cvs does a "cvs
checkout" in a temporary directory).

    </description>
    <arc to="source_cvs_binary_checkout_prompt">
      <handler>
        $ui->{Source}->{CVS_WORK_DIR} = $answer
            unless empty $answer;
      </handler>
    </arc>
  </state>


  <state id="source_cvs_binary_checkout_prompt" class-ids="prompt_class">
    <name>Force binary checkout?</name>
    <description>

Pass the -kb option to cvs, to force a binary checkout. This is useful
when you want a text file to be checked out with Unix linends, or if
you know that some files in the repository are not flagged as binary
files and should be.

    </description>

    <arc to="source_cvs_use_cvs_prompt" guard="&yes_re;">
      <handler>$ui->{Source}->{CVS_K_OPTION} = "b";</handler>
    </arc>
    <arc to="source_cvs_use_cvs_prompt" guard="&no_re;" />

  </state>


  <state id="source_cvs_use_cvs_prompt" class-ids="prompt_class">
    <name>Use cvs? (rather than reading local repositories directly)</name>
    <description>

Use cvs rather than a direct read of local repositories.  This is
slower, but the option is present in case there are repositories
vcp has trouble reading directly.

    </description>

    <arc to="source_cvs_revision_prompt" guard="&yes_re;">
      <handler>$ui->{Source}->{CVS_USE_CVS} = 1;</handler>
    </arc>
    <arc to="source_cvs_revision_prompt" guard="&no_re;" />

  </state>


  <state id="source_cvs_revision_prompt" class-ids="prompt_class">
    <name>cvs log revision specification</name>
    <description>

Passed to "cvs log" as a "-r" revision specification. This corresponds
to the "-r" option for the rlog command, not either of the "-r"
options for the cvs command.  See rlog(1) man page for the format.

    </description>

    <arc to="source_cvs_date_spec_prompt">
      <handler>
        unless( empty $answer ) {
            $ui->{Source}->rev_spec( $answer );
            $ui->{Source}->force_missing( defined $ui->{Source}->rev_spec );
        }
      </handler>        
    </arc>

  </state>


  <state id="source_cvs_date_spec_prompt" class-ids="prompt_class">
    <name>cvs log date specification</name>
    <description>

Passed to 'cvs log' as a "-d" date specification.  See rlog(1) man
page for the format.

    </description>

    <arc to="dest_prompt">
      <handler>
        $ui->{Source}->date_spec( $answer )
            unless empty $answer;
        $ui->{Source}->init;
      </handler>
    </arc>

  </state>


</machine>
# Change User Description Committed
#22 5398 Barrie Slaymaker - Tweak source .stml files to re-enable a multiple
         choice listing.
#21 4581 Barrie Slaymaker - user prompts have been improved, but not tested
#20 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
#19 4002 Barrie Slaymaker - Interactive UI no longer prompts for CVS -r and -d options
#18 3859 Barrie Slaymaker - New UI files
#17 3675 Barrie Slaymaker - More of a .vcp file is now editable
#16 3667 Barrie Slaymaker - VCP-Source-vss.stml now has atomic questions instead of
  asking for a command-line-like vss: spec
#15 3647 Barrie Slaymaker - All UI prompts & descriptions rewritten.
- Minor tweak to VCP::Dest::p4 P4USER defaulting
#14 3640 Barrie Slaymaker - xmllint no longer require to build UI
- UI now offers multiple choices where appropriate
#13 3547 John Fetkovich Added defaults to yes/no questions (no in all cases)
#12 3523 John Fetkovich more ui defaults and checks added
#11 3521 John Fetkovich default cvsroot from $ENV{CVSROOT}
#10 3502 John Fetkovich removed obsolete commented out (source,dest)->init calls in stml files
#9 3486 John Fetkovich moved (source or dest)->init calls to bin/vcp
#8 3403 John Fetkovich options given on all multiple choice prompts,
       and most free-form prompts where it makes sense
#7 3399 John Fetkovich ui fixes
#6 3395 John Fetkovich various ui refinements
#5 3390 John Fetkovich handlers for cvs ui
#4 3306 Barrie Slaymaker Add StateML namespace support
#3 3260 John Fetkovich Improve some help texts
#2 3254 Barrie Slaymaker Redo machine naminf convention.
#1 3248 John Fetkovich Created VCP-Source-cvs.stml.
Small changes VCP-Source-p4.stml.