Re: How is a patch applied to CVS?

2003-01-09 Thread Mazza, Glen R., ,CPMS

Q
On Mon, Jan 06, 2003 at 08:23:52PM -0500, Mazza, Glen R., ,CPMS wrote:
 How is a patch file committed into CVS to update
 the most recent version?

In several steps:
  - Apply the patch to a checked-out working directory
  - Resolve any conflicts (i.e. .rej files)
  - Compile and test
  - cvs commit

CVS itself can't digest arbitrary patch files.
/Q

Thanks, Eric (and others who answered)--I'm mostly from the Windows
environment and I didn't know about the UNIX patch utility to work with
patch files.  

Glen



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



Re: How is a patch applied to CVS?

2003-01-09 Thread Eric Siegerman
On Thu, Jan 09, 2003 at 11:14:59AM +1100, Matthew Herrmann wrote:
 But can patch be run in such a way that it generates conflict markers
 instead of .rej files?

I don't think so.

 Or is diff3 the go here instead?

Yup.  There's also merge.  That's part of the RCS distribution;
it's an intermediate layer between rcsmerge (which understands
RCS files, revisions, etc., and which is thus pretty irrelevent
in a CVS context) and diff3 (which does the real work).  I don't
recall offhand what value merge adds to diff3 -- a quick glance
at its man page doesn't show me anything that diff3 isn't already
doing -- but there must be something I missed, and whatever it
is, it might be useful :-)

Of course, diff3 is what CVS uses internally.  It might be
possible to structure your development process such that there's
a CVS branch that the patch will apply cleanly to, so you can
then use a CVS merge rather than messing with diff3 yourself.

That's the theory anyway.  I looked into this a few months ago,
and found that I didn't have the time to script a solution that
would work in our specific situation.

In an open-source situation, with people submitting patches
against various releases, nightly snapshots, and/or random cvs
updates, I doubt this sort of approach has a chance.  You'd end
up with *zillions* of little one-revision branches, one for each
submitted patch.  Ick!

--

|  | /\
|-_|/ Eric Siegerman, Toronto, Ont.[EMAIL PROTECTED]
|  |  /
Just Say No to the faceless cannonfodder stereotype.
- http://www.ainurin.net/ (an Orc site)


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



Re: How is a patch applied to CVS?

2003-01-08 Thread Matthew Herrmann
Hi,

But can patch be run in such a way that it generates conflict markers
instead of .rej files? This would be very useful at times. Or is diff3 the
go here instead?

cheers,
matt

