-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore using -ztag for output processing #1
Comments
@HakShak Hi. I remember you suggested ztags a long time ago while I was writing this library. I decided against it since ztags are grammatically ambiguous in p4 while at the same time the ordinary standard output is not, ironically. In particular, changelist descriptions that contain lines beginning with |
Mobile at the moment, but descriptions doesn't seem to be a good enough reason. Was there anything else to throw away a major global option of the entire ecosystem in favor of output that has no purpose to maintain comparability? |
No, descriptions are the only known problem. Keep in mind that there are already existing changelists in CCP's Perforce that contain lines beginning with three dots -- the parser I referenced above will either not accept those or parse the changelist incorrectly (depending on what is on the line after the dots) and it was causing issues. I was not able to devise a parser that could deal with those existing changelists in a manner less cumbersome than the regular expressions that we have now. If the only issue were that we wouldn't get the description out correctly, it might be tolerable. However, the p4 command we run will spew out multiple changelists to standard output. The three dots in changelist descriptions make it difficult do delimit when one changelist ends and the next starts. |
Wouldn't |
Well, no, not if a changelist's description contains a line of the form Supposedly, some heuristics could be applied to disambiguate many cases but it cannot be foolproof. It is quite trivial to maliciously craft a single changelist that will be printed by p4, with ztag, byte-for-byte identically to what could've been two ordinary changelists. |
https://www.perforce.com/manuals/v18.1/cmdref/Content/CmdRef/global.options.html under "-z tag"
The text was updated successfully, but these errors were encountered: