/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/po_merge/po_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:15:15 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7183.
  • Revision ID: jelmer@jelmer.uk-20181116231515-zqd2yn6kj8lfydyp
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
import fnmatch
30
30
import subprocess
31
31
import tempfile
32
 
import sys
33
32
 
34
33
from breezy import (
35
34
    cmdline,
40
39
 
41
40
 
42
41
command_option = config.Option(
43
 
        'po_merge.command',
44
 
        default='msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"',
45
 
        help='''\
 
42
    'po_merge.command',
 
43
    default='msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"',
 
44
    help='''\
46
45
Command used to create a conflict-free .po file during merge.
47
46
 
48
47
The following parameters are provided by the hook:
58
57
 
59
58
 
60
59
po_dirs_option = config.ListOption(
61
 
        'po_merge.po_dirs', default='po,debian/po',
62
 
        help='List of dirs containing .po files that the hook applies to.')
 
60
    'po_merge.po_dirs', default='po,debian/po',
 
61
    help='List of dirs containing .po files that the hook applies to.')
63
62
 
64
63
 
65
64
po_glob_option = config.Option(
66
 
        'po_merge.po_glob', default='*.po',
67
 
        help='Glob matching all ``.po`` files in one of ``po_merge.po_dirs``.')
 
65
    'po_merge.po_glob', default='*.po',
 
66
    help='Glob matching all ``.po`` files in one of ``po_merge.po_dirs``.')
68
67
 
69
68
pot_glob_option = config.Option(
70
 
        'po_merge.pot_glob', default='*.pot',
71
 
        help='Glob matching the ``.pot`` file in one of ``po_merge.po_dirs``.')
 
69
    'po_merge.pot_glob', default='*.pot',
 
70
    help='Glob matching the ``.pot`` file in one of ``po_merge.po_dirs``.')
72
71
 
73
72
 
74
73
class PoMerger(merge.PerFileMerger):
82
81
        # FIXME: We use the branch config as there is no tree config
83
82
        # -- vila 2011-11-23
84
83
        self.conf = merger.this_branch.get_config_stack()
85
 
        # Which dirs are targeted by the hook 
 
84
        # Which dirs are targeted by the hook
86
85
        self.po_dirs = self.conf.get('po_merge.po_dirs')
87
 
        # Which files are targeted by the hook 
 
86
        # Which files are targeted by the hook
88
87
        self.po_glob = self.conf.get('po_merge.po_glob')
89
88
        # Which .pot file should be used
90
89
        self.pot_glob = self.conf.get('po_merge.pot_glob')