I have change list. I am able to list out the files present in change list but I want to load the file present in change list with the changes. Is there any way using python perforce scripting?
Asked
Active
Viewed 1,033 times
0
-
Try starting here: https://www.perforce.com/perforce/r14.2/manuals/p4script/python.programming.html – Bryan Pendleton Oct 21 '19 at 15:41
-
I am listing files using `p4.run_describe("-s",changelist_no)`. i am trying to load the file using `p4.run_print(file@changelist)` to get the modified file contene. but its returning file content from depot file not the modified one. -@Bryan Pendleton – duddu venkatesh Oct 25 '19 at 12:00
-
Is the changelist already submitted? Or is it still pending? – Bryan Pendleton Oct 25 '19 at 13:45
-
still in pending. – duddu venkatesh Oct 29 '19 at 08:18
-
1The `-s` flag to describe is asking for "short" description, which includes only the file name, and no diffs. If you remove the `-s`, you will get the diffs. Or you could use the `diff` command. The `print` command never prints differences between local files and depot files, it only ever prints depot files, so that's not the command to run. – Bryan Pendleton Oct 30 '19 at 02:06
1 Answers
1
You don't say how you're currently listing out the files, but I assume it's some form of the p4 files
command, using either the CLI or the P4Python API? In either case, use p4 describe
(on the changelist) to see the diffs, or p4 print
(on the revisions returned by p4 files
) to get the content of an individual file.

Samwise
- 68,105
- 3
- 30
- 44
-
Using python p4v scripting api's i am listing files using `p4.run_describe("-s",changelist_no)`. i am trying to load the file using `p4.run_print(file@changelist)` to get the modified file contene. but its returning file content from depot file not the modified one. – duddu venkatesh Oct 25 '19 at 11:59