Files
UnrealEngine/Engine/Source/ThirdParty/CEF3/fix_drop.py
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

20 lines
652 B
Python

#
# Helper script to reopen any files added in exclusive mode as normal files instead (we don't want locking)
#
import os, io
import subprocess
print("Checking for files opened in exclusive mode...")
result = subprocess.Popen(['p4', 'opened', '...'], stdout=subprocess.PIPE)
for line in io.TextIOWrapper(result.stdout, encoding="utf-8"):
if "*exclusive*" in line:
exlFile = line.split("#")[0]
print(exlFile)
fileType = "binary"
if "resource..h" in exlFile:
fileType = "text"
subprocess.run(['p4', 'revert', exlFile])
subprocess.run(['p4', 'add', '-t', fileType, exlFile])
print("Done")