-Original Message-
Date: Tue, 7 Jan 2003 17:03:15 -0500
From: Eric Siegerman [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Re: How is a patch applied to CVS?
Message-ID: [EMAIL PROTECTED]
In-Reply-To:
[EMAIL PROTECTED];
from[EMAIL PROTECTED] on Mon, Jan 06, 2003 at 08:23:52PM -0500
References:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Precedence: list
Message: 9

On Mon, Jan 06, 2003 at 08:23:52PM -0500, Mazza, Glen R., ,CPMS wrote:
 How is a patch file committed into CVS to update
 the most recent version?

In several steps:
  - Apply the patch to a checked-out working directory
  - Resolve any conflicts (i.e. .rej files)
  - Compile and test
  - cvs commit

CVS itself can't digest arbitrary patch files.

--

|  | /\
|-_|/ Eric Siegerman, Toronto, Ont.[EMAIL PROTECTED]
|  |  /
Just Say No to the faceless cannonfodder stereotype.
- http://www.ainurin.net/ (an Orc site)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, 8 January 2003 14:44
To: [EMAIL PROTECTED]
Subject: Info-cvs Digest, Vol 2, Issue 11


Send Info-cvs mailing list submissions to
[EMAIL PROTECTED]

To subscribe or unsubscribe via the World Wide Web, visit
http://mail.gnu.org/mailman/listinfo/info-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than Re: Contents of Info-cvs digest...


Today's Topics:

   1. RE: cvs hangs while reporting 'version' (SOLVED) (Harig, Mark A.)
   2. Docs for cvs 1.11.4 (Douglas Finkle)
   3. Re: How is a patch applied to CVS? (Kaz Kylheku)
   4. FW: CVS Multiple checkouts prevent.. (Mariappan Muthiah)
   5. Re: How is a patch applied to CVS? (Riechers, Matthew W)
   6. Re: CVS and multiple platforms - version conflicts,
  featuresavailable
etc.
   7. Re: CVS and multiple platforms - version conflicts, features
available (Larry Jones)
   8. Re: CVS and multiple platforms - version conflicts, features
   available etc. (ADFH)
   9. Re: How is a patch applied to CVS? (Eric Siegerman)


--

Date: Tue, 7 Jan 2003 14:11:01 -0500
From: Harig, Mark A. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: cvs hangs while reporting 'version' (SOLVED)
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain;
charset=iso-8859-1
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Precedence: list
Message: 1

 -Original Message-
 From: Larry Jones [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, January 04, 2003 5:27 PM
 To: Harig, Mark A.
 Cc: [EMAIL PROTECTED]
 Subject: Re: cvs hangs while reporting 'version'
=20
=20
 Harig, Mark A. writes:
 =20
  The above is NOT a typo.  After 'read(5,', the output hangs with the
  cursor
  following the '5,'.  I have left this run for nearly thirty=20
 minutes to
  see
  if there was a timeout condition, before using 'Ctrl-C' to halt the
  command.
=20
 Try upgrading to the recently-released CVS 1.11.4.
=20
 -Larry Jones
=20

Thanks for the suggestion.  I upgraded my CVS client to 1.11.4.  cvs
still
hangs, but at a different place -- during a call to wait():

$ export CVS_RSH=3D/usr/bin/ssh
$ strace cvs -t -f -dIP addr:/path/to/cvs/repos version

(much text omitted)

write(4, UseUnchanged\n, 13)  =3D 13
write(4, Global_option -t\nversion\n, 25) =3D 25
read(5, M , 4096) =3D 2
read(5, Concurrent Versions System (CVS)..., 4096) =3D 58
write(1, Server: Concurrent Versions Syst..., 66Server: Concurrent
Versions System (CVS) 1.11.1p1 (client/server)
) =3D 66
read(5, ok\n, 4096)   =3D 3
fstat64(4, {st_mode=3DS_IFIFO|0600, st_size=3D0, ...}) =3D 0
close(4)=3D 0
munmap(0x40018000, 4096)=3D 0
fstat64(5, {st_mode=3DS_IFIFO|0600, st_size=3D0, ...}) =3D 0
close(5)=3D 0
munmap(0x40019000, 4096)=3D 0
wait4(7090,=20

Because my ssh connection has been working seemlessly between
the client and server machines, I did not suspect that it
could be the cause of the problem.  Nevertheless, I checked
the versions of openssh that I was running on the client
and the server.  Because they were different, I upgraded
the version I am running on the client machine to match
the version that I am running on the server machine.

This solved the problem.  cvs now works regardless of
whether I use cvs 1.11.4 or cvs 1.11.1p1 as the client.

For future reference to anyone else who might have this
problem, I was running

Re: How is a patch applied to CVS?

2003-01-07 Thread Kaz Kylheku
On Mon, 6 Jan 2003, Mazza, Glen R., ,CPMS wrote:

 Simple question (I've checked the Cedarqvist manual, it's probably there but
 can't seem to find it!):  How is a patch file committed into CVS to update
 the most recent version?

There is no support built into CVS for doing this. You check out a
working copy, use the patch tool to turn the patch into local
modifications, and then verify and commit the changes.

It probably will behoove you to keep track of the patch levels in a
branch. That way the patch will always be applied against an exact copy
of the baseline from which it was made by the third party developers.

To integrate it into your locally modified verison of the software, you
merge from that branch.

The moral is that it's better to let CVS do the merging, than the patch
tool. It's better at it, having more information. Patch can only do a
two-way merge, having no access to the ancestral version. It bails on
anything difficult, throwing hunks into .rej files.



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



Re: How is a patch applied to CVS?

2003-01-07 Thread Riechers, Matthew W
Mazza, Glen R., ,CPMS wrote:
 
 Hello,
 
 Simple question (I've checked the Cedarqvist manual, it's probably there but
 can't seem to find it!):  How is a patch file committed into CVS to update
 the most recent version?

Use patch(1) or some other tool to merge the patchfile with the local
sandbox, then 'cvs commit' the result.

-Matt


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



Re: How is a patch applied to CVS?

2003-01-07 Thread Eric Siegerman
On Mon, Jan 06, 2003 at 08:23:52PM -0500, Mazza, Glen R., ,CPMS wrote:
 How is a patch file committed into CVS to update
 the most recent version?

In several steps:
  - Apply the patch to a checked-out working directory
  - Resolve any conflicts (i.e. .rej files)
  - Compile and test
  - cvs commit

CVS itself can't digest arbitrary patch files.

--

|  | /\
|-_|/ Eric Siegerman, Toronto, Ont.[EMAIL PROTECTED]
|  |  /
Just Say No to the faceless cannonfodder stereotype.
- http://www.ainurin.net/ (an Orc site)


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