Date: Sun, 16 Sep 2012 13:31:39 +0000 (UTC) From: Chris Rees <crees@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r304348 - head/Tools/scripts Message-ID: <201209161331.q8GDVdP5094970@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: crees Date: Sun Sep 16 13:31:39 2012 New Revision: 304348 URL: http://svn.freebsd.org/changeset/ports/304348 Log: Accepts the new svn_revision tag in the removed ports xml database. Apologies for the complexity of the code; it's optimised for speed. Soon I will be able to remove the section working with dates. Modified: head/Tools/scripts/addport Modified: head/Tools/scripts/addport ============================================================================== --- head/Tools/scripts/addport Sun Sep 16 12:54:04 2012 (r304347) +++ head/Tools/scripts/addport Sun Sep 16 13:31:39 2012 (r304348) @@ -332,11 +332,17 @@ foreach my $thisdir (@dirs) { my $oldportlist; if ($oldportlist = get('http://people.FreeBSD.org/~crees/removed_ports/index.xml')) { foreach (split("\n", $oldportlist)) { - if (/^ +\<port\>$category\/$portname\<removed_date\>([^<]*)/) { - $previous_incarnation = $1; - $previous_incarnation =~ s,/,-,g; + if (/^ +\<port\>$category\/$portname(?:\<removed_revision\>r([0-9]*)\<\/removed_revision\>)?\<removed_date\>([^<]*)/) { print "Found one!\n"; - print "This port was last alive on $previous_incarnation.\n"; + if ($1 == "") { + $previous_incarnation = $2; + $previous_incarnation =~ s,/,-,g; + print "This port was last alive on $previous_incarnation.\n"; + $previous_incarnation = "\{$previous_incarnation\}"; + } else { + $previous_incarnation = $1 - 1; + print "The last living revision of this port was r$previous_incarnation.\n"; + } last; } } @@ -345,7 +351,7 @@ foreach my $thisdir (@dirs) { } if ($previous_incarnation ne "bogus") { print "Fetching older version... "; - system("svn cp -q '$repo/$category/$portname\@{$previous_incarnation}' ."); + system("svn cp -q '$repo/$category/$portname\@$previous_incarnation' ."); print "[DONE]\n"; print "Removing irrelevant files and directories... "; my @oldfiles = split("\0", `cd $portname && find . -type f -print0`);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209161331.q8GDVdP5094970>