Jump to content


P4 python filelog returns different history for different user accounts

p4python filelog python

  • Please log in to reply
4 replies to this topic

#1 ziddarth

ziddarth

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 18 August 2015 - 07:31 PM

Why would p4 python return different outputs for different user accounts but for the same input file revision? Both user accounts have the same permissions on the relevant perforce repo.

p4 = P4() # Create the P4 instance
p4.port = p4_server_port
p4.user = 'username' # output changes when user is changed
p4.ticket_file = 'ticket.txt'
p4.connect() # Connect to the Perforce Server
file_log_output = p4.run_filelog('-h', '-s', p4_file_node)

Thanks for your help.

#2 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 19 August 2015 - 06:35 AM

I can't think of any reason it would be different given those premises, which makes me suspect that one of the premises is incorrect -- the permissions are different, the file is different (if you're using local/relative paths then they might resolve to different depot files depending on the client view being used), or the repo is different.  Seeing the actual output (i.e. what the specific differences are) might help narrow it down.

#3 ziddarth

ziddarth

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 19 August 2015 - 06:53 AM

I set
 p4.client
to the same value for both users to make sure nothing is different between the two cases. The output appears to be the same until the first copy or branch operation in filelog history. Still have to verify that setting p4.client is sufficient to set the client workspace in p4 python.

Thanks.

#4 ziddarth

ziddarth

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 19 August 2015 - 08:03 PM

So I noticed that p4.run_filelog('-i', p4_file) gives the same output for both user accounts but p4.run_filelog('-h', '-s', p4_file) gives different output in that one of the accounts follows the content to a sandbox path while the other user account appears to be unaware of the sandbox path.

#5 ziddarth

ziddarth

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 19 August 2015 - 09:05 PM

This was a permission issue. One of the accounts did not have access to a particular depot so filelog skipped files(winthout any warning(s)) that the account was not permitted to see.

Thanks





Also tagged with one or more of these keywords: p4python, filelog, python

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users