~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Martin Pool
  • Date: 2005-10-04 11:13:33 UTC
  • mto: (1185.13.3)
  • mto: This revision was merged to the branch mainline in revision 1403.
  • Revision ID: mbp@sourcefrog.net-20051004111332-f7b8a6bd41b9fe22
- tweak capture_tree formatting

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.10pre(newformat)'
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]