qri-io / qri

you're invited to a data party!
https://qri.io
GNU General Public License v3.0
1.11k stars 66 forks source link

qri remove has many fsi bugs #1000

Closed dustmop closed 5 years ago

dustmop commented 5 years ago

First off, running qri remove with no dataset deference (outside or inside of FSI) does nothing but also prints no output.

Running qri remove in FSI also ignores the dataset reference in .qri-ref. So even running qri remove --revisions=2 inside FSI will do nothing.

In FSI, running qri remove --revisions=2 me/test_ds will remove 2 versions from the repo, but won't update the working directory. So qri status will show dirty files and the user has to use qri restore to get to a clean directory.

However, run the previously mentioned command will remove the link from the repo's fbs file, but not modify the .qri-ref in the working directory. Running future commands will return the error "dataset is not linked to the filesystem". We should be treating the .qri-ref file as authoritative and fixing up the fbs instead.

In addition, .qri-ref should be updated so that it contains the dataset ref path after a remove command.

b5 commented 5 years ago

very fitting that issue #1000 is just like "hey, there's a bunch of bugs here".

dustmop commented 5 years ago

Fixed by https://github.com/qri-io/qri/pull/1012.