Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. # __________________________________________________________________________________
  2. #
  3. # Purpose:
  4. # PERL Script to emulate SLM's 'defect' command
  5. #
  6. # Parameters:
  7. # See Usage below
  8. #
  9. # Output:
  10. # Perforce output or the appropriate error message or usage statement
  11. #
  12. # __________________________________________________________________________________
  13. #
  14. # Load common SLM wrapper subroutine module
  15. #
  16. use SlmSubs;
  17. #
  18. # Parse command line arguments
  19. #
  20. SlmSubs::ParseArgs(@ARGV);
  21. #
  22. # Call usage and exit if ParseArgs has set the Usage or InvalidFlag flags
  23. #
  24. if ($Usage or $InvalidFlag)
  25. {
  26. print $ErrorMessage;
  27. &Usage;
  28. exit 1;
  29. }
  30. #
  31. # So far this is just a wrapper for ssync -rg
  32. #
  33. system "p4ssync -rg";
  34. sub Usage
  35. # __________________________________________________________________________________
  36. #
  37. # Prints out a usage statement for this script. In this case usurped from SLM's
  38. # 'defect' usage statement
  39. #
  40. # Parameters:
  41. # None
  42. #
  43. # Output:
  44. # The usage statement
  45. #
  46. # __________________________________________________________________________________
  47. {
  48. print q/defect - defects a directory from project
  49. Usage: defect [-?fh]
  50. Arguments:
  51. -h prints out this message.
  52. /;
  53. }