This is the mail archive of the gdb@sources.redhat.com 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]

branching


On Tue, 17 Sep 2002 15:24:10 -0400, Andrew Cagney
<ac131313@ges.redhat.com> said:

> For branching, check the CVS man pages and:
> http://sources.redhat.com/gdb/current/onlinedocs/gdbint_15.html#SEC141
> but that is overkill --- you don't need the -D flag.  So something like:

> cvs -d :ext:sources.redhat.com:/cvs/src rtag
> carlton_something-YYYYMMDD-branchpoint gdb+dejagnu

> cvs -d :ext:sources.redhat.com:/cvs/src rtag -b -r
> carlton_something-YYYYMMDD-branchpoint
> carlton_something-YYYYMMDD-branch gdb+dejagnu

> cvs -d :ext:sources.redhat.com:/cvs/src co -r
> carlton_something-YYYYMMDD-branch gdb+dejagnu

Okay, I've read the appropriate documentation, and I might understand
both what I want to type to create the branch and what I want to type
when I want to merge from the mainline into my branch.  But I want to
run it by you, both because I really don't quite understand the
details of merging in from mainline to my branch and because it
differs slightly from the above (albeit only in naming conventions).

All my 'cvs' commands will really be 'cvs -d
:ext:carlton@sources.redhat.com:/cvs/src'.

To create the branch, I plan to:

1) Create a tag saying where the branch will start:

  cvs rtag carlton-dictionary-YYYYMMDD-branchpoint gdb+dejagnu

2) Create the branch:

  cvs rtag -b -r carlton-dictionary-YYYYMMDD-branchpoint
    carlton-dictionary-branch gdb+dejagnu

3) Check out the branch: go to a different directory, and then do

  cvs co -r carlton-dictionary-branch gdb+dejagnu


And to merge changes in from mainline, here's what I might do, but I'm
confused by it:

(All commands assume I'm in the branch's working directory, though it
shouldn't matter for the first command.)

1) Create a tag saying where the merges should end:

  cvs rtag carlton-dictionary-YYYYMMDD-tag gdb+dejagnu

2) Merge in changes from my previous merge tag to the current merge
   tag:

  cvs update -j carlton-dictionary-PreviousYYYYMMDD-tag
    -j carlton-dictionary-YYYYMMDD-tag

   (The first time I do this, the first -tag will actually be
   -branchpoint.)

3) Resolve inconsistencies, and then commit:

  cvs commit


But I'm not at all sure that this is right: how does it know that the
tags that I've added apply to the mainline, or if they apply to all
branches at that particular time, then how do I specify that I want to
merge in from the mainline?  (At first, I'd assumed that I'd do 'cvs
rtag' from a directory that is on the mainline, but the documentation
seems to say that rtag ignores your current working directory.)  The
examples in the CVS manual talk about merging from a branch to a
mainline, but I'm in the reverse situation, and I don't know how to
refer to mainline explicitly, just how to refer to a branch
explicitly.

Also, some minor differences from what you suggested:

1) I'm not sure why it would be a good idea to put a date stamp in the
   name of my branch.

2) It seems to me that, do do this branching and merging, I'll have to
   tag mainline every once in a while; so I'm having the tags end in
   -tag.  You suggested having the initial tag end in -branchpoint,
   which makes sense to me, so I'll do that.  But if you'd prefer a
   name other than -tag for my subsequent merge tags, that's fine with
   me too.  (-mergepoint?)

Once I get this figured out (and have a few merges under my belt),
should I write it up for the Internals manual?

David Carlton
carlton@math.stanford.edu


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