[08/13] git-p4: use marshal format version 2 when sending to p4
diff mbox series

Message ID 20191207003333.3228-11-yang.zhao@skyboxlabs.com
State New
Headers show
Series
  • git-p4: python3 compatibility
Related show

Commit Message

Yang Zhao Dec. 7, 2019, 12:33 a.m. UTC
p4 does not appear to understand marshal format version 3 and above.
Version 2 was the latest supported by python-2.7.

Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com>
---
 git-p4.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/git-p4.py b/git-p4.py
index af563cf23d..c2a3de59e7 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1697,7 +1697,8 @@  def modifyChangelistUser(self, changelist, newUser):
         c = changes[0]
         if c['User'] == newUser: return   # nothing to do
         c['User'] = newUser
-        input = marshal.dumps(c)
+        # p4 does not understand format version 3 and above
+        input = marshal.dumps(c, 2)
 
         result = p4CmdList("change -f -i", stdin=input)
         for r in result: