~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Robert Collins
  • Date: 2005-09-28 09:35:50 UTC
  • mfrom: (1185.1.47)
  • Revision ID: robertc@robertcollins.net-20050928093550-3ca194dfaffc79f1
merge from integration

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