diff options
author | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-01 03:58:55 +0000 |
---|---|---|
committer | dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-08-01 03:58:55 +0000 |
commit | 91558de243c964ca065ea639d1a9f766cc90d20f (patch) | |
tree | c494914241c109e6776bd41d7eb789f85197b516 /src | |
parent | b40b4a247b92994a17c7d8a3bfb4de874976d945 (diff) |
BUILD : 1.7.4 (299) BUGS : none NOTES : Fixed repository decteion and added -P flag for am script.
git-svn-id: svn://svn.anope.org/anope/trunk@299 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@187 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rwxr-xr-x | src/bin/am | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/bin/am b/src/bin/am index 14b6d8638..650449437 100755 --- a/src/bin/am +++ b/src/bin/am @@ -47,6 +47,7 @@ my $wget = "$svnpath/wget"; my ( $rev, $branch, + $proto, $tag, $ftp, $dst, @@ -96,7 +97,7 @@ sub usage() # --create-branch to create a branch # --create-tag to create a tag # --switch to switch between branches/tags - print "Usage: $0 <-g | -p | -f> [-r revision | -b branch | -t tag] <destination>\n"; + print "Usage: $0 <-g | -p | -f> [-r revision | -b branch | -t tag | -P proto] <destination>\n"; print " Operations:\n"; print " -g Get Operation\n"; print " -p Put Operation\n"; @@ -105,6 +106,7 @@ sub usage() print " -r revision Retrieve by revision number\n"; print " -b branch Retrieve by branch name\n"; print " -t tag Retrieve by tag name\n"; + print " -P proto Retrieve by prototype name\n"; print " Destination:\n"; print " The working copy to perform the operation in or to. The script will \n"; print " try to guess where that is, unless you provide a specific path.\n"; @@ -180,6 +182,10 @@ sub do_get() { } elsif ($branch) { $selector = "branches/$branch"; $copy = $copy . "-$branch"; + } elsif ($proto) { + $selector = "branches/proto/$proto"; + $copy = "$proto"; + print "PROT: $proto SEL: $selector COPY: $copy\n"; } else { $selector = "trunk"; } @@ -313,6 +319,19 @@ sub do_put() { # Greet the developer banner(); + + + # Check to see if we need to update our working copy first. + my $svnrepo; + open (IN, "$svn info|"); + while (<IN>) { + if (/URL/) { + $svnrepo = "$_"; + $svnrepo =~ s/URL: //; + } + } + close(IN); + print "*** Repository : $svnroot \n"; print "*** Working copy : $dst \n" ; print "*** Current ver. : $cver \n"; @@ -385,7 +404,7 @@ NOTES : "; { usage() if (! @ARGV); - my $opt = 'hgpf:r:b:t:'; + my $opt = 'hgpf:r:b:t:P:'; getopts ("$opt", \%opt) or usage(); usage() if $opt{h}; @@ -395,11 +414,13 @@ NOTES : "; usage() if ($opt{r} && $opt{b}); usage() if ($opt{r} && $opt{t}); usage() if ($opt{b} && $opt{t}); + usage() if ($opt{b} && $opt{P}); $rev = $opt{r} ; $branch = $opt{b} ; $tag = $opt{t} ; $ftp = $opt{f} ; + $proto = $opt{P} ; $dst = shift; if ($rev ne undef) { |