English Chinese (Simplified) (zh_CN)
When possible, please submit a man:svn[1] diff. They are easier to handle than diffs between "new and old" directories. It is easier to see what has changed, and to update the diff if something was modified in the Ports Collection since the work on it began, or if the committer asks for something to be fixed. Also, a patch generated with `svn diff` can be easily applied with `svn patch` and will save some time to the committer.
% cd ~/my_wrkdir <.>
% svn co https://svn.FreeBSD.org/ports/head/dns/pdnsd <.>
% cd ~/my_wrkdir/pdnsd
<.> This can be anywhere, of course. Building ports is not limited to within [.filename]#/usr/ports/#.
<.> https://svn.FreeBSD.org/[svn.FreeBSD.org] is the FreeBSD public Subversion server. See link:{handbook}#svn-mirrors[Subversion mirror sites] for more information.
While in the port directory, make any changes that are needed. If adding, copying, moving, or removing a file, use `svn` to track these changes:
% svn add new_file
% svn copy some_file file_copy
% svn move old_name new_name
% svn remove deleted_file
Make sure to check the port using the checklist in <<porting-testing,Testing the Port>> and <<porting-portlint,Checking the Port with `portlint`>>.
% svn status
% svn update <.>
<.> This will attempt to merge the differences between the patch and current repository version. Watch the output carefully. The letter in front of each file name indicates what was done with it. See <<table-svn-up>> for a complete list.
Subversion Update File Prefixes
|The file was updated without problems.

|The file was updated without problems (only when working against a remote repository).

|The file had been modified, and was merged without conflicts.

|The file had been modified, and was merged with conflicts.
If `C` is displayed as a result of `svn update`, it means something changed in the Subversion repository and man:svn[1] was not able to merge the local changes with those from the repository. It is always a good idea to inspect the changes anyway, since man:svn[1] does not know anything about the structure of a port, so it might (and probably will) merge things that do not make sense.
The last step is to make a unified man:diff[1] of the changes:
% svn diff > ../`make -VPKGNAME`.diff
If files have been added, copied, moved, or removed, include the man:svn[1] `add`, `copy`, `move`, and `remove` commands that were used. `svn move` or `svn copy` must be run before the patch can be applied. `svn add` or `svn remove` must be run after the patch is applied.
Send the patch following the link:{problem-reports}#pr-writing/[problem report submission guidelines].
[.filename]#UPDATING# and [.filename]#MOVED#
If upgrading the port requires special steps like changing configuration files or running a specific program, it must be documented in this file. The format of an entry in this file is:
AFFECTS: users of portcategory/portname
AUTHOR: Your name <Your email address>