hpi-swa / Squot

Squeak Object Tracker - Version control for arbitrary objects, currently with Git storage
Other
58 stars 29 forks source link

Adding a second package in a Tonel repository uses a wrong path #366

Closed j4yk closed 2 years ago

j4yk commented 2 years ago

When the working copy already contains a Tonel package, the new package is also added as a Tonel package since #278 was solved. However, the artifact gets added with a Cypress path with .package as a path suffix, which is not right for Tonel.

If new Tonel packages get added, their paths should adhere to the Tonel directory conventions.

Discovered by accident while trying to reproduce #365

j4yk commented 2 years ago

Analysis: in SquotWorkingCopy addPackageNamed:at:, the serializer of the new artifact gets set, but only after the artifact has been added to the working copy and store. Thus, when the path validation (and automatic appending of the package name to the path) happens, the code does not know that the Tonel serializer must be used to check the path. The package chooser tries to add packages with just the path of the parent directory, not with the full package path.