Source string Read only

(itstool) path: step/para

34/340
Context English State
<prompt>%</prompt> <userinput>svn propdel svn:keywords -R .</userinput>
<prompt>%</prompt> <userinput>svn commit</userinput>
Bootstrapping of <literal>svn:mergeinfo</literal> on the target directory (in the main tree) to the revision that corresponds to the last change was made to the vendor tree prior to importing new sources is also needed:
<prompt>%</prompt> <userinput>cd head/contrib/<replaceable>foo</replaceable></userinput>
<prompt>%</prompt> <userinput>svn merge --record-only ^/vendor/<replaceable>foo</replaceable>/dist@<replaceable>12345678</replaceable> .</userinput>
<prompt>%</prompt> <userinput>svn commit</userinput>
With some shells, the <literal>^</literal> in the above command may need to be escaped with a backslash.
Importing New Sources
Prepare a full, clean tree of the vendor sources. With <acronym>SVN</acronym>, we can keep a full distribution in the vendor tree without bloating the main tree. Import everything but merge only what is needed.
Note that you will need to add any files that were added since the last vendor import, and remove any that were removed. To facilitate this, you should prepare sorted lists of the contents of the vendor tree and of the sources you are about to import:
<prompt>%</prompt> <userinput>cd vendor/<replaceable>foo</replaceable>/dist</userinput>
<prompt>%</prompt> <userinput>svn list -R | grep -v '/$' | sort &gt; ../<replaceable>old</replaceable></userinput>
<prompt>%</prompt> <userinput>cd ../<replaceable>foo-9.9</replaceable></userinput>
<prompt>%</prompt> <userinput>find . -type f | cut -c 3- | sort &gt; ../<replaceable>new</replaceable></userinput>
With these two files, the following command will list removed files (files only in <filename><replaceable>old</replaceable></filename>):
<prompt>%</prompt> <userinput>comm -23 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable></userinput>
While the command below will list added files (files only in <filename><replaceable>new</replaceable></filename>):
<prompt>%</prompt> <userinput>comm -13 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable></userinput>
Let us put this together:
<prompt>%</prompt> <userinput>cd vendor/<replaceable>foo</replaceable>/<replaceable>foo-9.9</replaceable></userinput>
<prompt>%</prompt> <userinput>tar cf - . | tar xf - -C ../dist</userinput>
<prompt>%</prompt> <userinput>cd ../dist</userinput>
<prompt>%</prompt> <userinput>comm -23 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable> | xargs svn remove</userinput>
<prompt>%</prompt> <userinput>comm -13 ../<replaceable>old</replaceable> ../<replaceable>new</replaceable> | xargs svn add</userinput>
If there are new directories in the new distribution, the last command will fail. You will have to add the directories, and run it again. Conversely, if any directories were removed, you will have to remove them manually.
Check properties on any new files:
All text files should have <literal>svn:eol-style</literal> set to <literal>native</literal>.
All binary files should have <literal>svn:mime-type</literal> set to <literal>application/octet-stream</literal>, unless there is a more appropriate media type.
Executable files should have <literal>svn:executable</literal> set to <literal>*</literal>.
There should be no other properties on any file in the tree.
You are ready to commit, but you should first check the output of <command>svn stat</command> and <command>svn diff</command> to make sure everything is in order.
Once you have committed the new vendor release, you should tag it for future reference. The best and quickest way is to do it directly in the repository:
<prompt>%</prompt> <userinput>svn copy ^/vendor/<replaceable>foo</replaceable>/dist <replaceable>svn_base</replaceable>/vendor/<replaceable>foo</replaceable>/<replaceable>9.9</replaceable></userinput>
To get the new tag, you can update your working copy of <filename>vendor/<replaceable>foo</replaceable></filename>.
If you choose to do the copy in the checkout instead, do not forget to remove the generated <literal>svn:mergeinfo</literal> as described above.
Merging to <emphasis>-HEAD</emphasis>
After you have prepared your import, it is time to merge. Option <option>--accept=postpone</option> tells <acronym>SVN</acronym> not to handle merge conflicts yet, because they will be taken care of manually:
<prompt>%</prompt> <userinput>cd head/contrib/<replaceable>foo</replaceable></userinput>
<prompt>%</prompt> <userinput>svn update</userinput>
<prompt>%</prompt> <userinput>svn merge --accept=postpone ^/vendor/<replaceable>foo</replaceable>/dist</userinput>
Resolve any conflicts, and make sure that any files that were added or removed in the vendor tree have been properly added or removed in the main tree. It is always a good idea to check differences against the vendor branch:
<prompt>%</prompt> <userinput>svn diff --no-diff-deleted --old=^/vendor/<replaceable>foo</replaceable>/dist --new=.</userinput>
<option>--no-diff-deleted</option> tells <acronym>SVN</acronym> not to check files that are in the vendor tree but not in the main tree.

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment

(itstool) path: step/para

Flags
read-only
Source string location
book.translate.xml:4066
String age
a year ago
Source string age
a year ago
Translation file
books/developers-handbook.pot, string 678