From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31234 invoked by alias); 11 Oct 2010 16:43:09 -0000 Received: (qmail 31133 invoked by uid 22791); 11 Oct 2010 16:43:08 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Oct 2010 16:43:04 +0000 Received: (qmail 14668 invoked from network); 11 Oct 2010 16:43:02 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Oct 2010 16:43:02 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Question about "cvs update" Date: Mon, 11 Oct 2010 16:43:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: Dave Korn , Hui Zhu References: <4CB34085.1010102@gmail.com> In-Reply-To: <4CB34085.1010102@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010111743.00605.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00033.txt.bz2 On Monday 11 October 2010 17:51:17, Dave Korn wrote: > On 11/10/2010 08:49, Hui Zhu wrote: > > Hi guys, > > > > "cvs update -d" will make the src directory include a lot of other > > softwares like binutils, sid and so on. > > > > I want keep the directory just have the file of GDB. I tried "cvs > > update -dP". But it still tried to checkout the files of other > > softwares. > > > > Could someone tell me how to update the all src directory and do not > > co the files of other softwares. > > I do something roughly(*) like: > > ls -1d */CVS | cut -d/ -f1 | xargs cvs up -dP > > ... followed by a plain old "cvs up" to get the top-level files. This can > easily be put into a shell alias or function definition in one of your shell > startup scripts. Irks. I just do "cvs co" which knows to update instead of checkout if you already have a tree, but wrapped in a tiny script that I carry around to all my trees: $ cat /home/pedro/gdb/baseline/cvsup.sh #!/bin/bash cvs -t -d :ext:palves@sourceware.org:/cvs/src co gdb That's it! To avoid hacks, I just have my sources in a directory called literally "src". E.g., I follow this layout: /home/pedro/gdb/baseline/src /home/pedro/gdb/baseline/build /home/pedro/gdb/baseline/cvsup.sh and /home/pedro/gdb/foo-project/src /home/pedro/gdb/foo-project/build /home/pedro/gdb/foo-project/cvsup.sh etc. When I want to update a tree, I just e.g., $ cd /home/pedro/gdb/baseline $ ./cvsup.sh When I want to create a new fresh checkout, I do: $ mkdir /home/pedro/gdb/fresh-project $ cd /home/pedro/gdb/fresh-project $ cp /home/pedro/gdb/baseline/cvsup.sh /home/pedro/gdb/fresh-project $ ./cvsup.sh (or copy an existing tree) I prefer copying the script file because sometimes I want to checkout a specific date / tag / branch. E.g., $ cat /home/pedro/gdb/7_0/cvsup.sh #!/bin/bash cvs -t -z9 -d :ext:palves@sourceware.org:/cvs/src co -r gdb_7_0-branch gdb -- Pedro Alves