Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DE896461 for ; Fri, 8 Jul 2011 17:36:42 +0000 (UTC) Received: (qmail 29159 invoked by uid 500); 8 Jul 2011 17:36:41 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 29126 invoked by uid 500); 8 Jul 2011 17:36:41 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 29041 invoked by uid 99); 8 Jul 2011 17:36:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 17:36:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.111.4.29] (HELO out5.smtp.messagingengine.com) (66.111.4.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jul 2011 17:36:34 +0000 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.messagingengine.com (Postfix) with ESMTP id 2B62D207A5; Fri, 8 Jul 2011 13:36:13 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 08 Jul 2011 13:36:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:in-reply-to; s=smtpout; bh=QBFZL2gIjZ1J9t/F9/ruzQne89c=; b=SD0YJrL9t5FXcQvPSYxU/LLGk2y2GjvTgbO444vf3BYBgDtkwFee14S8nJjPFKjaV23hA1AlLd3xgIoP5t71p2UNLXnKahls5EucpLlvUZe26A+nZEx2kMrveWEhnOL52ttP1+n1pGsFUSW8kGC+7BNyxs129jVWKWoZzL7QvHs= X-Sasl-enc: 0uSIM7xQcTBLXWAjTbNbuvPhWmHM47H4jo0zTRUK43N+0fbs5fIs3to1nlkZCw 1310146570 Received: from daniel3.local (unknown [109.67.194.61]) by mail.messagingengine.com (Postfix) with ESMTPSA id D391C40699E; Fri, 8 Jul 2011 13:36:09 -0400 (EDT) Date: Fri, 8 Jul 2011 20:35:55 +0300 From: Daniel Shahaf To: Alan Barrett Cc: users@subversion.apache.org Subject: Re: how do I revert a bad commit without creating a new revision? Message-ID: <20110708173555.GA13328@daniel3.local> References: <20110708064724.GA821@apb-laptoy.apb.alt.za> <20110708071623.GA10031@daniel3.local> <20110708084410.GA1620@apb-laptoy.apb.alt.za> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110708084410.GA1620@apb-laptoy.apb.alt.za> User-Agent: Mutt/1.5.20 (2009-06-14) Alan Barrett wrote on Fri, Jul 08, 2011 at 10:44:10 +0200: > On Fri, 08 Jul 2011, Daniel Shahaf wrote: > >You missed a step. > > > >Without that step the procedure will result in corruption (data loss) at > >an undetermined time in the future. > > The last time I performed this sort of repository truncation was > with a fsfs repository format 5, db/format 3, without a rep-cache.db > (as created by svn version 1.5). I don't know what else you have to > do if you have db/format 4 with a rep-cache.db (as created by svn > version 1.6), but I imagine it's something like using the sqlite3 > command line client to "delete from rep_cache where revision > > ${last_good_revision};". Correct. Either run the SQL command you cite or rm rep-cache.db. (And in either case one needs to verify that no txns currently in-flight have already caught the rep-cache reference before it was removed from the DB; I don't remember offhand at what point in the txn that happens.) > Newer formats will probably need different > treatment. Again, this is all unsupported and at your own risk. > True. And thanks again for including these unequivocal "Unsupported / At your own risk" warnings very clearly. :-) > --apb (Alan Barrett) > Best, Daniel > [original message repeated for reference:] > > >>To truncate a repository that uses the "fsfs" format, so that you > >>lose everything after a certain revision, you can try the following > >>procedure. This is not supported, and might break everything. > >> > >> 1. Ensure that no new changes can be committed. (Tell your > >> users to stop work, or rename the directory on the server to > >> make it inaccessible, or activate some hook scripts that deny > >> permission for any changes.) > >> > >> 2. Ensure that you have a backup. > >> > >> 3. Examine the "db/current" file in the repository. It should > >> contain the most recent revision number. If it's not what > >> you expected, then give up. > >> > >> 4. Change the "db/current" file, making it refer to the most > >> recent "good" revision (e.g. 417810) instead of to the newer > >> revisions that you want to disappear (e.g. 417811). > >> > >> 5. Delete the db/revs and db/revprops files corresponding to the > >> revisions that you want to disappear (e.g. db/revs/417/417811 > >> and db/revprops/417/417811). > >> > >> 6. Allow access to the repository again. > >> > >>Any working copies that have references to the revisions that have > >>disappeared, will now be broken. You may be able to fix them via > >>"svn update -r${LAST_GOOD_REVISION}", but in the worst case, your > >>users will have to delete the working copies and check them out > >>again. > >> > >>--apb (Alan Barrett)