19
from inventory import Inventory, InventoryEntry
20
from branch import Branch, ScratchBranch, find_branch
21
from osutils import format_date
23
from diff import compare_trees
24
from trace import mutter, warning, open_tracefile
25
from log import show_log
30
DEFAULT_IGNORE = ['.bzr.log',
31
'*~', '#*#', '*$', '.#*',
32
'.*.sw[nop]', '.*.tmp',
33
'*.tmp', '*.bak', '*.BAK', '*.orig',
34
'*.o', '*.obj', '*.a', '*.py[oc]', '*.so', '*.exe', '*.elc',
35
'{arch}', 'CVS', 'CVS.adm', '.svn', '_darcs', 'SCCS', 'RCS',
39
'TAGS', '.make.state', '.sconsign', '.tmp*',
20
42
IGNORE_FILENAME = ".bzrignore"
24
if sys.platform == 'darwin':
25
# work around egregious python 2.4 bug
26
sys.platform = 'posix'
28
sys.platform = 'darwin'
31
# XXX: This probably belongs in osutils instead
32
user_encoding = locale.getpreferredencoding() or 'ascii'
45
user_encoding = locale.getpreferredencoding()
35
__copyright__ = "Copyright 2005, 2006 Canonical Development Ltd."
37
# same format as sys.version_info: "A tuple containing the five components of
38
# the version number: major, minor, micro, releaselevel, and serial. All
39
# values except releaselevel are integers; the release level is 'alpha',
40
# 'beta', 'candidate', or 'final'. The version_info value corresponding to the
41
# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a
42
# releaselevel of 'dev' for unreleased under-development code.
44
version_info = (0, 10, 0, 'dev', 0)
46
if version_info[3] == 'final':
47
version_string = '%d.%d.%d' % version_info[:3]
49
version_string = '%d.%d.%d%s%d' % version_info
50
__version__ = version_string
52
from bzrlib.symbol_versioning import (deprecated_function,
58
# Kept for compatibility with 0.8, it is considered deprecated to modify it
59
DEFAULT_IGNORE = deprecated_list(zero_nine, 'DEFAULT_IGNORE', [],
60
'Consider using bzrlib.ignores.add_unique_user_ignores'
61
' or bzrlib.ignores.add_runtime_ignores')
65
return tests.test_suite()
48
__copyright__ = "Copyright 2005 Canonical Development Ltd."
49
__author__ = "Martin Pool <mbp@canonical.com>"
50
__version__ = '0.0.5pre'
53
def get_bzr_revision():
54
"""If bzr is run from a branch, return (revno,revid) or None"""
55
from errors import BzrError
57
branch = Branch(__path__[0])
58
rh = branch.revision_history()
60
return len(rh), rh[-1]