Copy comman in p4python with Perforce

288 Views Asked by At

For branching I from a certain CL and have it as a changelist I realized that Perforce uses the copy keyword. I'm tryin to use the same keyword but getting an error saying that the options are invalid. Following is my code:

result = self.p4.run("copy","-c" + change_List,"-F", Path_1+"/...@"+ CL, Path_2+"/...")

am I doing something wrong? Can anyone explain to me what the wrong part of my code is?

1

There are 1 best solutions below

2
Samwise On

See the usage info for p4 copy:

C:\Perforce\test>p4 help copy

    copy -- Copy one set of files to another

    p4 copy [options] fromFile[rev] toFile
    p4 copy [options] -b branch [-r] [toFile[rev] ...]
    p4 copy [options] -b branch -s fromFile[rev] [toFile ...]
    p4 copy [options] -S stream [-P parent] [-F] [-r] [toFile[rev] ...]

        options: -c changelist# -f -n -v -m max -q

There is no form of the command that takes multiple file arguments and a -F flag. The -F flag is only applicable if you're using streams, since its purpose is to allow you to override the defined "flow" of the two streams.