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 @@ -895,24 +895,50 @@ Adding and Removing Files + 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 +[...] + - 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. + Some subdirectories may have additional + auto-properties, for example: + + &prompt.user; svn propget svn:auto-props https://svn.freebsd.org/ports/head/Mk/Scripts +*.sh = svn:keywords=FreeBSD=%H - Files are added to a - SVN repository with svn - add. To add a file named + The Documentation repository does not use + svn:auto-props, when adding files, it may + be necessary to add properties manually, like explained in + . + + Files are added to a SVN repository + with svn add. To add a file named foo, edit it, then: &prompt.user; svn add foo @@ -928,30 +954,60 @@ $&os;$ string. + If a file is missing a + Subversion property, it can be + easily added. For example, if the file contains a + $FreeBSD$ keyword and the + server complains about it: + + &prompt.user; svn ci 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' + + Then use svn propset to add the + required property, and commit the file again: + + &prompt.user; svn propset svn:keywords FreeBSD=%H foo +&prompt.user; svn ci foo +Adding foo +Transmitting file data .done +Committing transaction... +Committed revision 85645. + + Files can be removed with svn remove: &prompt.user; svn remove 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 rm, and indeed complains if + that happens. + + + Use svn mkdir to combine the creation + of the directory and the adding of it: + + &prompt.user; svn mkdir bar - It is possible to add directories with + 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: - - &prompt.user; svn mkdir bar - - Like files, directories are removed with - svn rm. There is no separate command - specifically for removing directories. + Like files, directories are removed with svn + rm. There is no separate command specifically + for removing directories. &prompt.user; svn rm bar