admin管理员组

文章数量:1388134

I am doing some experiments with P4Python API, and noticed this difference in CLI vs API.

If I try to re-create a stream that I had previously deleted using p4 stream -d, the CLI is fine with that:

p4 stream -t mainline //my_streams_depot/my_stream/main
... shows editor, i can update the spec and save the spec ...

But if I try to do the same with API, it dies with:

    [Error]: "Stream '//my_streams_depot/my_stream/main' was deleted in change 12345"

The way I am doing this with the API:

with p4.connect():
    stream_spec = p4.fetch_stream("-t", "mainline", "//my_streams_depot/my_stream/main")
    # ... make some changes to stream_spec here ...
    p4.save_stream(stream_spec)

If I create a brand new stream that did not exist before, API works fine too.

I am not able to find out from documentation, how to tell the API to behave like CLI in this case.

本文标签: perforceUnable to recreate a deleted stream spec using P4Python APIStack Overflow