You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
When we use kart diff <commit_id> to see the diff for commits that contains changes of a dataset that has been deleted from the repo (using kart data rm <dataset>, it returns an error trace and is not handled gracefully.
Output
E:\self_study\GSoC22\KART\kart_tutorial\buildings-project>kart diff 8501064c8
Traceback (most recent call last):
File "C:\Users\ASUS\source\repos\kart\build\venv\Scripts\kart-script.py", line 33, in <module>
sys.exit(load_entry_point('kart', 'console_scripts', 'kart')())
File "c:\users\asus\source\repos\kart\kart\cli.py", line 352, in entrypoint
cli()
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\asus\source\repos\kart\kart\cli.py", line 160, in invoke
return super().invoke(ctx)
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "C:\Users\ASUS\source\repos\kart\build\venv\lib\site-packages\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\asus\source\repos\kart\kart\diff.py", line 175, in diff
diff_writer.write_diff()
File "c:\users\asus\source\repos\kart\kart\base_diff_writer.py", line 230, in write_diff
self.has_changes |= self.write_ds_diff_for_path(ds_path)
File "c:\users\asus\source\repos\kart\kart\base_diff_writer.py", line 235, in write_ds_diff_for_path
ds_diff = self.get_dataset_diff(ds_path)
File "c:\users\asus\source\repos\kart\kart\base_diff_writer.py", line 274, in get_dataset_diff
ds_filter=self.repo_key_filter[ds_path],
File "c:\users\asus\source\repos\kart\kart\diff_util.py", line 188, in get_dataset_diff
target_wc_diff = target_ds.diff_to_wc(wc_diff_context, ds_filter=ds_filter)
AttributeError: 'NoneType' object has no attribute 'diff_to_wc'
Diff output before deleting the dataset greenspace :
E:\self_study\GSoC22\KART\kart_tutorial\buildings-project>kart diff 8501064c8
--- greenspace:feature:18751
+++ greenspace:feature:18751
- distinctiveName1 = Keswick Golf Club
+ distinctiveName1 = Keswick Golf Club2
--- wellington_building_outlines:feature:4366
+++ wellington_building_outlines:feature:4366
- use = Unknown
+ use = Rowhouse1
--- wellington_building_outlines:feature:4367
+++ wellington_building_outlines:feature:4367
- use = Unknown
+ use = Rowhouse5
--- wellington_building_outlines:feature:56072
+++ wellington_building_outlines:feature:56072
- use = Unknown
+ use = South of lshaped tower
To Reproduce
Init a kart repo, with a dataset (say buildings-project.gpkg ) , make some changes, and commit it.
Import+rename another table ( say opgrsp_gb.gpkg:GreenspaceSite to greenspace ) into the existing repository.
E:\self_study\GSoC22\KART\kart_tutorial\buildings-project>kart data ls
greenspace
wellington_building_outlines
Make changes in the new dataset greenspace and commit them.
Commit log:
8844a1283 (HEAD -> master) Added row houses 1 and 5
1a894dfa7 Edited greenspace to club2 and building to south lshape tower
8501064c8 Added west of lshaped tower
331600729 Added lshaped tower
191fc8dc0 Added south and northewestern tower
3b5d6926d Import from opgrsp_gb.gpkg:GreenspaceSite to greenspace/
418c3d92e Added stadium, northern and western tower
af6f0cac7 Import from wellington-building-outlines.gpkg:wellington_building_outlines to wellington_building_outlines/
Delete the dataset greenspace using kart data rm greenspace command.
Now kart diff <commit_id> for any commit after dataset greenspace addition i.e. commit id 3b5d6926d (except for HEAD) returns the above error trace. [Commit id's mentioned in ** commit_id **]
Commit logs:
d9df5059e (HEAD -> master) Removing dataset greenspace
**8844a1283** Added row houses 1 and 5
**1a894dfa7** Edited greenspace to club2 and building to south lshape tower
**8501064c8** Added west of lshaped tower
**331600729** Added lshaped tower
**191fc8dc0** Added south and northewestern tower
**3b5d6926d** Import from opgrsp_gb.gpkg:GreenspaceSite to greenspace/
418c3d92e Added stadium, northern and western tower
af6f0cac7 Import from wellington-building-outlines.gpkg:wellington_building_outlines to wellington_building_outlines/
Expected behavior kart diff <commit_id> should return the diff of the rest of the changes (of dataset wellington-building-outlines ) and not show an error trace for not finding the dataset greenspace.
Describe the bug
A clear and concise description of what the bug is.
When we use
kart diff <commit_id>
to see the diff for commits that contains changes of a dataset that has been deleted from the repo (usingkart data rm <dataset>
, it returns an error trace and is not handled gracefully.Output
Diff output before deleting the dataset
greenspace
:To Reproduce
buildings-project.gpkg
) , make some changes, and commit it.opgrsp_gb.gpkg:GreenspaceSite to greenspace
) into the existing repository.greenspace
and commit them.Commit log:
greenspace
usingkart data rm greenspace
command.kart diff <commit_id>
for any commit after datasetgreenspace
addition i.e. commit id 3b5d6926d (except for HEAD) returns the above error trace. [Commit id's mentioned in ** commit_id **]Commit logs:
Expected behavior
kart diff <commit_id>
should return the diff of the rest of the changes (of datasetwellington-building-outlines
) and not show an error trace for not finding the datasetgreenspace
.Version Info
The text was updated successfully, but these errors were encountered: