~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-08-27 04:42:41 UTC
  • mfrom: (1092.1.43)
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: aaron.bentley@utoronto.ca-20050827044241-23d676133b9fc981
Merge of robertc@robertcollins.net-20050826013321-52eee1f1da679ee9

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
40
__author__ = "Martin Pool <mbp@canonical.com>"
43
 
__version__ = '0.0.8'
 
41
__version__ = '0.0.7pre'
44
42
 
45
43
 
46
44
def get_bzr_revision():
49
47
    from bzrlib.branch import Branch
50
48
    
51
49
    try:
52
 
        branch = Branch.open(os.path.dirname(__path__[0]))
 
50
        branch = Branch(__path__[0])
53
51
        rh = branch.revision_history()
54
52
        if rh:
55
53
            return len(rh), rh[-1]