~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 05:25:54 UTC
  • mfrom: (1185.1.42)
  • mto: (1092.2.18)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050928052554-beb985505f77ea6a
update symlink branch to 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
42
__author__ = "Martin Pool <mbp@canonical.com>"
41
 
__version__ = '0.1pre'
 
43
__version__ = '0.0.8'
42
44
 
43
45
 
44
46
def get_bzr_revision():
47
49
    from bzrlib.branch import Branch
48
50
    
49
51
    try:
50
 
        branch = Branch(__path__[0])
 
52
        branch = Branch.open(os.path.dirname(__path__[0]))
51
53
        rh = branch.revision_history()
52
54
        if rh:
53
55
            return len(rh), rh[-1]