Skip to content

Exception in git-p4s.py sync #1

@jthomaskerr

Description

@jthomaskerr

Hi,

I am trying to initialise a repo with a number of streams from our p4 depot.

git-p4s.py sync //spfw/Main //spfw/sp16 //spfw/sp16_rtos //spfw/ppth //spfw/sp17 //spfw/neos_test //spfw/logos-test //spfw/ATBaha

The process gets to about 20% and then it dies with the following error:

  Traceback (most recent call last):
     File "/Users/joseph/etc/bin/git-p4s.py", line 1459, in <module>
        main()
     File "/Users/joseph/etc/bin/git-p4s.py", line 1455, in main
        if not cmd.run():
     File "/Users/joseph/etc/bin/git-p4s.py", line 1414, in run
      self.importChanges(allChanges)
    File "/Users/joseph/etc/bin/git-p4s.py", line 1299, in importChanges
      self.importChange(stream, details)
    File "/Users/joseph/etc/bin/git-p4s.py", line 1274, in importChange
      merges = self.detectMerges(depotpath, change, files, integrates)
    File "/Users/joseph/etc/bin/git-p4s.py", line 1229, in detectMerges
      if self.isMergeFrom(stream, change, srcStream, srcChange):
    File "/Users/joseph/etc/bin/git-p4s.py", line 1194, in isMergeFrom
      if diff[0]["code"] == "error":
  IndexError: list index out of range

In debugging I find that the p4 command raises an EOFError without adding any results (not surprising given the -q flag). When running the p4 command manually I see that every result entry gives "identical".

Consequently, I have worked around the issue (I hope) by adding a condition that returns true if diff is empty:

        if not diff:
            return True

Is this correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions