/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Vincent Ladeuil
  • Date: 2009-05-07 09:54:50 UTC
  • Revision ID: v.ladeuil+lp@free.fr-20090507095450-idnyqdk8t15sete7
Reproduce bug #373157 root cause.

* tests/test_annotate_config.py: 
Reproduce bug #373157.

* tests/__init__.py:
(load_tests): Add test_annotate_config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
visualise         Graphically visualise this branch. 
35
35
"""
36
36
 
37
 
import os
38
 
import sys
39
 
 
40
 
if getattr(sys, "frozen", None) is not None: # we run bzr.exe
41
 
 
42
 
    # FIXME: Unless a better packaging solution is found, the following
43
 
    # provides a workaround for https://bugs.launchpad.net/bzr/+bug/388790 Also
44
 
    # see https://code.edge.launchpad.net/~vila/bzr-gtk/388790-windows-setup
45
 
    # for more details about while it's needed.
46
 
 
47
 
    # NOTE: _lib must be ahead of bzrlib or sax.saxutils (in olive) fails
48
 
    here = os.path.dirname(__file__)
49
 
    sys.path.insert(0, os.path.join(here, '_lib'))
50
 
    sys.path.append(os.path.join(here, '_lib/gtk-2.0'))
51
 
 
52
 
 
53
37
import bzrlib
54
38
import bzrlib.api
55
 
from bzrlib import (
56
 
    branch,
57
 
    config,
58
 
    errors,
59
 
    )
 
39
from bzrlib import errors
60
40
from bzrlib.commands import plugin_cmds
61
41
 
 
42
import os.path
62
43
 
63
 
version_info = (0, 99, 0, 'dev', 1)
 
44
version_info = (0, 96, 0, 'dev', 1)
64
45
 
65
46
if version_info[3] == 'final':
66
47
    version_string = '%d.%d.%d' % version_info[:3]
70
51
 
71
52
COMPATIBLE_BZR_VERSIONS = [(1, 6, 0), (1, 7, 0), (1, 8, 0), (1, 9, 0),
72
53
                           (1, 10, 0), (1, 11, 0), (1, 12, 0), (1, 13, 0),
73
 
                           (1, 15, 0),
74
 
                           (1, 17, 0),
75
 
                           (2, 1, 0),
76
 
                           (2, 2, 0),
77
 
                           ]
 
54
                           (1, 15, 0),]
78
55
 
79
56
bzrlib.api.require_any_api(bzrlib, COMPATIBLE_BZR_VERSIONS)
80
57
 
144
121
    "gsend": [],
145
122
    "gstatus": ["gst"],
146
123
    "gtags": [],
147
 
    "visualise": ["visualize", "vis", "viz", 'glog'],
 
124
    "visualise": ["visualize", "vis", "viz"],
148
125
    }
149
126
 
150
127
try:
158
135
    plugin_cmds.register_lazy("cmd_%s" % cmd, aliases,
159
136
                              "bzrlib.plugins.gtk.commands")
160
137
 
161
 
def save_commit_messages(*args):
162
 
    from bzrlib.plugins.gtk import commit
163
 
    commit.save_commit_messages(*args)
164
 
 
165
 
branch.Branch.hooks.install_named_hook('post_uncommit',
166
 
                                       save_commit_messages,
167
 
                                       "Saving commit messages for gcommit")
168
138
 
169
139
import gettext
170
140
gettext.install('olive-gtk')
180
150
        return "No DISPLAY. Unable to run GTK+ application."
181
151
 
182
152
 
183
 
credential_store_registry = getattr(config, "credential_store_registry", None)
184
 
if credential_store_registry is not None:
185
 
    try:
186
 
        credential_store_registry.register_lazy(
187
 
            "gnome-keyring", "bzrlib.plugins.gtk.keyring", "GnomeKeyringCredentialStore",
188
 
            help="The GNOME Keyring.", fallback=True)
189
 
    except TypeError:
190
 
    # Fallback credentials stores were introduced in Bazaar 1.15
191
 
        credential_store_registry.register_lazy(
192
 
            "gnome-keyring", "bzrlib.plugins.gtk.keyring", "GnomeKeyringCredentialStore",
193
 
            help="The GNOME Keyring.")
194
 
 
195
 
 
196
153
def load_tests(basic_tests, module, loader):
197
154
    testmod_names = [
198
155
        'tests',