~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rules.py

  • Committer: INADA Naoki
  • Date: 2011-05-05 09:15:34 UTC
  • mto: (5830.3.3 i18n-msgfmt)
  • mto: This revision was merged to the branch mainline in revision 5873.
  • Revision ID: songofacandy@gmail.com-20110505091534-7sv835xpofwrmpt4
Add update-pot command to Makefile and tools/bzrgettext script that
extracts help text from bzr commands.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
 
22
22
from bzrlib import (
23
23
    config,
24
 
    commands,
 
24
    cmdline,
25
25
    errors,
26
26
    globbing,
27
27
    osutils,
74
74
 
75
75
        :param inifile: the name of the file or a sequence of lines.
76
76
        """
77
 
        options = {'encoding': 'utf-8'}
78
 
        self._cfg = configobj.ConfigObj(inifile, options=options)
 
77
        self._cfg = configobj.ConfigObj(inifile, encoding='utf-8')
79
78
        sections = self._cfg.keys()
80
79
        patterns = []
81
80
        self.pattern_to_section = {}
82
81
        for s in sections:
83
82
            if s.startswith(FILE_PREFS_PREFIX):
84
 
                file_patterns = commands.shlex_split_unicode(
85
 
                    s[FILE_PREFS_PREFIX_LEN:])
 
83
                file_patterns = cmdline.split(s[FILE_PREFS_PREFIX_LEN:])
86
84
                patterns.extend(file_patterns)
87
85
                for fp in file_patterns:
88
86
                    self.pattern_to_section[fp] = s