1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] How to check if file is added or in edit mode/checked out?

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    I'm looking for the commands for these things:

    Does file exist in depo? And if so is it checked out?

    Is local file added?

    Thanks!

    (extra info)

    I've figured out the commands for add and edit, but I want to check the state first before i run these:

    p4.run_add("C:\myfile.txt")
    p4.run("edit", "//depot/myfile.txt")


    the logic would be:

    if file exists in depo and is not checked out:
    check out file
    else:
    if file is not added:
    add file

    Continue reading...

Compartilhe esta Página