# Path: fabdeploy/utils.py
# def home_path(user):
#     if user == 'root':
#         return '/root'
#     else:
#         return posixpath.join('/home', user)


import os
import sys
import datetime
import posixpath
import logging
from collections import MutableMapping
from fabric import network
from fabric.api import prompt
from .utils import home_path
        from fabdeploy import system
        from fabdeploy import system
    def _copy_conf(self, source):
        for k in source._conf_keys():
            try:
                self.set_conf_value(k, source._conf_raw_value(k))
            except MissingVarException:
                logger.debug('_copy_conf: can not copy name=%s' % k)

    def copy(self):
        d = self.__class__(
            global_conf=self._global_conf,
            tasks=self._tasks,
            name=self._name)
        d._copy_conf(self)
        return d

    def __repr__(self):
        return '%s<name=%s>' % (self.__class__.__name__, self._name)


class DefaultConf(BaseConf):
    address = '%s@localhost' % os.environ['USER']
    instance_name = '%(user)s'

    time_format = '%Y.%m.%d-%H.%M.%S'

    # directory name that contains project
    # this is useful if your project is not in git/hg repo root dir
    project_dir = ''
    # directory name that contains manage.py file (django project root)
    django_dir = ''

# Path: fabdeploy/utils.py
# def home_path(user):
#     if user == 'root':
#         return '/root'
#     else:
#         return posixpath.join('/home', user)


# Path: fabdeploy/containers.py
import os
import sys
import datetime
import posixpath
import logging
from collections import MutableMapping
from fabric import network
from fabric.api import prompt
from .utils import home_path
        from fabdeploy import system
        from fabdeploy import system

    def _copy_conf(self, source):
        for k in source._conf_keys():
            try:
                self.set_conf_value(k, source._conf_raw_value(k))
            except MissingVarException:
                logger.debug('_copy_conf: can not copy name=%s' % k)

    def copy(self):
        d = self.__class__(
            global_conf=self._global_conf,
            tasks=self._tasks,
            name=self._name)
        d._copy_conf(self)
        return d

    def __repr__(self):
        return '%s<name=%s>' % (self.__class__.__name__, self._name)


class DefaultConf(BaseConf):
    address = '%s@localhost' % os.environ['USER']
    instance_name = '%(user)s'

    time_format = '%Y.%m.%d-%H.%M.%S'

    # directory name that contains project
    # this is useful if your project is not in git/hg repo root dir
    project_dir = ''
    # directory name that contains manage.py file (django project root)
    django_dir = ''

    home_path = conf(lambda self: home_path(self.user))