From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric S. Raymond" Newsgroups: gmane.emacs.devel Subject: Re: Testing the new VC code Date: Tue, 25 Nov 2014 16:17:37 -0500 Organization: Eric Conspiracy Secret Labs Message-ID: <20141125211737.GA19955@thyrsus.com> References: <20141124094929.GA32148@thyrsus.com> <87k32k51ka.fsf@fencepost.gnu.org> <20141124104616.GA1744@thyrsus.com> <87fvd8steg.fsf@gmx.de> <20141124130355.GA5432@thyrsus.com> <87bnnwqtfi.fsf@gmx.de> <20141125025054.GA20793@thyrsus.com> <87wq6j1ntp.fsf@gmx.de> <20141125134227.GB10466@thyrsus.com> <87oarv1gaf.fsf@gmx.de> Reply-To: esr@thyrsus.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1416950330 14333 80.91.229.3 (25 Nov 2014 21:18:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Nov 2014 21:18:50 +0000 (UTC) Cc: David Kastrup , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 25 22:18:41 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XtNVR-0007bR-DO for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2014 22:18:41 +0100 Original-Received: from localhost ([::1]:59577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNVO-00037C-SJ for ged-emacs-devel@m.gmane.org; Tue, 25 Nov 2014 16:18:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNV3-00036u-OG for emacs-devel@gnu.org; Tue, 25 Nov 2014 16:18:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtNUz-0000y1-8L for emacs-devel@gnu.org; Tue, 25 Nov 2014 16:18:17 -0500 Original-Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5]:48869 helo=snark.thyrsus.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtNUu-0000x0-CZ; Tue, 25 Nov 2014 16:18:08 -0500 Original-Received: by snark.thyrsus.com (Postfix, from userid 1000) id D32FF382B3D; Tue, 25 Nov 2014 16:17:37 -0500 (EST) Content-Disposition: inline In-Reply-To: <87oarv1gaf.fsf@gmx.de> X-Eric-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 71.162.243.5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178272 Archived-At: Michael Albinus : > > Instead of doing one-off tests, please take the amount of time you > > would have allocated for those and write a Lisp exerciser for the > > whole edit cycle - registration, checkout, modification, checkin, > > diff, etc. The more cases in vc-action you can visit, the better. > > I could do this, using ert. The question is which repositories to use > for tests. Something to be created on the fly, via `vc-create-repo' and > friends? Yes, that way we can do content checks knowing exactly what should be in the repository after each operation. > That might work pretty well for the backends with a local repository > (git, bzr, hg and alike), but what to do with the other ones? Looking...for the following ones, create-repo should just work: git, bzr, hg, RCS, SCCS, SRC, and (somewhat to my surprise) SVN. We're missing create-repo methods for arch, mtn, and CVS. These are a little tricky and need some context other than just a directory to work in. What we need to do for CVS is: 1. Create a scratch CVS remote root directory, probably in /tmp; mkdir /tmp/cvsroot 2. Create an empty module directory with a fixed name (say, 'module') inside that: mkdir /tmp/cvsroot/module 3. Give it a peer empty directory named CVSROOT: mkdir /tmp/cvsroot/CVSROOT 4. Now, where we actually want to create the dummy local repository, we do this: cvs -Q -d:local:/tmp/cvsroot co module mv module/CVS . rmdir module After these operations, the CVS subdirectory should have three files in it: :::::::::::::: module/CVS/Entries :::::::::::::: D :::::::::::::: module/CVS/Repository :::::::::::::: module :::::::::::::: module/CVS/Root :::::::::::::: :local:/tmp/cvsroot A CVS operation in the current directory will then look at the CVS subdirectory, see the contents of these files, and do the right thing. Arch is much easier: 1. Create a test repository with a dummy name: tla make-archive foo . 2. Make that our default for future arch operations: tla my-default-archive foo Mtn is a different kind of tricky. You need to say 1. mtn db init --db=~/dummy.mtn 2. mtn --db=dummy.mtn --branch=foo setup . being aware that this will create an SQL database dummy.mtn under ~/.monotone/databases that will need to be cleaned up on test exit. -- Eric S. Raymond