From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Checkout a branch in cvs-tree Date: 20 Aug 2004 16:56:57 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <4nvfjzazzg.fsf@lifelogs.com> <87smf2sbnq.fsf@emptyhost.emptydomain.de> <20040420.171230.136508869.yamato@redhat.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1093035468 28585 80.91.224.253 (20 Aug 2004 20:57:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 Aug 2004 20:57:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 20 22:57:30 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ByGS1-0002cN-00 for ; Fri, 20 Aug 2004 22:57:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByGWL-00018v-Vr for ged-emacs-devel@m.gmane.org; Fri, 20 Aug 2004 17:01:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1ByGWG-00018g-3k for emacs-devel@gnu.org; Fri, 20 Aug 2004 17:01:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1ByGWE-00018U-LT for emacs-devel@gnu.org; Fri, 20 Aug 2004 17:01:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ByGWE-00018R-Ie for emacs-devel@gnu.org; Fri, 20 Aug 2004 17:01:50 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ByGRe-00088i-OZ for emacs-devel@gnu.org; Fri, 20 Aug 2004 16:57:06 -0400 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id C5DFFB30279; Fri, 20 Aug 2004 16:56:57 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 96B868CA23; Fri, 20 Aug 2004 16:56:57 -0400 (EDT) Original-To: Masatake YAMATO In-Reply-To: <20040420.171230.136508869.yamato@redhat.com> Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5) X-MailScanner-From: monnier@iro.umontreal.ca X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:26350 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26350 > The question is how to set the cvs root for `cvs-checkout' > command. I'm using CVSROOT environment variable. It may be wrong way. It's probably easier to let-bind `cvs-cvsroot'. > + (env (getenv "CVSROOT"))) > + (unwind-protect > + (progn > + (setenv "CVSROOT" (cvs-get-cvsroot)) > + (cvs-checkout modules dir flags)) > + (setenv "CVSROOT" env)))) A better way then unwind-protect/getenv/setenv is probably: (let ((process-environment (cons (concat "CVSROOT=" (cvs-get-cvsroot)) process-environment))) or else (let ((process-environment process-environment)) (setenv "CVSROOT" (cvs-get-cvsroot)) ...) but as said (let ((cvs-cvsroot (cvs-get-cvsroot))) ...) should work just as well. Stefan