From c1739a3dba5d0bc1ba1938d66e2e8930d0992115 Mon Sep 17 00:00:00 2001 From: ngfchl Date: Sat, 15 Oct 2022 21:56:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9B=B4=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auto_pt/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_pt/views.py b/auto_pt/views.py index 587d26e..3e8a0e2 100644 --- a/auto_pt/views.py +++ b/auto_pt/views.py @@ -300,7 +300,7 @@ def import_from_ptpp(request): def get_git_log(branch, n=20): repo = git.Repo(path='.') # 拉取仓库更新记录元数据 - repo.remote().update() + repo.remote().fetch() # commits更新记录 logger.info('当前分支{}'.format(branch)) return [{ @@ -375,7 +375,7 @@ def do_update(request): # 'cp db/db.sqlite3 db/db.sqlite3-$(date "+%Y%m%d%H%M%S")', '强制覆盖本地': 'git reset --hard', '获取更新信息': 'git fetch', - '拉取代码更新': 'git pull', + '拉取代码更新': 'git pull origin {}'.format(os.getenv('DEV')), } requirements_commands = { '安装依赖': 'pip install -r requirements.txt',