try: # Catch exceptions with try/except
p4.connect() # Connect to the Perforce Server
p4.run_login()
client = p4.fetch_client()
client['View'] = ['//TestPublic/Extern/firanl/... //mitica/TestPublic/Extern/firanl/...'] # workspace mapping
p4.save_client(client)
# p4.run_sync() # this command stops the execution of other commands after this
result = p4.run("fstat", perforce_path)[0]
file1 = result['clientFile']
change = p4.fetch_change()
change._files = [file1] #associate file to changelist
change._description = 'aaaaaa'
p4.run_submit(change)
p4.disconnect() # Disconnect from the Server
except P4Exception:
for e in p4.errors: # Display errors
print e
#
を与えるP4パイソンを使用して作業中チェンジするためにチェックアウトファイルと関連付けることはできません:。 「エラーを変更仕様で は、ファイル(複数可)を含めることはできませんではありません p4 add、p4 editなどで新しいファイルを開く "は、私は、コードを実行すると、私は、このエラーを
p4.run( "edit"、file1)でファイルを開こうとしましたが、プログラムは何もせず、この後に次のコマンドを実行しません。 ファイルを開くにはどうしたらいいですか、p4 addとp4 editのためのpython作業コマンドは何ですか?
"p4 edit"を実行するのが適切です。デバッグ時間:1) "file1"の値を印刷して、妥当なものであることを確認します。 2)コマンドラインから "p4 edit(file1)"を実行してみてください。 –