Hi,

Attached is a patch to add Perforce support to CTest. I searched for
instances of GIT in the CTest code and added the equivalent P4
functionality. Hopefully I didn't miss anything!

The source code is very inspired on the GIT implementation and it's fully
featured:

   - Commiters are resolved by issuing the p4 user command, so there is
   information about their full name and E-Mail address.
   - Nighly builds are supported by syncing the repo to the specified point
   in time
   - Updates are properly parsed and all the relevant data (file, modify
   status, description, etc) added to Update.xml
   - It requires an English version of Perforce (use the P4_OPTIONS
   variable, documented below to pass the -L switch to change the message
   language if you installation has a different one). It shouldn't be too hard
   to change the regular expressions used for parsing to not key on a specific
   word but on character ranges. I'll look into that if this becomes an issue.
   - Several CMake variables are defined:
      - P4_CLIENT: this will set the client to use when issuing Perforce
      commands (-c client)
      - P4_OPTIONS: sets any global Perforce options (like charset, host
      name) to be passed before any command: p4 [P4_OPTIONS] sync
      - P4_UPDATE_OPTIONS: Like in GIT, additional flags to be passed when
      doing an Update (p4 sync)
      - CTEST_P4_UPDATE_CUSTOM: Like in GIT, a custom command line to be
      executed when doing an update, instead of the built-in one

Let me know if there are any issues or missing/wrong functionality. I plan
on maintaining the code so please do send bugs and feature requests my way.

Next on my list is adding P4WEB support to CDash!

Pedro

Attachment: 0001-Added-support-for-Perforce.patch
Description: Binary data

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to