19
from branch import Branch, ScratchBranch, find_branch
20
from errors import BzrError
21
# please keep these sorted (in C locale order) to aid merging
24
DEFAULT_IGNORE = ['.bzr.log',
25
'*~', '#*#', '*$', '.#*',
26
'.*.sw[nop]', '.*.tmp',
27
'*.tmp', '*.bak', '*.BAK', '*.orig',
28
'*.o', '*.obj', '*.a', '*.py[oc]', '*.so', '*.exe', '*.elc',
29
'{arch}', 'CVS', 'CVS.adm', '.svn', '_darcs', 'SCCS', 'RCS',
33
'TAGS', '.make.state', '.sconsign', '.tmp*',
79
36
IGNORE_FILENAME = ".bzrignore"
83
39
user_encoding = locale.getpreferredencoding() or 'ascii'
86
42
__copyright__ = "Copyright 2005 Canonical Development Ltd."
87
__version__ = version_string = '0.6rc1'
88
# same format as sys.version_info
89
version_info = (0, 6, 0, 'rc', 1)
43
__author__ = "Martin Pool <mbp@canonical.com>"
92
47
def get_bzr_revision():
93
48
"""If bzr is run from a branch, return (revno,revid) or None"""
95
from bzrlib.branch import Branch
98
branch = Branch.open(os.path.dirname(__path__[0]))
50
branch = Branch(__path__[0])
99
51
rh = branch.revision_history()
101
53
return len(rh), rh[-1]
104
except bzrlib.errors.BzrError:
109
return selftest.test_suite()