Re: checking out multiple branches of a project

2005-04-23 Thread Russ Sherk
On 4/21/05, Jim.Hyslop [EMAIL PROTECTED] wrote:
 Russ Sherk wrote:
  On 4/21/05, Jim.Hyslop [EMAIL PROTECTED] wrote:
   Sure, piece of cake. Check out [sic] the -d option to the
  checkout command.
  
  To be clear:
 [etc].
 
 I was _trying_ to encourage Chris to study the manual so he'd be more
 familiar with the options. Oh, well :-)
 
 --
 Jim Hyslop
 Senior Software Designer

Sorry Jim.

 Leitch Technology International Inc. ( http://www.leitch.com )
 Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )
 
 ___
 Info-cvs mailing list
 Info-cvs@gnu.org
 http://lists.gnu.org/mailman/listinfo/info-cvs



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: checking out multiple branches of a project

2005-04-21 Thread Jim.Hyslop
Chris Cheshire wrote:
 I have a project in source control called mylib (for example) that 
 contains libraries used for my various programs. Currently I need to 
 make some changes to a development branch, as well as some changes to 
 the head. I have been deleting one, checking out the other, 
 deleting it, 
 checking out the original one again constantly, and it is starting to 
 get annoying. Is there any way I can check it out so that the 
 structure 
 looks something like :
 
 ~/src/mylib/HEAD/...
 ~/src/mylib/dev-branch/...

Sure, piece of cake. Check out [sic] the -d option to the checkout command.

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )


 


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: checking out multiple branches of a project

2005-04-21 Thread Doug Lee
On Thu, Apr 21, 2005 at 09:20:04AM -0400, Jim.Hyslop wrote:
 Chris Cheshire wrote:
  I have a project in source control called mylib (for example) that 
  contains libraries used for my various programs. Currently I need to 
  make some changes to a development branch, as well as some changes to 
  the head. I have been deleting one, checking out the other, 
  deleting it, 
  checking out the original one again constantly, and it is starting to 
  get annoying. Is there any way I can check it out so that the 
  structure 
  looks something like :
  
  ~/src/mylib/HEAD/...
  ~/src/mylib/dev-branch/...
 
 Sure, piece of cake. Check out [sic] the -d option to the checkout command.

I have often wished for an automatic way to check out all existing
branches of a given module with one command.  Example:  If I have
module mymod with HEAD and branches named rel1 and rel2:

mkdir cvs_co
cd cvs_co
cvs co -b mymod
cd mymod
ls  # would list HEAD (or head), rel1, and rel2, and probably CVS)

The -b option is of course ficticious.
 
 -- 
 Jim Hyslop
 Senior Software Designer
 Leitch Technology International Inc. ( http://www.leitch.com )
 Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )

-- 
Doug Lee   [EMAIL PROTECTED]http://www.dlee.org
BART Group [EMAIL PROTECTED]   http://www.bartsite.com
Freedom is not the ability to have what we want.  Freedom is merely the
ability to seek it.  To be free defines what we can do, not what we can get.
(03/28/05)


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: checking out multiple branches of a project

2005-04-21 Thread Russ Sherk
On 4/21/05, Jim.Hyslop [EMAIL PROTECTED] wrote:
 Chris Cheshire wrote:
  I have a project in source control called mylib (for example) that
  contains libraries used for my various programs. Currently I need to
  make some changes to a development branch, as well as some changes to
  the head. I have been deleting one, checking out the other,
  deleting it,
  checking out the original one again constantly, and it is starting to
  get annoying. Is there any way I can check it out so that the
  structure
  looks something like :
 
  ~/src/mylib/HEAD/...
  ~/src/mylib/dev-branch/...
 
 Sure, piece of cake. Check out [sic] the -d option to the checkout command.
 
To be clear:
- cvs co -d module alias module name
cvs co -d mylib-HEAD -r HEAD mylib
cvs co -d mylib-dev-branch -r dev-branch mylib

This will create:
mylib-HEAD/
mylib-dev-branch/

 --
 Jim Hyslop
 Senior Software Designer
 Leitch Technology International Inc. ( http://www.leitch.com )
 Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )
 
 
 ___
 Info-cvs mailing list
 Info-cvs@gnu.org
 http://lists.gnu.org/mailman/listinfo/info-cvs
 

--Russ


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: checking out multiple branches of a project

2005-04-21 Thread Jim.Hyslop
Doug Lee wrote:
 I have often wished for an automatic way to check out all existing
 branches of a given module with one command.  Example:  If I have
 module mymod with HEAD and branches named rel1 and rel2:
 
 mkdir cvs_co
 cd cvs_co
 cvs co -b mymod
 cd mymod
 ls  # would list HEAD (or head), rel1, and rel2, and probably CVS)
 
 The -b option is of course ficticious.
