~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Martin Pool
  • Date: 2005-09-22 13:32:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050922133202-347cfd35d2941dd5
- simple weave-based annotate code (not complete)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
                  'BitKeeper',
29
29
                  '.git',
30
30
                  'TAGS', '.make.state', '.sconsign', '.tmp*',
31
 
                  '.del-*',
32
 
                  '.DS_Store',]
 
31
                  '.del-*']
33
32
 
34
33
IGNORE_FILENAME = ".bzrignore"
35
34
 
36
 
import os
37
35
import locale
38
36
user_encoding = locale.getpreferredencoding() or 'ascii'
39
37
del locale
40
38
 
41
39
__copyright__ = "Copyright 2005 Canonical Development Ltd."
42
 
__version__ = '0.0.9'
 
40
__author__ = "Martin Pool <mbp@canonical.com>"
 
41
__version__ = '0.1pre'
43
42
 
44
43
 
45
44
def get_bzr_revision():
48
47
    from bzrlib.branch import Branch
49
48
    
50
49
    try:
51
 
        branch = Branch.open(os.path.dirname(__path__[0]))
 
50
        branch = Branch(__path__[0])
52
51
        rh = branch.revision_history()
53
52
        if rh:
54
53
            return len(rh), rh[-1]