54
# Since we are a built-in plugin we share the bzrlib version
55
from bzrlib import version_info
56
# Since we are a built-in plugin we share the bzrlib version
56
59
from bzrlib.hooks import install_lazy_named_hook
62
config.option_registry.register(config.Option(
64
default='msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"',
66
Command used to create a conflict-free .po file during merge.
68
The following parameters are provided by the hook:
69
``this`` is the ``.po`` file content before the merge in the current branch,
70
``other`` is the ``.po`` file content in the branch merged from,
71
``pot_file`` is the path to the ``.pot`` file corresponding to the ``.po``
73
``result`` is the path where ``msgmerge`` will output its result. The hook will
74
use the content of this file to produce the resulting ``.po`` file.
76
The command is invoked at the root of the working tree so all paths are
81
config.option_registry.register(config.Option(
82
'po_merge.po_dirs', default='po,debian/po',
83
from_unicode=config.list_from_store,
84
help='List of dirs containing .po files that the hook applies to.'))
87
config.option_registry.register(config.Option(
88
'po_merge.po_glob', default='*.po',
89
help='Glob matching all ``.po`` files in one of ``po_merge.po_dirs``.'))
91
config.option_registry.register(config.Option(
92
'po_merge.pot_glob', default='*.pot',
93
help='Glob matching the ``.pot`` file in one of ``po_merge.po_dirs``.'))
59
96
def po_merge_hook(merger):
60
97
"""Merger.merge_file_content hook for bzr-format NEWS files."""
61
98
from bzrlib.plugins.po_merge.po_merge import PoMerger