/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/version.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-20 14:51:03 UTC
  • mfrom: (0.8.23 version_info)
  • mto: This revision was merged to the branch mainline in revision 2028.
  • Revision ID: john@arbash-meinel.com-20060920145103-02725c6d6c886040
[merge] version-info plugin, and cleanup for layout in bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006 by Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
20
20
import sys
21
21
 
22
22
import bzrlib
23
 
from bzrlib import (
24
 
    bzrdir,
25
 
    config,
26
 
    errors,
27
 
    osutils,
28
 
    )
 
23
from bzrlib import errors, osutils
29
24
from bzrlib.branch import Branch
30
25
 
31
26
 
50
45
        print repr(bzrlib.__path__)
51
46
    else:
52
47
        print bzrlib.__path__[0]
53
 
    print "Using bazaar configuration:", config.config_dir()
 
48
 
54
49
    print
55
50
    print bzrlib.__copyright__
56
51
    print "http://bazaar-vcs.org/"
66
61
    If bzr is not being run from its working tree, returns None.
67
62
    """
68
63
    try:
69
 
        control = bzrdir.BzrDir.open_containing(__file__)[0]
70
 
        return control.open_workingtree(recommend_upgrade=False)
71
 
    except (errors.NotBranchError, errors.UnknownFormatError,
72
 
            errors.NoWorkingTree):
 
64
        from bzrlib.workingtree import WorkingTree
 
65
        return WorkingTree.open_containing(__file__)[0]
 
66
    except (errors.NotBranchError, errors.UnknownFormatError):
73
67
        return None