perforce / p4transfer

[Community Supported] Utility for transferring a subset of files (with complete history of all changelists) from one Helix Core repository to another, only requiring read access to the source repository.
BSD 2-Clause "Simplified" License
43 stars 19 forks source link

Assert when Edit + Move #12

Open swc-jesse opened 3 years ago

swc-jesse commented 3 years ago

We have hit cases where files were moved within the current stream but also edited (seemingly to avoid compilation errors since the files are now in a new location). The steps to replicate this behavior seem to be:

  1. Open original file for Edit
  2. Move (Mark original file for delete)
  3. Make changes to the file (which is now Add / Edit)
  4. Submit

In replicating this change, p4transfer asserts:

2021-11-05 08:39:34,908:P4Transfer:ERROR:
Traceback (most recent call last):
  File "P4Transfer.py", line 2168, in replicate
    num_changes = self.replicate_changes()
  File "P4Transfer.py", line 1985, in replicate_changes
    targetChange = self.target.replicateChange(fileRevs, srcFileLogs, change, self.source.p4.port)
  File "P4Transfer.py", line 1234, in replicateChange
    self.processChangeRevs(fileRevs, srcFileLogs)
  File "P4Transfer.py", line 1189, in processChangeRevs
    self.replicateIntegration(f)
  File "P4Transfer.py", line 1636, in replicateIntegration
    assert(afterAdd)
AssertionError