32
# repo name, set by late_init() to an instance of Repo
41
expanded_dir = os.path.expanduser( dir )
46
# expanded filesystem dir
47
expanded_fsdir = os.path.expanduser( fsdir )
50
def set_repo( repo_name ):
41
# fully qualified data dir
42
full_dir = util.canonicalise_path( dir )
45
mddir = os.path.join( dir, '.metadata' )
47
# fully qualified metadata directory
48
full_mddir = util.canonicalise_path( mddir )
53
# fully qualified home directory, set by late_init()
57
config_file = os.path.expanduser( '~/.stdhomerc' )
62
global home_dir, full_home_dir
63
full_home_dir = util.canonicalise_path( home_dir )
52
66
from repo import Repo
53
repo = Repo( repo_name if repo_name else 'home' )
67
if isinstance( repo, Repo ):
68
raise RuntimeError( 'logic error: the.repo is already set' )