This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about "cvs update"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]