sync.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:django-powerpages 作者: Open-E-WEB 项目源码 文件源码
def add_to_vcs(self, summary):
        if (
            self.git_add and
            (SyncStatus.DELETED in summary or SyncStatus.ADDED in summary) and
            not self.dry_run and
            self.confirm(
                question=(
                    'Do you want to add created and removed files to GIT?'
                )
            )
        ):
            output, errors = subprocess.Popen(
                ['git', '-C', app_settings.SYNC_DIRECTORY,
                 'add', '-A', app_settings.SYNC_DIRECTORY],
                stdout=subprocess.PIPE, stderr=subprocess.PIPE
            ).communicate()
            if errors:
                raise self.error('Adding file changes to GIT failed!')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号