diff options
Diffstat (limited to 'ACE/bin/ChangeLogEditor/FileLocatorFactory.pm')
-rw-r--r-- | ACE/bin/ChangeLogEditor/FileLocatorFactory.pm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ACE/bin/ChangeLogEditor/FileLocatorFactory.pm b/ACE/bin/ChangeLogEditor/FileLocatorFactory.pm new file mode 100644 index 00000000000..7b9ba382ebd --- /dev/null +++ b/ACE/bin/ChangeLogEditor/FileLocatorFactory.pm @@ -0,0 +1,34 @@ +package FileLocatorFactory; + +# ************************************************************ +# Description : Create FileLocator objects. +# Author : Chad Elliott +# Create Date : 11/29/2005 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use CVSFileLocator; +use SVNFileLocator; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub create { + switch: { + -d 'CVS' && do { return new CVSFileLocator(); }; + ((defined $ENV{SVN_ASP_DOT_NET_HACK} && -d '_svn') || -d '.svn') + && do { return new SVNFileLocator(); }; + print STDERR "WARNING: Unsupported revision control protocol\n"; + } + + return new FileLocator(); +} + + +1; |