Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Guard against gitmanager clashes with a lock dir" #1207

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions gitmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
from datetime import datetime
from threading import Lock
from os import mkdir, rmdir

import regex
import requests
Expand Down Expand Up @@ -35,12 +34,6 @@ def add_to_blacklist(cls, **kwargs):
chat_profile_link = kwargs.get("chat_profile_link", "http://chat.stackexchange.com/users")
code_permissions = kwargs.get("code_permissions", False)

# Block if git lock directory exists
try:
mkdir('gitmanager.lock')
except FileExistsError:
return (False, "Previous operation in progress; `!!/pull` to force")

# Make sure git credentials are set up
if git.config("--get", "user.name", _ok_code=[0, 1]) == "":
return (False, "Tell someone to run `git config user.name \"SmokeDetector\"`")
Expand Down Expand Up @@ -235,8 +228,4 @@ def get_remote_diff():

@staticmethod
def pull_remote():
try:
rmdir('gitmanager.lock')
except FileNotFoundError:
pass
git.pull()