Closed jku closed 1 year ago
The obvious review comment here is that add-target
and remove-target
now look different... I have a commit for the latter as well, but would rather put that in another PR (it's not completely trivial as it makes sense to add a delegation search there as well).
@MVrachev care to take a look at this one?
Yes, I will. I will try to find time these days.
@jku, VMware has approved your signed contributor license agreement.
Fixes #32
Adding a target only modifies a single metadata so making it a "edit" sub command made sense... However, often user does not know which metadata should be modified: this is especially the case with succinct delegations.
Make add-target a top level action instead of a edit subaction:
This means add-target is now a simple repository wide command which seems quite logical: user does not need to know the details, they just want to add a target file to the repository.
There is a edit()-refactor here that makes the edit-contextmanager handle
AbortEdit
silently: the users of edit() can raiseAbortEdit
to signal they want to exit the contextmanager without saving the edited metadata. This is a bit undiscoverable and not immediately obvious but works quite nicely in bothsnapshot
andadd-target
in my opinion.