You'd want to be careful with this, if the module has a lot of branches.

There is a minor problem: how do you determine which branches a module has?
Branches are not stored per-module, but per-file. I guess the easiest way is
to use one file which is most likely to have all the pertinent branches, and
pull all the branch tags out of that file. The most likely candidate would
be a file that's been around since project inception, such as makefile.

Something like this should do what you want:

cvs rlog -h module/makefile | grep -E '\.0\.[[:digit:]]+' | sed 's/:.*//' |
while read tag; do cvs co -d $tag -r $tag module; done

The rlog command gets the log for the file; -h gets only header info.
The grep command cuts that down to just the tags which have '.0.' followed
by a sequence of digits (these will be branch tags - see note below)
The sed command chops the : and the revision number, leaving only a
space-separated list of tags, which the 'while read' loop gobbles up and
issues a 'cvs co' command for each tag, placing it in a directory named
after the tag.

Note that this will not handle vendor branches (from a cvs import) - the
revision number is a different format (an odd count of numbers, e.g. x.y.z
or u.v.w.x.y, as opposed to a non-vendor branch which ends in .0.x). You'd
have to rewrite the regex for grep to handle this. I'm not good enough at
regex to do that :=)

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


RE: checking out multiple branches of a project

2005-04-21 Thread Jim.Hyslop
Russ Sherk wrote:
 On 4/21/05, Jim.Hyslop [EMAIL PROTECTED] wrote:
  Sure, piece of cake. Check out [sic] the -d option to the 
 checkout command.
  
 To be clear:
[etc].

I was _trying_ to encourage Chris to study the manual so he'd be more
familiar with the options. Oh, well :-)

-- 
Jim Hyslop
Senior Software Designer
Leitch Technology International Inc. ( http://www.leitch.com )
Columnist, C/C++ Users Journal ( http://www.cuj.com/experts )



___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


Re: checking out multiple branches of a project

2005-04-21 Thread Spiro Trikaliotis
Hello Doug,

* On Thu, Apr 21, 2005 at 09:59:30AM -0400 Doug Lee wrote:
 
 I have often wished for an automatic way to check out all existing
 branches of a given module with one command.  Example:  If I have
 module mymod with HEAD and branches named rel1 and rel2:

SVN has such an option (if you follow the recommended style of creating
branches).

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis  http://cbm4win.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/


___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


checking out multiple branches of a project

2005-04-20 Thread Chris Cheshire
I have a project in source control called mylib (for example) that 
contains libraries used for my various programs. Currently I need to 
make some changes to a development branch, as well as some changes to 
the head. I have been deleting one, checking out the other, deleting it, 
checking out the original one again constantly, and it is starting to 
get annoying. Is there any way I can check it out so that the structure 
looks something like :

~/src/mylib/HEAD/...
~/src/mylib/dev-branch/...
Or can I only have one branch checked out at a time into a given home 
directory, making it be something like

~/src/mylib/...
~/src-dev-branch/mylib/...
Thanks
Chris
___
Info-cvs mailing list
Info-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/info-cvs


checking out and branches

2002-12-19 Thread cc
Hi,

I made a minor goof up during one of my WinCVS sessions.  I wanted to
retrieve the trunk of one particular file from the repository.  But,
unfortunately, WinCVS checked out that particular revision for
ALL my files.  So that left me with less than the number of files
I had originally.  No biggy.  I went and deleted the working directory
and did a brand new check-out.


It didn't come out as I had planned as the checkout didn't checkout
the particular versions from the branches that I was editing.  But
if I specify a branch, WinCVS removes the rest of the files from the
working directory.

How do I check out the branch revisions of some files while checking
out the main trunk of other files during a checkout of the whole
repository?

While I'm on the topic of branches, I took a look at the graph of some
of my files and noticed(not surprisingly) that I had branched the files
and made the modifications within the branches.  So right now, I have
a  few files with a short main trunk and a long branch.  Under this
circumstance, should I just flatten the system so that it's just one
main trunk?   Do I just merge the branch with the main trunk?  In the
help file, there was the assumption that I continued adding code to
the main trunk(which isn't the case here), so I don't know if the
same merge command would apply since the main-trunk merge point
(in my case) is the branch-point(where it branches out) as well.
I don't want to screw up my repository that much, so I'll wait
for any clarifications in this matter.

Any help appreciated.  Thanks.


Edmund




___
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs