From owner-freebsd-questions@FreeBSD.ORG Fri Jan 25 18:53:47 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1B2A82D9 for ; Fri, 25 Jan 2013 18:53:47 +0000 (UTC) (envelope-from xyne@archlinux.ca) Received: from oproxy12-pub.bluehost.com (oproxy12-pub.bluehost.com [50.87.16.10]) by mx1.freebsd.org (Postfix) with SMTP id EC231D8 for ; Fri, 25 Jan 2013 18:53:46 +0000 (UTC) Received: (qmail 17853 invoked by uid 0); 25 Jan 2013 18:53:19 -0000 Received: from unknown (HELO box539.bluehost.com) (74.220.219.139) by oproxy12.bluehost.com with SMTP; 25 Jan 2013 18:53:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=archlinux.ca; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=J14yJMwRbNLLN9vpBbVwzqIvzGU01Ze6gvwsJ/VinQI=; b=UBMkc2OJA6+/QhhkumJWYWiXyqoi9WUAaUS9+EuQ13dBayX8oCv7K7YSaR0uQi5GJ2QBoQwtnSTEnEMFjyw+AefY/Yeib3RMNswQjacDAPf+OsVweCTxP5IhdkUCBdWt; Received: from [83.154.192.247] (port=55168 helo=localhost.localdomain) by box539.bluehost.com with esmtpsa (SSLv3:RC4-SHA:128) (Exim 4.80) (envelope-from ) id 1TyoOt-0003xN-9N; Fri, 25 Jan 2013 11:53:19 -0700 Date: Fri, 25 Jan 2013 18:53:03 +0000 From: Xyne To: glarkin@FreeBSD.org Subject: Re: svn-export Re: svn bdb checkout? Message-ID: <20130125185303.1396d2a4@archlinux.ca> In-Reply-To: <5102A771.1080704@FreeBSD.org> References: <20130116185832.GB8524@external.screwed.box> <50F6FD37.5060309@gmail.com> <20130116193534.GC8524@external.screwed.box> <50F704CE.3010904@gmail.com> <20130116200754.GD8524@external.screwed.box> <50F70C60.4000108@FreeBSD.org> <20130116205533.GE8524@external.screwed.box> <20130117045431.GB5392@external.screwed.box> <20130119052245.004da49b@archlinux.ca> <51004B62.5090305@FreeBSD.org> <20130124221636.307dca09@archlinux.ca> <5102A771.1080704@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Identified-User: {4243:box539.bluehost.com:archlinu:archlinux.ca} {sentby:smtp auth 83.154.192.247 authed with xyne@archlinux.ca} Cc: Peter Vereshagin , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 18:53:47 -0000 Greg Larkin wrote: ># python3 svn-export -r 310000 >http://svn.freebsd.org/ports/head/ports-mgmt ports-mgmt >Exporting new repository. >Exported revision 310000 ># python3 svn-export --revision-file rev.dat >http://svn.freebsd.org/ports/head/ports-mgmt ports-mgmt >Determining current revision. >Current revision is 310981. >Determining changes [310000:310981]. >16 new/modified files, 5 deletions >Traceback (most recent call last): > File "svn-export", line 459, in > svn.main() > File "svn-export", line 432, in main > self.remove_old_files(deleted) > File "svn-export", line 310, in remove_old_files > os.unlink(path) >PermissionError: [Errno 1] Operation not permitted: 'ports-mgmt/pkg/files' ># exit > >As far as I can tell, svn-export attempts to remove a directory before >the file contained within that directory. It seems like >PermissionError isn't the best error code for Python to throw in that >case, since it appears to mask the root problem. On Arch Linux, Python raises the expected "IsADirectoryError" exception. Perhaps "PermissionError" is due to a bug in Python 3 on FreeBSD. It would not be the first exception bug that I have encountered (e.g. os.makedirs(..., exist_ok=True) raises "FileExists" when permissions differ on existing directories... very confusing the first time it shows up). Regardless, svn-export now tries to remove a directory in both cases. Please updated to version 2013.1.25 and let me know if it works on FreeBSD. >> Incidentally, if anyone is looking at the code for svn-export, feel >> free to suggest a better way to incrementally export new >> subdirectories (see the "get_new_files()" method). > >I'll take a look at that soon to see if there are any possible >optimizations. Ok, thanks. >Once we create a port for svn-export, we typically point to the >original download site in the port Makefile. It's a good idea for the >port maintainer to find a mirror site and include that too, but if >not, all distro files are eventually mirrored to the FreeBSD cluster. > >Ideally, the source distros remain in place forever or at least until >the FreeBSD port is updated to the latest version, but if that's not >possible, I can mirror the files too. I have changed the time-to-live to 6 months for old archives. Regards, Xyne