# Path: g_sorcery/compatibility.py
# class TemporaryDirectory(object):
#     def __init__(self):
#         self.name = mkdtemp()
# 
#     def __del__(self):
#         shutil.rmtree(self.name)
# 
# Path: g_sorcery/exceptions.py
# class SyncError(DBError):
#     pass
# 
# Path: g_sorcery/syncer.py
# class Syncer(object):
#     """
#     Class used to sync data with remote source.
#     """
# 
#     def __init__(self, persistent_datadir):
#         self.persistent_datadir = persistent_datadir
# 
#     def sync(self, db_uri, repository_config):
#         """
#         Synchronize local directory with remote source.
# 
#         Args:
#             db_uri: URI for synchronization with remote source.
#             repository_config: repository config.
# 
#         Returns:
#             SyncedData object that gives access to the directory with data.
#         """
#         raise NotImplementedError
# 
# class SyncedData(object):
#     """
#     Synced data.
# 
#     Directory with sync data is guaranted to exist only as long as this
#     object does.
#     """
#     def __init__(self, directory):
#         self.directory = os.path.abspath(directory)
# 
#     def get_path(self):
#         return self.directory
# 
# class TmpSyncedData(SyncedData):
#     """
#     Synced data that lives in a temporary directory.
#     """
# 
#     def __init__(self, directory, tmpdirobj):
#         super(TmpSyncedData, self).__init__(directory)
#         self.tmpdirobj = tmpdirobj


import os
import shutil
import subprocess
from g_sorcery.compatibility import TemporaryDirectory
from g_sorcery.exceptions import SyncError
from g_sorcery.syncer import Syncer, SyncedData, TmpSyncedData
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
    git_syncer.py
    ~~~~~~~~~~~~~

    git sync helper

    :copyright: (c) 2015 by Jauhien Piatlicki
    :license: GPL-2, see LICENSE for more details.
"""






# Path: g_sorcery/compatibility.py
# class TemporaryDirectory(object):
#     def __init__(self):
#         self.name = mkdtemp()
# 
#     def __del__(self):
#         shutil.rmtree(self.name)
# 
# Path: g_sorcery/exceptions.py
# class SyncError(DBError):
#     pass
# 
# Path: g_sorcery/syncer.py
# class Syncer(object):
#     """
#     Class used to sync data with remote source.
#     """
# 
#     def __init__(self, persistent_datadir):
#         self.persistent_datadir = persistent_datadir
# 
#     def sync(self, db_uri, repository_config):
#         """
#         Synchronize local directory with remote source.
# 
#         Args:
#             db_uri: URI for synchronization with remote source.
#             repository_config: repository config.
# 
#         Returns:
#             SyncedData object that gives access to the directory with data.
#         """
#         raise NotImplementedError
# 
# class SyncedData(object):
#     """
#     Synced data.
# 
#     Directory with sync data is guaranted to exist only as long as this
#     object does.
#     """
#     def __init__(self, directory):
#         self.directory = os.path.abspath(directory)
# 
#     def get_path(self):
#         return self.directory
# 
# class TmpSyncedData(SyncedData):
#     """
#     Synced data that lives in a temporary directory.
#     """
# 
#     def __init__(self, directory, tmpdirobj):
#         super(TmpSyncedData, self).__init__(directory)
#         self.tmpdirobj = tmpdirobj


# Path: g_sorcery/git_syncer/git_syncer.py
import os
import shutil
import subprocess
from g_sorcery.compatibility import TemporaryDirectory
from g_sorcery.exceptions import SyncError
from g_sorcery.syncer import Syncer, SyncedData, TmpSyncedData

#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
    git_syncer.py
    ~~~~~~~~~~~~~

    git sync helper

    :copyright: (c) 2015 by Jauhien Piatlicki
    :license: GPL-2, see LICENSE for more details.
"""






class GITSyncer(Syncer):