From crees@zeus.bayofrum.net Sat Mar 19 11:04:47 2011 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7AA106566B for ; Sat, 19 Mar 2011 11:04:47 +0000 (UTC) (envelope-from crees@zeus.bayofrum.net) Received: from relay.ptn-ipout02.plus.net (relay.ptn-ipout02.plus.net [212.159.7.36]) by mx1.freebsd.org (Postfix) with ESMTP id B49808FC0C for ; Sat, 19 Mar 2011 11:04:46 +0000 (UTC) Received: from outmx01.plus.net ([84.93.230.227]) by relay.ptn-ipout02.plus.net with ESMTP; 19 Mar 2011 11:04:44 +0000 Received: from [87.113.121.187] (helo=zeus.bayofrum.net) by outmx01.plus.net with esmtp (Exim) id 1Q0txb-0003Nl-AA; Sat, 19 Mar 2011 11:04:44 +0000 Received: from zeus.bayofrum.net (crees@localhost [127.0.0.1]) by zeus.bayofrum.net (8.14.4/8.14.4) with ESMTP id p2JB3jgD080399 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sat, 19 Mar 2011 11:03:46 GMT (envelope-from crees@zeus.bayofrum.net) Received: (from crees@localhost) by zeus.bayofrum.net (8.14.4/8.14.4/Submit) id p2JB3iQl080398; Sat, 19 Mar 2011 11:03:44 GMT (envelope-from crees) Message-Id: <201103191103.p2JB3iQl080398@zeus.bayofrum.net> Date: Sat, 19 Mar 2011 11:03:44 GMT From: Chris Rees Reply-To: Chris Rees To: FreeBSD-gnats-submit@freebsd.org Cc: itetcu@freebsd.org Subject: New section of Porter's Handbook; Using CVS to make patches X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 155691 >Category: docs >Synopsis: New section of Porter's Handbook; Using CVS to make patches >Confidential: no >Severity: non-critical >Priority: low >Responsible: gjb >State: closed >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Mar 19 11:10:09 UTC 2011 >Closed-Date: Sat Jun 18 19:56:42 UTC 2011 >Last-Modified: Sat Jun 18 20:00:25 UTC 2011 >Originator: Chris Rees >Release: FreeBSD 8.2-RELEASE i386 >Organization: >Environment: System: FreeBSD zeus.bayofrum.net 8.2-RELEASE FreeBSD 8.2-RELEASE #1: Sun Feb 27 22:19:51 UTC 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 >Description: Ion-Mihai Tetcu has written a guide [1] to making cvs diffs of port changes. This is the first part of it, put into (I hope) an appropriate part of the Porter's Handbook. My plan is to later merge the tips on PRs into the PR submission guide too, and perhaps link them. [1] http://ionut.tetcu.info/FreeBSD/How-to-submit-a-diff.txt >How-To-Repeat: >Fix: I've added into the Upgrading an individual port chapter a section on how to make a cvs diff (written by itetcu@, not quite sure how to acknowledge that) as well as adding a link in the introduction where using diff is mentioned. Rendered: http://www.bayofrum.net/~crees/port.html (the callout images are missing, which is why they're the alt text (#)) - Added section How to make a cvs diff - Added link to section where diff methods are described PR: Submitted by: Chris Rees (utisoft_at_gmail.com) Original author: itetcu --- porters-cvs-diff.diff begins here --- Index: book.sgml =================================================================== RCS file: /exports/cvsroot-freebsd/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v retrieving revision 1.1097 diff -u -r1.1097 book.sgml --- book.sgml 18 Feb 2011 20:57:00 -0000 1.1097 +++ book.sgml 13 Mar 2011 17:58:30 -0000 @@ -9524,8 +9524,9 @@ &prompt.user; /usr/bin/diff something.orig something > something.diff - Otherwise, you should copy the contents of the port to an entire - different directory and use + Otherwise, you should either use the cvs diff + method () or copy the contents of the port to + an entire different directory and use the result of the recursive &man.diff.1; output of the new and old @@ -9595,6 +9596,127 @@ Now that you have done all that, you will want to read about how to keep up-to-date in . + + Using CVS to make patches + + If you can, please submit a cvs diff, they are easier to handle + than diffs between new and old dirs. Plus it's easier + for you to see what you have changed and update your diff if + something is modified in the Ports Collection from when you started + to work on it until you submit your changes or if the committer asks + you to fix something. + + &prompt.user; cd ~/my_wrkdir +&prompt.user; cvs -d R_CVSROOT co pdnsd +&prompt.user; cd ~/my_wrkdir/pdnsd + + + This can be anywhere you want, of course; ports can be + built from anywhere, not only + /usr/ports/. + + + + R_CVSROOT is any public cvs server, take your pick from + the list in the &os; + Handbook. + + + + pdnsd is the module name for the port; it is generally the + name of the port, with some exceptions, notably for national + categories (german/selfhtml + has the module name de-selfhtml); you can either + look up the module name via the + cvsweb + interface or write the whole path, in our example + ports/dns/pdnsd. + + + + While in the working directory, make any changes that you + would usually make to the port. If you add or remove a file, use + cvs to track these changes: + + &prompt.user; cvs add new_file +&prompt.user; cvs rm deleted_file + + Make sure that you check the port using the + checklist in and + . + + &prompt.user; cvs status +&prompt.user; cvs update + + + + This will try to merge the differences between your patch + and current CVS; watch the output carefully. The letter in front + of each file name indicates what was done with it, described in + . + + + + + cvs update file prefixes + + + + + U + + The file was updated without trouble. + + + + P + + The file was updated without trouble (you will only see + this when working against a remote repository). + + + + M + + The file had been modified, and was merged without + conflicts. + + + + C + + The file had been modified, and was merged with + conflicts. + + + +
+ + If you get C as a result of + cvs update it means something + changed in the CVS and &man.cvs.1; wasn't able to merge your local + changes and those from CVS. It's always a good idea to inspect the + changes anyway, since cvs doesn't know anything + about how a port should be, so it might (and probably will) merge + things that don't make sense. + + The last step is to make a unified &man.diff.1; + of the files against CVS: + + &prompt.user; cvs diff -uN > ../`basename ${PWD}`.diff + + + It is important to use to ensure that + files you have removed are accounted for in the patch. The patch + will empty (but leave existing) any removed files when applied, so + remember to include these in the PR so the committer knows to + remove them. + + + Send your patch following the guidelines in + . +
+ The files UPDATING and MOVED --- porters-cvs-diff.diff ends here --- >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-doc->gjb Responsible-Changed-By: gjb Responsible-Changed-When: Sat Apr 30 23:03:26 UTC 2011 Responsible-Changed-Why: I'll take this. http://www.freebsd.org/cgi/query-pr.cgi?pr=155691 State-Changed-From-To: open->closed State-Changed-By: gjb State-Changed-When: Sat Jun 18 19:56:22 UTC 2011 State-Changed-Why: Committed with minor changes. Thanks! http://www.freebsd.org/cgi/query-pr.cgi?pr=155691 From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: docs/155691: commit references a PR Date: Sat, 18 Jun 2011 19:56:38 +0000 (UTC) gjb 2011-06-18 19:56:00 UTC FreeBSD doc repository Modified files: en_US.ISO8859-1/books/porters-handbook book.sgml Log: Add a "Using CVS to make patches" section to the Porter's Handbook. PR: 155691 Submitted and SGMLized by: crees Original version by: itetcu Approved by: jkois (mentor) Revision Changes Path 1.1110 +126 -2 doc/en_US.ISO8859-1/books/porters-handbook/book.sgml _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" >Unformatted: