Index: en_US.ISO8859-1/articles/committers-guide/article.xml =================================================================== --- en_US.ISO8859-1/articles/committers-guide/article.xml +++ en_US.ISO8859-1/articles/committers-guide/article.xml @@ -548,8 +548,10 @@ /usr/src/, which can be any target directory on the local filesystem. Omitting the final argument of that command causes the - working copy, in this case, to be named head, - but that can be renamed safely. + working copy, in this case head, to be + checked out in a directory also named + head, but that can be renamed + safely. svn+ssh means the SVN protocol tunnelled over @@ -581,8 +583,8 @@ - <literal>RELENG_*</literal> Branches and General - Layout + &os; Base System, <literal>RELENG_*</literal> Branches + and General Layout In svn+ssh://repo.freebsd.org/base, base refers to the source tree. @@ -765,8 +767,8 @@ Expanding the working copy is possible. Just change the depth of the various subdirectories: - &prompt.user; svn up --set-depth=infinity base/head -&prompt.user; svn up --set-depth=immediates base/release base/releng base/stable + &prompt.user; svn update --set-depth=infinity base/head +&prompt.user; svn update --set-depth=immediates base/release base/releng base/stable The above command will pull down a full copy of head, plus empty copies of every @@ -778,15 +780,15 @@ 7-STABLE is required, expand the working copy: - &prompt.user; svn up --set-depth=infinity base/stable/7 + &prompt.user; svn update --set-depth=infinity base/stable/7 Subtrees do not have to be expanded completely. For instance, expanding only stable/7/sys and then later expand the rest of stable/7: - &prompt.user; svn up --set-depth=infinity base/stable/7/sys -&prompt.user; svn up --set-depth=infinity base/stable/7 + &prompt.user; svn update --set-depth=infinity base/stable/7/sys +&prompt.user; svn update --set-depth=infinity base/stable/7 Updating the tree with svn update will only update what was previously asked for (in this @@ -803,7 +805,7 @@ read-only tree that can be updated, but not committed back to the main repository. To do this, use: - &prompt.user; svn co https://svn.FreeBSD.org/base/head /usr/src + &prompt.user; svn checkout https://svn.FreeBSD.org/base/head /usr/src More details on using Subversion this way can be found in Using @@ -863,25 +865,9 @@ Adding and Removing Files - - Before adding files, get a copy of auto-props.txt - (there is also a - ports tree specific version) and add it to - ~/.subversion/config according to the - instructions in the file. If you added something before - reading this, use svn rm --keep-local - for just added files, fix your config file and re-add them - again. The initial config file is created when you first - run a svn command, even something as simple as - svn help. - - - Files are added to a - SVN repository with svn - add. To add a file named - foo, edit it, then: + Files are added to a SVN repository + with svn add. To add an existing file + named foo, run: &prompt.user; svn add foo @@ -896,32 +882,173 @@ $&os;$ string. + If a file is missing a + Subversion property, it can be + easily added. See . + Files can be removed with svn - remove: + delete: - &prompt.user; svn remove foo + &prompt.user; svn delete foo - Subversion does not require deleting the file before - using svn rm, and indeed complains if - that happens. + + Subversion does not require deleting the file before + using svn delete, and indeed complains if + that happens. + - It is possible to add directories with + Use svn mkdir to combine the creation + of the directory and the adding of it: + + &prompt.user; svn mkdir bar + + It is also possible to add existing directories with svn add: &prompt.user; mkdir bar &prompt.user; svn add bar - Although svn mkdir makes this easier - by combining the creation of the directory and the adding of - it: + Like files, directories are removed with svn + delete. There is no separate command specifically + for removing directories. - &prompt.user; svn mkdir bar + &prompt.user; svn delete bar + + + + Dealing with <application>Subversion</application> + Properties + + In the base and ports + Subversion repositories, + properties are set automatically when a file is added. This + is achieved by using the svn:auto-props + property. No auto-props file needs to be used. The base + system auto-props.txt should not be + used. The current list of automatic properties can be seen + with: + + &prompt.user; svn propget svn:auto-props https://svn.freebsd.org/ports +bsd.*.mk = svn:keywords=FreeBSD=%H +distinfo* = fbsd:nokeywords=yes +extrapatch-* = fbsd:nokeywords=yes +extra-patch-*= fbsd:nokeywords=yes +patch-* = fbsd:nokeywords=yes +pkg-* = fbsd:nokeywords=yes +Makefile* = svn:keywords=FreeBSD=%H +* = svn:eol-style=native; svn:mime-type=text/plain + +&prompt.user; svn propget svn:auto-props https://svn.freebsd.org/base +*.c = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain +*.h = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain +*.s = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain +*.S = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain +*.cc = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain +[...] - Like files, directories are removed with - svn rm. There is no separate command - specifically for removing directories. + + Some subdirectories may have additional + auto-properties, to find out which, the + argument for svn + propget can be used, for example: + + &prompt.user; svn propget -R svn:auto-props https://svn.freebsd.org/ports/head/ +https://svn.freebsd.org/ports/head/Mk - *.mk = svn:keywords=FreeBSD=%H - &prompt.user; svn rm bar +https://svn.freebsd.org/ports/head/Mk/Scripts - *.sh = svn:keywords=FreeBSD=%H + +https://svn.freebsd.org/ports/head/misc/freebsd-release-manifests/files/MANIFESTS - *=svn:eol-style=native; fbsd:nokeywords=on; svn:mime-type=text/plain + + + The Documentation repository does not use + svn:auto-props, when adding files, it may + be necessary to add properties manually. + + + When adding a file, it is easy to see what properties + have been automatically added to it using svn + proplist. For example, in the ports + tree: + + &prompt.user; svn add Makefile pkg-plist +A Makefile +A pkg-plist +&prompt.user; svn proplist Makefile pkg-plist +Properties on 'Makefile': + svn:eol-style + svn:keywords + svn:mime-type +Properties on 'pkg-plist': + fbsd:nokeywords + svn:eol-style + svn:mime-type + + It is also possible to get the value of all the + properties of a file using svn proplist + -v: + + &prompt.user; svn proplist -v Makefile pkg-plist +Properties on 'Makefile': + svn:eol-style + native + svn:keywords + FreeBSD=%H + svn:mime-type + text/plain +Properties on 'pkg-plist': + fbsd:nokeywords + yes + svn:eol-style + native + svn:mime-type + text/plain + + + + Adding a Missing Subversion Property + + It may happen that some file does not have the correct + properties and they need to be added or removed manually. + For example, if the file contains a + $FreeBSD$ keyword and the + server complains about it: + + &prompt.user; svn commit foo +Adding foo +Transmitting file data .done +Committing transaction... +svn: E165001: Commit failed (details follow): +svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output: +Path "head/foo" is missing the svn:keywords property (or an fbsd:nokeywords override) +== Pre-commit problem count: 1 + +svn: E165001: Your commit message was left in a temporary file: +svn: E165001: '/usr/ports/svn-commit.tmp' + + If the file contains a + $FreeBSD$ keyword, then + use svn propset to add the required + property, and commit the file again: + + &prompt.user; svn propset svn:keywords FreeBSD=%H foo + + If the file does not contain the keyword, or it + contains a keyword, but it should not be modified, for + example, if the file is a patch. The + fbsd:nokeywords keyword need to be + added: + + &prompt.user; svn propset fbsd:nokeywords yes foo + + The file can then be committed: + + &prompt.user; svn commit foo +Adding foo +Transmitting file data .done +Committing transaction... +Committed revision 85645. + @@ -994,46 +1121,80 @@ If an svn update resulted in a merge conflict, Subversion will remember which files have conflicts and refuse to commit any changes to those files - until explicitly told that the conflicts have been resolved. - The simple, not yet deprecated procedure is: - - &prompt.user; svn resolved foo + until explicitly told that the conflicts have been + resolved. - However, the preferred procedure is: + The preferred procedure to mark conflicts as resolved + is: &prompt.user; svn resolve --accept=working foo - The two examples are equivalent. Possible values for + Possible values for --accept are: - + + + working + - working: use the version in your + Use the version in your working directory (which one presumes has been edited to resolve the conflicts). + + + + base - base: use a pristine copy of the + Use a pristine copy of the version you had before svn update, discarding your own changes, the conflicting changes, and possibly other intervening changes as well. + + + + mine-conflict + + + Accept my version for all conflicts. Keep non + conflicting changes from both sides. + + + + + theirs-conflict + + + Accept the version that was retrieved when you did + svn update for all conflicts. Keep + non conflicting changes from both sides. + + + + + mine-full - mine-full: use what you had + Use what you had before svn update, including your own changes, but discarding the conflicting changes, and possibly other intervening changes as well. + + + + theirs-full - theirs-full: use the version that + Use the version that was retrieved when you did svn update, discarding your own changes. - + + @@ -1118,7 +1279,7 @@ - remove, copy, + delete, copy, rename @@ -1140,7 +1301,8 @@ This is equivalent to these commands which take minutes and hours as opposed to seconds, - depending on your network connection: + depending on your network connection and local hard drive + speed: &prompt.user; svn checkout --depth=immediates svn+ssh://repo.freebsd.org/base &prompt.user; cd base @@ -1277,10 +1439,12 @@ of stable/7: &prompt.user; cd stable/7 -&prompt.user; svn up --set-depth=infinity +&prompt.user; svn update --set-depth=infinity + The target directory must also be up-to-date and must not contain any uncommitted changes or stray files. + @@ -1493,9 +1657,9 @@ To flatten the pf tree: &prompt.user; cd vendor/pf/dist/contrib/pf -&prompt.user; svn mv $(svn list) ../.. +&prompt.user; svn move $(svn list) ../.. &prompt.user; cd ../.. -&prompt.user; svn rm contrib +&prompt.user; svn delete contrib &prompt.user; svn propdel -R svn:mergeinfo . &prompt.user; svn commit @@ -1562,7 +1726,7 @@ A svn add is required to add any files that were added since the last vendor import, and - svn rm is required to remove any that + svn delete is required to remove any that were removed since. Preparing sorted lists of the contents of the vendor tree and of the sources that are about to be imported is recommended, to facilitate the @@ -1587,17 +1751,17 @@ Now, the sources must be copied into dist and the svn add and - svn rm commands are used as + svn delete commands are used as needed: &prompt.user; cd vendor/pf/pf-4.3 &prompt.user; tar cf - . | tar xf - -C ../dist &prompt.user; cd ../dist -&prompt.user; comm -23 ../old ../new | xargs svn rm +&prompt.user; comm -23 ../old ../new | xargs svn delete &prompt.user; comm -13 ../old ../new | xargs svn --parents add If any directories were removed, they will have to - be svn rmed manually. Nothing will + be svn deleted manually. Nothing will break if they are not, but they will remain in the tree. @@ -1624,9 +1788,9 @@ future reference. The best and quickest way to do this is directly in the repository: - &prompt.user; svn cp svn+ssh://repo.freebsd.org/base/vendor/pf/dist svn+ssh://repo.freebsd.org/base/vendor/pf/4.3 + &prompt.user; svn copy svn+ssh://repo.freebsd.org/base/vendor/pf/dist svn+ssh://repo.freebsd.org/base/vendor/pf/4.3 - Once that is complete, svn up the + Once that is complete, svn update the working copy of vendor/pf to get the new tag, although this is rarely @@ -1637,7 +1801,7 @@ removed: &prompt.user; cd vendor/pf -&prompt.user; svn cp dist 4.3 +&prompt.user; svn copy dist 4.3 &prompt.user; svn propdel svn:mergeinfo -R 4.3 @@ -1646,7 +1810,7 @@ Merging to Head &prompt.user; cd head/contrib/pf -&prompt.user; svn up +&prompt.user; svn update &prompt.user; svn merge --accept=postpone svn+ssh://repo.freebsd.org/base/vendor/pf/dist . The --accept=postpone tells @@ -1736,7 +1900,7 @@ First, prepare the directory in vendor: - &prompt.user; svn co --depth immediates $FSVN/vendor + &prompt.user; svn checkout --depth immediates $FSVN/vendor &prompt.user; cd vendor &prompt.user; svn mkdir byacc &prompt.user; svn mkdir byacc/dist @@ -1748,7 +1912,7 @@ the imported version. To save time and bandwidth, direct remote committing and tagging is possible: - &prompt.user; svn cp -m "Tag byacc 20120115" $FSVN/vendor/byacc/dist $FSVN/vendor/byacc/20120115 + &prompt.user; svn copy -m "Tag byacc 20120115" $FSVN/vendor/byacc/dist $FSVN/vendor/byacc/20120115 @@ -1757,7 +1921,7 @@ Due to this being a new file, copy it for the merge: - &prompt.user; svn cp -m "Import byacc to contrib" $FSVN/vendor/byacc/dist $FSVN/head/contrib/byacc + &prompt.user; svn copy -m "Import byacc to contrib" $FSVN/vendor/byacc/dist $FSVN/head/contrib/byacc Working normally on newly imported sources is still possible. @@ -4046,7 +4210,7 @@ Remove the port's files and directory with - svn remove. + svn delete. @@ -4117,7 +4281,7 @@ port: &prompt.user; cd /usr/ports/category -&prompt.user; svn cp 'svn+ssh://repo.freebsd.org/ports/head/category/portname/@XXXXXX' portname +&prompt.user; svn copy 'svn+ssh://repo.freebsd.org/ports/head/category/portname/@XXXXXX' portname Pick the revision that is just before the removal. For example, if the revision where it was @@ -4129,7 +4293,7 @@ after the last commit to the port. &prompt.user; cd /usr/ports/category -&prompt.user; svn cp 'svn+ssh://repo.freebsd.org/ports/head/category/portname/@{YYYY-MM-DD}' portname +&prompt.user; svn copy 'svn+ssh://repo.freebsd.org/ports/head/category/portname/@{YYYY-MM-DD}' portname @@ -4143,7 +4307,7 @@ If some files have been added, or were removed during the resurrection process, use svn - add or svn remove to + add or svn delete to make sure all the files in the port will be committed. @@ -4228,7 +4392,7 @@ - Use svn up to make + Use svn update to make certain the original files, directories, and checkout information is current.