You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
|
Dec
|
---|
From: Tom R. <tl...@us...> - 2001-10-27 00:53:55
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv29230 Modified Files: README-cvs Log Message: How to fix a pserver-related error. Index: README-cvs =================================================================== RCS file: /cvsroot/wide/cli/README-cvs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README-cvs 2001/10/11 18:30:23 1.1 +++ README-cvs 2001/10/27 00:53:52 1.2 @@ -6,3 +6,15 @@ In all cases, you need GNU Autoconf 2.50 (or greater) and GNU Automake 1.5 (or greater). + +Developers: note that you may encounter the following error + +> cvs [server aborted]: "commit" requires write access to the repository + +if you commit using the 'pserver' method, e.g. + +> cvs -z3 -d:pserver:YO...@cv...:/cvsroot/wide ci WHATEVER + +Use the 'ext' method instead, e.g. + +> cvs -z3 -d:ext:YO...@cv...:/cvsroot/wide ci WHATEVER |
From: Tom R. <tl...@us...> - 2001-10-27 00:37:37
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv26341 Modified Files: README Log Message: Added guidance for bug reporting and installation. Index: README =================================================================== RCS file: /cvsroot/wide/cli/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 2001/10/11 17:59:09 1.1 +++ README 2001/10/27 00:37:34 1.2 @@ -0,0 +1,45 @@ +Bienvenue! Welcome! + +If you encounter difficulties at any time, please contact the WIDE +team at + +wi...@li... + +or submit a bug via + +https://sourceforge.net/tracker/?group_id=35797&atid=415680 + +INSTALLATION + +Building cli requires GNU Autoconf 2.50 (or greater), GNU Automake +1.5 (or greater), and GNU Make (minimum version unknown, 3.79.1 is +known to work). The following instructions assume you are using a +bash-like shell. + +After a fresh checkout, you need to build 'configure' and the +'Makefile's. From our top-level directory (.../cli), you can do this +by running either + +> ./tools/autogen.sh + +or + +> make + +(with '>' representing your prompt). After '.../cli/configure' is +built, run it: either + +> ./configure + +or, if you need to install locally, try something like + +> ./configure --prefix $HOME + +(Replace '$HOME' with the directory of your choice.) + +You should then be able to + +> make +> make install + +Te réjouir! Enjoy! |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-26 17:43:16
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv7810/src Modified Files: sf.in Log Message: * src/sf.in: Simplify $foo{'bar'} into $foo{bar}. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sf.in 2001/10/25 20:17:58 1.8 +++ sf.in 2001/10/26 17:43:11 1.9 @@ -355,18 +355,18 @@ name="preformatted" [^>]* (checked)? # $6 == preformatted }soix; - $info{'release_date'} = $1; - $info{'release_name'} = $2; - $info{'status_id'} = $3; - $info{'release_notes'} = $4; - $info{'release_changes'} = $5; - $info{'preformatted'} = $6; + $info{release_date} = $1; + $info{release_name} = $2; + $info{status_id} = $3; + $info{release_notes} = $4; + $info{release_changes} = $5; + $info{preformatted} = $6; my @files = (); push @files, $1 while ($content =~ m{ 'file_list\[\]' .*? value=$quotedfield }sgoix); - $info{'ftp_files'} = [@files]; + $info{ftp_files} = [@files]; # FIXME: Parse the file list of the project. @@ -420,6 +420,7 @@ -g, --group=NUMBER group id of the project -p, --package=NUMBER package id of the package -r, --release=NUMBER release id of the release to get info about + EOT print 'Report bugs to <@PACKAGE_BUGREPORT@>' . "\n"; exit; @@ -444,9 +445,9 @@ sub process_login (@) { my (%opt) = @_; - emsg (1, "use -l to specify login") unless (defined $opt{'login'}); - emsg (1, "use -p to specify password") unless (defined $opt{'passwd'}); - sf_login (initialize_agent, $opt{'login'}, $opt{'passwd'}); + emsg (1, "use -l to specify login") unless (defined $opt{login}); + emsg (1, "use -p to specify password") unless (defined $opt{passwd}); + sf_login (initialize_agent, $opt{'login'}, $opt{passwd}); } @@ -466,7 +467,7 @@ emsg (1, "use -g to specify the project's group id") unless (defined $opt{'group'}); - my %pkg = sf_listpkg (initialize_agent, $opt{'group'}); + my %pkg = sf_listpkg (initialize_agent, $opt{group}); print "$_\t" . $pkg{$_} . "\n" foreach keys %pkg; } @@ -478,14 +479,14 @@ { my (%opt) = @_; emsg (1, "use -g to specify the project's group id") - unless (defined $opt{'group'}); + unless (defined $opt{group}); emsg (1, "use -p to specify the package id (as listed by listpkg)") - unless (defined $opt{'package'}); + unless (defined $opt{package}); emsg (1, "use -n to specify the name of the new release") - unless (defined $opt{'name'}); + unless (defined $opt{name}); my $relid = sf_createrel (initialize_agent, - $opt{'group'}, $opt{'package'}, $opt{'name'}); + $opt{group}, $opt{package}, $opt{name}); print "$relid\n"; } @@ -496,11 +497,11 @@ { my (%opt) = @_; emsg (1, "use -g to specify the project's group id") - unless (defined $opt{'group'}); + unless (defined $opt{group}); emsg (1, "use -p to specify the package id (as listed by listpkg)") - unless (defined $opt{'package'}); + unless (defined $opt{package}); - my @rel = sf_listrel (initialize_agent, $opt{'group'}, $opt{'package'}); + my @rel = sf_listrel (initialize_agent, $opt{group}, $opt{package}); while ($#rel >= 0) { @@ -517,24 +518,24 @@ { my (%opt) = @_; emsg (1, "use -g to specify the project's group id") - unless (defined $opt{'group'}); + unless (defined $opt{group}); emsg (1, "use -p to specify the package id (as listed by listpkg)") - unless (defined $opt{'package'}); + unless (defined $opt{package}); emsg (1, "use -r to specify the release id (as listed by listrel)") - unless (defined $opt{'release'}); + unless (defined $opt{release}); my %info = sf_relinfo (initialize_agent, - $opt{'group'}, $opt{'package'}, $opt{'release'}); + $opt{group}, $opt{package}, $opt{release}); - print "Date:\t$info{'release_date'}\n"; - print "Name:\t$info{'release_name'}\n"; - print "Status:\t@{[($info{'status_id'}==Active)? 'active' : 'hidden']}\n"; - print "Notes:\n$info{'release_notes'}\n"; - print "Changes:\n$info{'release_changes'}\n"; - print "Preformatted:\t@{[$info{'preformatted'} ? 'yes' : 'no']}\n"; + print "Date:\t$info{release_date}\n"; + print "Name:\t$info{release_name}\n"; + print "Status:\t@{[($info{status_id}==Active)? 'active' : 'hidden']}\n"; + print "Notes:\n$info{release_notes}\n"; + print "Changes:\n$info{release_changes}\n"; + print "Preformatted:\t@{[$info{preformatted} ? 'yes' : 'no']}\n"; print "---\n"; - print "File addable to this release (from incoming):\n"; - print " $_\n" foreach (@{$info{'ftp_files'}}); + print "Files addable to this release (from incoming):\n"; + print " $_\n" foreach (@{$info{ftp_files}}); } # process_options |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-26 17:43:16
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv7810 Modified Files: ChangeLog Log Message: * src/sf.in: Simplify $foo{'bar'} into $foo{bar}. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ChangeLog 2001/10/25 20:17:58 1.9 +++ ChangeLog 2001/10/26 17:43:11 1.10 @@ -1,3 +1,7 @@ +2001-10-26 Alexandre Duret-Lutz <du...@ep...> + + * src/sf.in: Simplify $foo{'bar'} into $foo{bar}. + 2001-10-25 Alexandre Duret-Lutz <du...@ep...> * src/sf.in (process_options) <commands>: Add relinfo. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-25 20:18:06
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv8419 Modified Files: ChangeLog Log Message: * src/sf.in (process_options) <commands>: Add relinfo. (process_relinfo, sf_relinfo): New functions. (print_usage): Add help for relinfo. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ChangeLog 2001/10/24 20:34:48 1.8 +++ ChangeLog 2001/10/25 20:17:58 1.9 @@ -1,3 +1,9 @@ +2001-10-25 Alexandre Duret-Lutz <du...@ep...> + + * src/sf.in (process_options) <commands>: Add relinfo. + (process_relinfo, sf_relinfo): New functions. + (print_usage): Add help for relinfo. + 2001-10-24 Alexandre Duret-Lutz <du...@ep...> * tools/autogen.sh: Sync with the latest version from Heroes 0.15. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-25 20:18:06
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv8419/src Modified Files: sf.in Log Message: * src/sf.in (process_options) <commands>: Add relinfo. (process_relinfo, sf_relinfo): New functions. (print_usage): Add help for relinfo. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- sf.in 2001/10/24 19:51:59 1.7 +++ sf.in 2001/10/25 20:17:58 1.8 @@ -275,11 +275,11 @@ # sf_listrel (AGENT, GROUPID, PACKAGEID) # -------------------------------------- # Return release registered for package #PACKAGEID in group #GROUPID. -# The return value is a list in wich even items are release names and +# The return value is an array in wich even items are release names and # odd items are release IDs. -# This need to be a list (in other words it can't be a hash) because +# This need to be an array (in other words it can't be a hash) because # several releases might share the same name. -# Yet, assigning this list to a hash will produce a meaningful hash +# Yet, assigning this array to a hash will produce a meaningful hash # (with duplicates removed). sub sf_listrel ($$$) { @@ -303,6 +303,76 @@ return @releases; } +# sf_relinfo (AGENT, GROUPID, PACKAGEID, RELEASEID) +# ------------------------------------------------- +# Return a hash containing the following info about the specified +# release: +# release_date => a string +# release_name => a string +# status_id => an integer (1 == Active, 3 == Hidden) +# release_notes => a string +# release_changes => a string +# ftp_files => a reference to an array +use constant Active => 1; +use constant Hidden => 3; +sub sf_relinfo ($$$$) +{ + my ($agent, $group, $packageid, $releaseid) = @_; + + my $req = GET ("https://sourceforge.net/project/admin/editreleases.php" + . "?package_id=$packageid&release_id=$releaseid" + . "&group_id=$group"); + + my $res = send_request ('RELINFO', $agent, $req); + + emsg (1, "Relinfo failed.") + unless $res->is_success && ! $res->is_redirect; + + my $content = $res->content (); + emsg (1, "Permission denied.") if $content =~ /PERMISSION DENIED/; + + my %info = (); + + # Declare this pattern separately, otherwise the unclosed double + # quote make perl-mode unusable... + my $quotedfield = "[\"']([^\"']*)[\"']"; + + emsg (1, "Relinfo failed to grok data.") unless $content =~ m{ + name="release_date" \s* value=$quotedfield # $1 == release_date + .*? + name="release_name" \s* value=$quotedfield # $2 == release_name + .*? + NAME="status_id" + .*? + OPTION \s* VALUE=$quotedfield \s* SELECTED # $3 == status_id + .*? + <textarea .*? name="release_notes" [^>]* + >([^<]*)< # $4 == release notes + .*? + <textarea .*? name="release_changes" [^>]* + >([^<]*)< # $5 == release changes + .*? + name="preformatted" [^>]* (checked)? # $6 == preformatted + }soix; + + $info{'release_date'} = $1; + $info{'release_name'} = $2; + $info{'status_id'} = $3; + $info{'release_notes'} = $4; + $info{'release_changes'} = $5; + $info{'preformatted'} = $6; + + my @files = (); + push @files, $1 + while ($content =~ m{ 'file_list\[\]' .*? value=$quotedfield }sgoix); + + $info{'ftp_files'} = [@files]; + + # FIXME: Parse the file list of the project. + + return %info; +} + ######################################################################## # # User interface @@ -346,6 +416,10 @@ Logout options: none +Relinfo options: + -g, --group=NUMBER group id of the project + -p, --package=NUMBER package id of the package + -r, --release=NUMBER release id of the release to get info about EOT print 'Report bugs to <@PACKAGE_BUGREPORT@>' . "\n"; exit; @@ -437,6 +511,32 @@ } +# process_relinfo (HASH) +# ---------------------- +sub process_relinfo (@) +{ + my (%opt) = @_; + emsg (1, "use -g to specify the project's group id") + unless (defined $opt{'group'}); + emsg (1, "use -p to specify the package id (as listed by listpkg)") + unless (defined $opt{'package'}); + emsg (1, "use -r to specify the release id (as listed by listrel)") + unless (defined $opt{'release'}); + + my %info = sf_relinfo (initialize_agent, + $opt{'group'}, $opt{'package'}, $opt{'release'}); + + print "Date:\t$info{'release_date'}\n"; + print "Name:\t$info{'release_name'}\n"; + print "Status:\t@{[($info{'status_id'}==Active)? 'active' : 'hidden']}\n"; + print "Notes:\n$info{'release_notes'}\n"; + print "Changes:\n$info{'release_changes'}\n"; + print "Preformatted:\t@{[$info{'preformatted'} ? 'yes' : 'no']}\n"; + print "---\n"; + print "File addable to this release (from incoming):\n"; + print " $_\n" foreach (@{$info{'ftp_files'}}); +} + # process_options # --------------- sub process_options () @@ -467,6 +567,9 @@ 'login' => [\&process_login, ['login|l=s', 'passwd|password|p=s']], 'logout' => [\&process_logout], + 'relinfo' => [\&process_relinfo, ['group|g=s', + 'package|p=s', + 'release|r=s']], 'version' => [\&print_version], ); |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 20:34:50
|
Update of /cvsroot/wide/cli/tools In directory usw-pr-cvs1:/tmp/cvs-serv17904/tools Modified Files: autogen.sh Log Message: * tools/autogen.sh: Sync with the latest version from Heroes 0.15. Index: autogen.sh =================================================================== RCS file: /cvsroot/wide/cli/tools/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autogen.sh 2001/10/11 17:59:09 1.1 +++ autogen.sh 2001/10/24 20:34:48 1.2 @@ -50,16 +50,19 @@ # generate aclocal.m4 saferun aclocal $aclocalflags ${moreverb} + # generate configure + saferun autoconf ${moreverb} + if grep AC_CONFIG_HEADER configure.* >/dev/null 2>/dev/null; then # generate src/config.h.in saferun autoheader ${moreverb} fi - # generate configure - saferun autoconf ${moreverb} - # generate **/Makefile.in and add mssing files - saferun automake --add-missing ${moreverb} + # Use --force-missing, or it's possible that we'll use + # some obsolete files (for instance if the Automake location + # changer and the symlink still point to the old). + saferun automake --force-missing --add-missing ${moreverb} } while test $# -gt 0 ; do |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 20:34:50
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv17904 Modified Files: ChangeLog Log Message: * tools/autogen.sh: Sync with the latest version from Heroes 0.15. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChangeLog 2001/10/24 19:51:59 1.7 +++ ChangeLog 2001/10/24 20:34:48 1.8 @@ -1,5 +1,9 @@ 2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * tools/autogen.sh: Sync with the latest version from Heroes 0.15. + +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (print_usage): Oops. There should not be a date options listed for createrel. Also, add STRING and NUMBER specifiers to most options.. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:52:02
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv6481/src Modified Files: sf.in Log Message: * src/sf.in (print_usage): Oops. There should not be a date options listed for createrel. Also, add STRING and NUMBER specifiers to most options.. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- sf.in 2001/10/24 19:43:16 1.6 +++ sf.in 2001/10/24 19:51:59 1.7 @@ -328,17 +328,16 @@ The following paragraphs list each supported COMMAND. Createrel options: - -d, --date date of the release [today] - -n, --name name (a.k.a. version) of the release - -g, --group group id of the project - -p, --package package id in which to make a release + -n, --name=STRING name (a.k.a. version) of the release + -g, --group=NUMBER group id of the project + -p, --package=NUMBER package id in which to make a release Listpkg options: - -g, --group group id of the project + -g, --group=NUMBER group id of the project Listrel options: - -g, --group group id of the project - -p, --package package id for which to list releases + -g, --group=NUMBER group id of the project + -p, --package=NUMBER package id for which to list releases Login options: -l, --login=STRING set SourceForge username |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:52:02
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv6481 Modified Files: ChangeLog Log Message: * src/sf.in (print_usage): Oops. There should not be a date options listed for createrel. Also, add STRING and NUMBER specifiers to most options.. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChangeLog 2001/10/24 19:43:16 1.6 +++ ChangeLog 2001/10/24 19:51:59 1.7 @@ -1,5 +1,11 @@ 2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (print_usage): Oops. There should not be a date + options listed for createrel. Also, add STRING and NUMBER + specifiers to most options.. + +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (process_listrel, sf_listrel): Store releases in a list, not in a hash, because several releases can share the same name. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:43:20
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv4455 Modified Files: ChangeLog Log Message: * src/sf.in (process_listrel, sf_listrel): Store releases in a list, not in a hash, because several releases can share the same name. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ChangeLog 2001/10/24 19:16:58 1.5 +++ ChangeLog 2001/10/24 19:43:16 1.6 @@ -1,5 +1,10 @@ 2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (process_listrel, sf_listrel): Store releases in a list, + not in a hash, because several releases can share the same name. + +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (send_request): New function. (sf_login, sf_logout, sf_listpkg, sf_createrel, sf_listrel): Use it. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:43:20
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv4455/src Modified Files: sf.in Log Message: * src/sf.in (process_listrel, sf_listrel): Store releases in a list, not in a hash, because several releases can share the same name. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sf.in 2001/10/24 19:16:58 1.5 +++ sf.in 2001/10/24 19:43:16 1.6 @@ -275,8 +275,12 @@ # sf_listrel (AGENT, GROUPID, PACKAGEID) # -------------------------------------- # Return release registered for package #PACKAGEID in group #GROUPID. -# The return value is a hash in wich keys are release names and -# values are package IDs. +# The return value is a list in wich even items are release names and +# odd items are release IDs. +# This need to be a list (in other words it can't be a hash) because +# several releases might share the same name. +# Yet, assigning this list to a hash will produce a meaningful hash +# (with duplicates removed). sub sf_listrel ($$$) { my ($agent, $group, $packageid) = @_; @@ -291,12 +295,12 @@ my $content = $res->content (); emsg (1, "Permission denied.") if $content =~ /PERMISSION DENIED/; - my %releases = (); - $releases{$1} = $2 while ($content =~ m{ + my @releases = (); + push @releases, $1, $2 while ($content =~ m{ > \s* (\S*?) \s* <a\s*href="editreleases.php?.*?release_id=(\d*).*?" }sgoix); - return %releases; + return @releases; } ######################################################################## @@ -423,9 +427,14 @@ emsg (1, "use -p to specify the package id (as listed by listpkg)") unless (defined $opt{'package'}); - my %rel = sf_listrel (initialize_agent, $opt{'group'}, $opt{'package'}); + my @rel = sf_listrel (initialize_agent, $opt{'group'}, $opt{'package'}); - print "$_\t" . $rel{$_} . "\n" foreach keys %rel; + while ($#rel >= 0) + { + my $name = shift @rel; + my $id = shift @rel; + print "$name\t$id\n"; + } } |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:17:05
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv29764 Modified Files: ChangeLog Log Message: * src/sf.in (send_request): New function. (sf_login, sf_logout, sf_listpkg, sf_createrel, sf_listrel): Use it. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ChangeLog 2001/10/24 19:02:58 1.4 +++ ChangeLog 2001/10/24 19:16:58 1.5 @@ -1,5 +1,10 @@ 2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (send_request): New function. + (sf_login, sf_logout, sf_listpkg, sf_createrel, sf_listrel): Use it. + +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (process_options) <commands>: Add listrel. (process_listrel, sf_listrel): New functions. (print_usage): Add help for listrel. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:17:05
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv29764/src Modified Files: sf.in Log Message: * src/sf.in (send_request): New function. (sf_login, sf_logout, sf_listpkg, sf_createrel, sf_listrel): Use it. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sf.in 2001/10/24 19:02:58 1.4 +++ sf.in 2001/10/24 19:16:58 1.5 @@ -41,6 +41,22 @@ } +# send_request (REQUESTNAME, AGENT, REQUEST) +# ------------------------------------------ +# Send REQUEST through AGENT, printing i/o if in debug mode. +# Return the server's response. +# +# Prefer this function over $agent->request($req). +sub send_request($$$) +{ + my ($name, $agent, $req) = @_; + dmsg ("=== $name REQUEST\n" . $req->as_string); + my $res = $agent->request ($req); + dmsg ("=== $name RESPONSE\n" . $res->as_string); + return $res; +} + + ######################################################################## # # Output functions. @@ -179,10 +195,7 @@ # indicate which page we should be redirected too. # We don't care about such redirection here. - dmsg ("=== LOGIN REQUEST\n" . $req->as_string); - # Send request to SourceForge. - my $res = $agent->request ($req); - dmsg ("=== LOGIN RESPONSE\n" . $res->as_string); + my $res = send_request ('LOGIN', $agent, $req); # We are redirected (to the user's page) on successful login. emsg (1, "Login failed.") unless ($res->is_redirect); @@ -200,9 +213,7 @@ # headers matters, so use HEAD, not GET. my $req = HEAD "https://sourceforge.net/account/logout.php"; - dmsg ("=== LOGOUT REQUEST\n" . $req->as_string); - my $res = $agent->request ($req); - dmsg ("=== LOGOUT RESPONSE\n" . $res->as_string); + my $res = send_request ('LGOUT', $agent, $req); emsg (1, "Logout failed.") unless ($res->is_success); } @@ -219,9 +230,7 @@ my $req = GET ("https://sourceforge.net/project/admin/editpackages.php" . "?group_id=$group"); - dmsg ("=== LISTPKG REQUEST\n" . $req->as_string); - my $res = $agent->request ($req); - dmsg ("=== LISTPKG RESPONSE\n" . $res->as_string); + my $res = send_request ('LISTPKG', $agent, $req); emsg (1, "Listpkg failed.") unless $res->is_success && ! $res->is_redirect; @@ -250,9 +259,7 @@ [release_name => $version, submit => 'Create This Release']); - dmsg ("=== CREATEREL REQUEST\n" . $req->as_string); - my $res = $agent->request ($req); - dmsg ("=== CREATEREL RESPONSE\n" . $res->as_string); + my $res = send_request ('CREATEREL', $agent, $req); # We are redirected (to editrelease.php) on success, with # the release_id in the new URL. @@ -276,9 +283,7 @@ my $req = GET ("https://sourceforge.net/project/admin/editreleases.php" . "?package_id=$packageid&group_id=$group"); - dmsg ("=== LISTREL REQUEST\n" . $req->as_string); - my $res = $agent->request ($req); - dmsg ("=== LISTREL RESPONSE\n" . $res->as_string); + my $res = send_request ('LISTREL', $agent, $req); emsg (1, "Listrel failed.") unless $res->is_success && ! $res->is_redirect; |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:03:01
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv25753 Modified Files: ChangeLog Log Message: * src/sf.in (process_options) <commands>: Add listrel. (process_listrel, sf_listrel): New functions. (print_usage): Add help for listrel. (sf_listpkg): Use case insensitive matching. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ChangeLog 2001/10/24 18:38:31 1.3 +++ ChangeLog 2001/10/24 19:02:58 1.4 @@ -1,5 +1,12 @@ 2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (process_options) <commands>: Add listrel. + (process_listrel, sf_listrel): New functions. + (print_usage): Add help for listrel. + (sf_listpkg): Use case insensitive matching. + +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + * src/sf.in (process_options) <commands>: Add createrel. (process_createrel, sf_createrel): New functions. (print_usage): Add help for createrel. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 19:03:01
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv25753/src Modified Files: sf.in Log Message: * src/sf.in (process_options) <commands>: Add listrel. (process_listrel, sf_listrel): New functions. (print_usage): Add help for listrel. (sf_listpkg): Use case insensitive matching. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sf.in 2001/10/24 18:38:32 1.3 +++ sf.in 2001/10/24 19:02:58 1.4 @@ -232,7 +232,7 @@ my %packages = (); $packages{$2} = $1 while ($content =~ m{ NAME="package_id" [^>]*? VALUE="([^"]+)" .*? - NAME="package_name" [^>]*? VALUE="([^"]+)" }sgox); + NAME="package_name" [^>]*? VALUE="([^"]+)" }sgoix); return %packages; } @@ -264,6 +264,36 @@ emsg (1, "Createrel failed."); } + +# sf_listrel (AGENT, GROUPID, PACKAGEID) +# -------------------------------------- +# Return release registered for package #PACKAGEID in group #GROUPID. +# The return value is a hash in wich keys are release names and +# values are package IDs. +sub sf_listrel ($$$) +{ + my ($agent, $group, $packageid) = @_; + my $req = GET ("https://sourceforge.net/project/admin/editreleases.php" + . "?package_id=$packageid&group_id=$group"); + + dmsg ("=== LISTREL REQUEST\n" . $req->as_string); + my $res = $agent->request ($req); + dmsg ("=== LISTREL RESPONSE\n" . $res->as_string); + + emsg (1, "Listrel failed.") + unless $res->is_success && ! $res->is_redirect; + + my $content = $res->content (); + emsg (1, "Permission denied.") if $content =~ /PERMISSION DENIED/; + + my %releases = (); + $releases{$1} = $2 while ($content =~ m{ + > \s* (\S*?) \s* + <a\s*href="editreleases.php?.*?release_id=(\d*).*?" }sgoix); + + return %releases; +} + ######################################################################## # # User interface @@ -297,6 +327,10 @@ Listpkg options: -g, --group group id of the project +Listrel options: + -g, --group group id of the project + -p, --package package id for which to list releases + Login options: -l, --login=STRING set SourceForge username -p, --passwd=STRING set SourceForge password @@ -374,6 +408,22 @@ } +# process_listrel (HASH) +# ---------------------- +sub process_listrel (@) +{ + my (%opt) = @_; + emsg (1, "use -g to specify the project's group id") + unless (defined $opt{'group'}); + emsg (1, "use -p to specify the package id (as listed by listpkg)") + unless (defined $opt{'package'}); + + my %rel = sf_listrel (initialize_agent, $opt{'group'}, $opt{'package'}); + + print "$_\t" . $rel{$_} . "\n" foreach keys %rel; +} + + # process_options # --------------- sub process_options () @@ -399,6 +449,8 @@ 'package|p=s']], 'help' => [\&print_usage], 'listpkg' => [\&process_listpkg, ['group|g=s']], + 'listrel' => [\&process_listrel, ['group|g=s', + 'package|p=s']], 'login' => [\&process_login, ['login|l=s', 'passwd|password|p=s']], 'logout' => [\&process_logout], |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 18:38:36
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv18302/src Modified Files: sf.in Log Message: * src/sf.in (process_options) <commands>: Add createrel. (process_createrel, sf_createrel): New functions. (print_usage): Add help for createrel. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sf.in 2001/10/16 20:57:20 1.2 +++ sf.in 2001/10/24 18:38:32 1.3 @@ -102,6 +102,22 @@ # # HTTP client functions # +# These functions communicate with the Web server. They DO NOT do +# any input processing (like checking the user arguments for errors) +# and they return their result as Perl data (especially, they +# don't print them). +# +# Checking user input and printing results is done in the +# user-interface functions (a later section). +# +# Making this distinction allow to reuse these client functions +# without any side-effect. For instance one could use the result +# of sf_listpkg to convert a package name into a package id. +# +# So far, the exception to this rule is that these functions +# will abort on errors. Maybe we'll want to change this in the +# future. +# ######################################################################## @@ -221,6 +237,33 @@ return %packages; } +# sf_createrel (AGENT, GROUPID, PACKAGEID, VERSION) +# ------------------------------------------------- +# Create a new release for package PACKAGEID in group GROUPID, with +# name VERSION. +# Return the release id of this release. +sub sf_createrel ($$$$) +{ + my ($agent, $group, $packageid, $version) = @_; + my $req = POST ('https://sourceforge.net/project/admin/newrelease.php' + . "?package_id=$packageid&group_id=$group", + [release_name => $version, + submit => 'Create This Release']); + + dmsg ("=== CREATEREL REQUEST\n" . $req->as_string); + my $res = $agent->request ($req); + dmsg ("=== CREATEREL RESPONSE\n" . $res->as_string); + + # We are redirected (to editrelease.php) on success, with + # the release_id in the new URL. + if ($res->header ('Location') =~ /editreleases.php.*release_id=(\d+)&/) + { + return $1; + } + + emsg (1, "Createrel failed."); +} + ######################################################################## # # User interface @@ -245,6 +288,12 @@ The following paragraphs list each supported COMMAND. +Createrel options: + -d, --date date of the release [today] + -n, --name name (a.k.a. version) of the release + -g, --group group id of the project + -p, --package package id in which to make a release + Listpkg options: -g, --group group id of the project @@ -307,6 +356,24 @@ } +# process_createrel (HASH) +# ---------------------- +sub process_createrel (@) +{ + my (%opt) = @_; + emsg (1, "use -g to specify the project's group id") + unless (defined $opt{'group'}); + emsg (1, "use -p to specify the package id (as listed by listpkg)") + unless (defined $opt{'package'}); + emsg (1, "use -n to specify the name of the new release") + unless (defined $opt{'name'}); + + my $relid = sf_createrel (initialize_agent, + $opt{'group'}, $opt{'package'}, $opt{'name'}); + print "$relid\n"; +} + + # process_options # --------------- sub process_options () @@ -327,12 +394,15 @@ # the argument specifications for this command. my %commands = ( - 'help' => [\&print_usage], - 'listpkg' => [\&process_listpkg, ['group|g=s']], - 'login' => [\&process_login, ['login|l=s', - 'passwd|password|p=s']], - 'logout' => [\&process_logout], - 'version' => [\&print_version], + 'createrel' => [\&process_createrel, ['group|g=s', + 'name|n=s', + 'package|p=s']], + 'help' => [\&print_usage], + 'listpkg' => [\&process_listpkg, ['group|g=s']], + 'login' => [\&process_login, ['login|l=s', + 'passwd|password|p=s']], + 'logout' => [\&process_logout], + 'version' => [\&print_version], ); # "bundling" means we accept bundled options such as '-vvv' and @@ -354,7 +424,7 @@ syntax_error ("Unknown command '$cmdname'.") unless (defined ($cmd)); # Parse the command specific arguments. - my %opts = (); # We'll store options settings here. + my %opts = (); # We'll store option settings here. if (exists $cmd->[1]) { GetOptions (\%opts, @{$cmd->[1]}) or syntax_error (""); |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-24 18:38:36
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv18302 Modified Files: ChangeLog Log Message: * src/sf.in (process_options) <commands>: Add createrel. (process_createrel, sf_createrel): New functions. (print_usage): Add help for createrel. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ChangeLog 2001/10/16 20:57:20 1.2 +++ ChangeLog 2001/10/24 18:38:31 1.3 @@ -1,3 +1,9 @@ +2001-10-24 Alexandre Duret-Lutz <du...@ep...> + + * src/sf.in (process_options) <commands>: Add createrel. + (process_createrel, sf_createrel): New functions. + (print_usage): Add help for createrel. + 2001-10-16 Alexandre Duret-Lutz <du...@ep...> * src/sf.in (process_options) <commands>: Add listpkg. |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-16 20:57:23
|
Update of /cvsroot/wide/cli/src In directory usw-pr-cvs1:/tmp/cvs-serv26945/src Modified Files: sf.in Log Message: * src/sf.in (process_options) <commands>: Add listpkg. (process_listpkg, sf_listpkg): New functions. (print_usage): Add help for listpkg. (initialize_agent): Don't discard discardable cookies. Index: sf.in =================================================================== RCS file: /cvsroot/wide/cli/src/sf.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sf.in 2001/10/11 17:59:09 1.1 +++ sf.in 2001/10/16 20:57:20 1.2 @@ -118,11 +118,21 @@ # (Apparently this is already done.) # Setup the cookie jar. - # ('autosave' means we won't have to save the file ourself: - # it will be done automatically when $ua is destroyed.) + # - 'autosave' means we won't have to save the file ourself: + # it will be done automatically when $ua is destroyed; + # - 'ignore_discard' allows us to keep the session key between + # successive runs (otherwise we'd have to login on each run). $ua->cookie_jar (new HTTP::Cookies file => $cookie_jar, - autosave => 1); + autosave => 1, + ignore_discard => 1); + + + # FIXME: Configure the user-agent so that it does not follow + # redirections. Rational: redirections usually happen on errors, + # so we'd better detect these conditions by testing ->is_redirect + # and NOT download the full body of the page we are redirected + # too. return $ua; } @@ -182,6 +192,35 @@ } +# sf_listpkg (AGENT, GROUPID) +# --------------------------- +# Return packages registered for group #GROUPID. +# The return value is a hash in wich keys are package names and +# values are package IDs. +sub sf_listpkg ($$) +{ + my ($agent, $group) = @_; + my $req = GET ("https://sourceforge.net/project/admin/editpackages.php" + . "?group_id=$group"); + + dmsg ("=== LISTPKG REQUEST\n" . $req->as_string); + my $res = $agent->request ($req); + dmsg ("=== LISTPKG RESPONSE\n" . $res->as_string); + + emsg (1, "Listpkg failed.") + unless $res->is_success && ! $res->is_redirect; + + my $content = $res->content (); + emsg (1, "Permission denied.") if $content =~ /PERMISSION DENIED/; + + my %packages = (); + $packages{$2} = $1 while ($content =~ m{ + NAME="package_id" [^>]*? VALUE="([^"]+)" .*? + NAME="package_name" [^>]*? VALUE="([^"]+)" }sgox); + + return %packages; +} + ######################################################################## # # User interface @@ -206,6 +245,9 @@ The following paragraphs list each supported COMMAND. +Listpkg options: + -g, --group group id of the project + Login options: -l, --login=STRING set SourceForge username -p, --passwd=STRING set SourceForge password @@ -251,6 +293,20 @@ } +# process_listpkd (HASH) +# ---------------------- +sub process_listpkg (@) +{ + my (%opt) = @_; + emsg (1, "use -g to specify the project's group id") + unless (defined $opt{'group'}); + + my %pkg = sf_listpkg (initialize_agent, $opt{'group'}); + + print "$_\t" . $pkg{$_} . "\n" foreach keys %pkg; +} + + # process_options # --------------- sub process_options () @@ -272,6 +328,7 @@ my %commands = ( 'help' => [\&print_usage], + 'listpkg' => [\&process_listpkg, ['group|g=s']], 'login' => [\&process_login, ['login|l=s', 'passwd|password|p=s']], 'logout' => [\&process_logout], |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-16 20:57:22
|
Update of /cvsroot/wide/cli In directory usw-pr-cvs1:/tmp/cvs-serv26945 Modified Files: ChangeLog Log Message: * src/sf.in (process_options) <commands>: Add listpkg. (process_listpkg, sf_listpkg): New functions. (print_usage): Add help for listpkg. (initialize_agent): Don't discard discardable cookies. Index: ChangeLog =================================================================== RCS file: /cvsroot/wide/cli/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ChangeLog 2001/10/11 17:59:09 1.1 +++ ChangeLog 2001/10/16 20:57:20 1.2 @@ -1,3 +1,10 @@ +2001-10-16 Alexandre Duret-Lutz <du...@ep...> + + * src/sf.in (process_options) <commands>: Add listpkg. + (process_listpkg, sf_listpkg): New functions. + (print_usage): Add help for listpkg. + (initialize_agent): Don't discard discardable cookies. + 2001-10-11 Alexandre Duret-Lutz <du...@ep...> Initial revision. |
From: Tom R. <tl...@us...> - 2001-10-16 03:09:21
|
Update of /cvsroot/wide/CLI In directory usw-pr-cvs1:/tmp/cvs-serv12823/CLI Removed Files: proposal.txt Log Message: Removed 'CLI' in favor of adl's 'cli'. --- proposal.txt DELETED --- |
From: Alexandre Duret-L. <ad...@us...> - 2001-10-12 09:08:48
|
Update of /cvsroot/wide/cli/doc In directory usw-pr-cvs1:/tmp/cvs-serv20929/doc Log Message: Directory /cvsroot/wide/cli/doc added to the repository |