# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/core.py
# VERSION = '0.0.5'
# def put(*args, **kwargs):
# def run(*args, **kwargs):
# def sudo(*args, **kwargs):


import os
from revolver import directory as dir
from revolver import core
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement




def repository_name():
    command = "grep 'url' .git/config | cut -d':' -f2"
    name = core.local(command, capture=True)

    # Get the basename (e.g. github/repo => repo)
    name = name.split("/")[-1]

    # Also strip the sometimes optional .git extension
    if name.endswith(".git"):
        name = name[:-4]

    return name


def create_archive(revision):

# Path: revolver/directory.py
# def temp_local():
# def temp(mode=None, owner=None, group=None):
# def remove(location, recursive=False, force=True):
# def create(path, recursive=False, mode=None, owner=None, group=None):
# 
# Path: revolver/core.py
# VERSION = '0.0.5'
# def put(*args, **kwargs):
# def run(*args, **kwargs):
# def sudo(*args, **kwargs):


# Path: revolver/git.py
import os
from revolver import directory as dir
from revolver import core

# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, with_statement




def repository_name():
    command = "grep 'url' .git/config | cut -d':' -f2"
    name = core.local(command, capture=True)

    # Get the basename (e.g. github/repo => repo)
    name = name.split("/")[-1]

    # Also strip the sometimes optional .git extension
    if name.endswith(".git"):
        name = name[:-4]

    return name


def create_archive(revision):

    tmp_folder = dir.temp_local()