Changes between Initial Version and Version 1 of CommittersTipsAndTricks


Ignore:
Timestamp:
Mar 6, 2008, 2:09:36 AM (16 years ago)
Author:
raimue (Rainer Müller)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CommittersTipsAndTricks

    v1 v1  
     1= Tips and Tricks for committers =
     2
     3This page provides some useful hints how to work with our infrastructure. And they can also make your work a lot easier.
     4
     5== Set svn properties automatically on new Portfiles ==
     6
     7In the configuration for your Subversion client, enable automatic property setting and, for all files named Portfile, setting "svn:eol-style" to "native" and "svn:keywords" to "Id".  If you are not using Subversion's own svn command-line client, see its documentation.  For svn, you can make the appropriate changes by editing `~/.subversion/config` as follows:
     8
     9{{{
     10...
     11
     12[miscellany]
     13enable-auto-props
     14
     15...
     16
     17[auto-props]
     18Portfile = svn:eol-style=native;svn:keywords=Id
     19}}}
     20
     21
     22== Apply patches directly from Trac URL ==
     23
     24Add the following functions to your `.bashrc` in order to apply patches directly from Trac.
     25 
     26{{{
     27function trac-get {
     28    curl "$1?format=raw" -o $(basename $1)
     29}
     30
     31function trac-patch {
     32    trac-get $1
     33    patch -p0 < $(basename $1)
     34}
     35}}}
     36
     37Use like this:
     38 1. Copy the URL to the patch from the Trac ticket page
     39 1. Switch to the ports directory
     40{{{
     41$ cd $(port dir foo)
     42}}}
     43 1. Apply the patch
     44{{{
     45$ trac-patch http://trac.macosforge.org/projects/macports/attachment/ticket/.../Portfile.diff
     46}}}