Rev 6287: Update the doc. in file:///home/vila/src/bzr/bugs/884270-merge-po/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Nov 28 16:44:35 UTC 2011
At file:///home/vila/src/bzr/bugs/884270-merge-po/
------------------------------------------------------------
revno: 6287
revision-id: v.ladeuil+lp at free.fr-20111128164435-lhtkqytrwfoymjzt
parent: v.ladeuil+lp at free.fr-20111128163508-uv7fjnv746o6dgev
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 884270-merge-po
timestamp: Mon 2011-11-28 17:44:35 +0100
message:
Update the doc.
-------------- next part --------------
=== modified file 'bzrlib/plugins/po_merge/__init__.py'
--- a/bzrlib/plugins/po_merge/__init__.py 2011-11-24 10:47:43 +0000
+++ b/bzrlib/plugins/po_merge/__init__.py 2011-11-28 16:44:35 +0000
@@ -20,14 +20,11 @@
like::
[/home/user/code/bzr]
- po_merge.pot_file = po/xxx.pot
- po_merge.po_files = po/*.po
-
-The ``po_merge.pot_file`` config option takes a list of file paths, separated
-by commas.
-
-The ``po_merge.po_files`` config option takes a list of file globs, separated
-by commas.
+ po_merge.pot_dirs = po,doc/po4a/po
+
+The ``po_merge.pot_dirs`` config option takes a list of directories that can
+contain ``.po`` files, separated by commas (if several directories are
+needed). Each directory should contain a single ``.pot`` file.
The ``po_merge.command`` is the command whose output is used as the result of
the merge. It defaults to::
@@ -41,18 +38,17 @@
* ``pot_file`` is the path to the ``.pot`` file corresponding to the ``.po``
file being merged.
-In the simple case where a single ``.pot`` file and a single set of ``.po``
-files exist, each config option can specify a single value.
-
-When several ``(.pot file, .po fileset)`` exist, both lists should be
-synchronized. For example::
-
- [/home/user/code/bzr]
- po_merge.pot_file = po/adduser.pot,doc/po4a/po/adduser.pot
- po_merge.po_files = po/*.po,doc/po4a/po/*.po
-
-``po/adduser.pot`` will be used for ``po/*.po`` and ``doc/po4a/po/adduser.pot``
-will be used for ``doc/po4a/po/*.po``.
+If conflicts occur in a ``.pot`` file during a given merge, the ``.po`` files
+will use the ``.pot`` file present in tree before the merge. If this doesn't
+suit your needs, you should can disable the plugin during the merge with::
+
+ bzr merge <usual merge args> -Opo_merge.po_dirs=
+
+This will allow you to resolve the conflicts in the ``.pot`` file and then
+merge the ``.po`` files again with::
+
+ bzr remerge po/*.po doc/po4a/po/*.po
+
"""
# Since we are a built-in plugin we share the bzrlib version
=== modified file 'bzrlib/plugins/po_merge/tests/test_po_merge.py'
--- a/bzrlib/plugins/po_merge/tests/test_po_merge.py 2011-11-28 16:35:08 +0000
+++ b/bzrlib/plugins/po_merge/tests/test_po_merge.py 2011-11-28 16:44:35 +0000
@@ -42,8 +42,8 @@
def test_merge_with_hook_gives_unexpected_results(self):
# Since the conflicts in .pot are not seen *during* the merge, the .po
- # merge triggers the hook and creates no conflicts. But the .pot used
- # is the one present in the tree *before* the merge.
+ # merge triggers the hook and creates no conflicts for fr.po. But the
+ # .pot used is the one present in the tree *before* the merge.
self.run_script("""\
$ bzr branch adduser -rrevid:this work
2>Branched 2 revisions.
@@ -62,8 +62,7 @@
2>Branched 2 revisions.
$ cd work
# set po_dirs to an empty list
-$ bzr config po_merge.po_dirs=
-$ bzr merge ../adduser -rrevid:other
+$ bzr merge ../adduser -rrevid:other -Opo_merge.po_dirs=
2> M po/adduser.pot
2> M po/fr.po
2>Text conflict in po/adduser.pot
More information about the bazaar-commits
mailing list