From owner-freebsd-questions@FreeBSD.ORG Thu Jan 24 21:55:25 2013 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3F01B28 for ; Thu, 24 Jan 2013 21:55:25 +0000 (UTC) (envelope-from xyne@archlinux.ca) Received: from oproxy11-pub.bluehost.com (oproxy11-pub.bluehost.com [173.254.64.10]) by mx1.freebsd.org (Postfix) with SMTP id 94BDA951 for ; Thu, 24 Jan 2013 21:55:25 +0000 (UTC) Received: (qmail 2923 invoked by uid 0); 24 Jan 2013 21:54:57 -0000 Received: from unknown (HELO box539.bluehost.com) (74.220.219.139) by oproxy11.bluehost.com with SMTP; 24 Jan 2013 21:54:57 -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=br5MQnLj1QYzxBdU9fmNXGNymt+ouGplv3sMdFA0fes=; b=OMLu4myNWwskLsMIcgTmMDhsnbkiMucXBve4dbbBauI7tv6NI7+VpKRixJk1FjMteMu03jXJrUsdA7g3KwOrzHAKNw+0dLE1UipME/7JpSGLZ00Mg+Rau213UdQagMZ+; Received: from [83.154.192.247] (port=58048 helo=localhost.localdomain) by box539.bluehost.com with esmtpsa (SSLv3:RC4-SHA:128) (Exim 4.80) (envelope-from ) id 1TyUl6-0007CH-W9; Thu, 24 Jan 2013 14:54:57 -0700 Date: Thu, 24 Jan 2013 21:54:52 +0000 From: Xyne To: Peter Vereshagin Subject: Re: 'svn-export' incrementing? Message-ID: <20130124215452.3fba0d68@archlinux.ca> In-Reply-To: <51004C02.9040107@FreeBSD.org> References: <20130123012915.GA16404@external.screwed.box> <51004C02.9040107@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: glarkin@FreeBSD.org, 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: Thu, 24 Jan 2013 21:55:25 -0000 Greg Larkin wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >On 1/22/13 8:29 PM, Peter Vereshagin wrote: >> Hello. >> >> I use the 'svn-export this way and expect it will try to update >> the 'work-tree' next time I run it: >> >> $ python3 svn-export-2013.1/svn-export >> http://svn.gna.org/svn/nasmail/trunk nasmail Exporting new >> repository. Exported revision 1546 [portato@screwed /tmp]$ ls -a >> nasmail . decode plugin_pack tests >> utilities .. nasmail plugins >> translations [portato@screwed /tmp]$ python3 >> svn-export-2013.1/svn-export http://svn.gna.org/svn/nasmail/trunk >> nasmail Exporting new repository. svn: E155000: Destination >> directory exists; please remove the directory or use --force to >> overwrite svn: E155000: 'nasmail' already exists error: Command >> '['svn', 'export', '-r', 'HEAD', >> 'http://svn.gna.org/svn/nasmail/trunk', 'nasmail']' returned >> non-zero exit status 1 >> >> I believe there is something wrong in the way I use the >> 'svn-export'. Otherwise it's a no problem for me to patch for >> '--force'. >> >> How can I update the already created 'work tree' with 'svn update'? >> I think the correct answer is a good idea for 'Synopsis' docs >> section. >> > >Hi Peter, > >In order for svn-export to work in incremental mode, you need to use >the --revision-file argument like so: > >python3 svn-export-2013.1/svn-export -r rev.dat >http://svn.gna.org/svn/nasmail/trunk nasmail > >Then at some point in the future, run the same command. svn-export >will read rev.dat, compare the version in there with the current HEAD >revision. If they are different, the script creates a diff and >applies it to the local directory. > >Hope that helps, >Greg Hi, The explanation is correct but the command example is not. It should be svn-export --revision-file rev.dat ... The reason for this is that svn-export does not include any SVN data with the exported files so it has no way to determine what the currently exported revision is from the directory alone. You could manually run svn-export -r :HEAD ..." but it would be tedious. The "--revision-file" option automates this by storing the local export's revision number in a file. It is used to determine which revision to diff against. Essentially it is the same as running svn-export -r $(cat rev.dat):... I hope this clears things up. Regards, Xyne