-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Discard changes" in "Save before closing" should delete "newer" backups #9361
Comments
Hi Koppor, |
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
@mmohanb1 This issue is on our track for the upcoming release. Do you have a rough schedule when you will come up with a first proposal? |
Hi Oliver,
What is the next release date? I should be able to come up with a proposal
by today or Tuesday at the latest.
Thank you.
…On Sun, Nov 20, 2022 at 9:39 AM Oliver Kopp ***@***.***> wrote:
@mmohanb1 <https://github.com/mmohanb1> This issue is on our track for
the upcoming release. Do you have a rough schedule when you will come up
with a first proposal?
—
Reply to this email directly, view it on GitHub
<#9361 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AVTCRF7A5LU4DPJGQRFHOQTWJIZ35ANCNFSM6AAAAAARZTM7SU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Edited below, Hello, |
I was able to work on this issue and functionality seems to be working fine as expected but I need to test more using the testing documentation on jabref. |
Initially we would have wanted to have a release in November, but a few things have come up and now it has been a little postponed. The new date might roughly be the ~ 19th of december, but don't take it as face value. JabRef's releases are never permanently fixed to a date, as sometimes regressions show up and maintainers have personal lives too. Ideally, it would be nice to have a fix for this issue until ~ 9th or so, so that there is still time to have it lingering within the main branch for a week or two before the 5.8 release. That would allow us to catch potential regressions. I really would like to avoid having this merged a day before the release. |
Maybe, the BackupManager should be notified that the last changes were discarded. Then, the BackupManager can stop working. It will be shut down directly afterwards (or even by the "Discard" button)
Not necessary - see above. -- Checking for files during backup is time consuming.
The check should be done by the BackupManager - at I think, the return for that should be set at Then, the dialog does not need to be modified - all the code happens inside the BackupManager. #seperationOfConcerns. |
Hi Oliver, |
@mmohanb1 Thank you for the update! Please submit a pull request early - we also need time to test, since this is a feature seen by many users. |
Hi @koppor , |
Yes! - Maybe even the creation of the discarded file can be done in the Backup-Manager? Maybe in the shutdown method? I don't know exactly the flow of that dialog. |
Hi @koppor
Having said that, I am still trying to figure a way of doing it with suggested approach. |
Hi. The second issue still remains. Is there any database table where I can save the value of discardedFileExists after changes are discarded. Would need some help on these things. |
Yes, it is. Then, IMHO something is wrong in the implementation.
The idea of the existence of "discarded" file (which is a Boolean flag) was to be a kind of database store. We are currently discussing symptoms only. For a real software-engineered project, there would have been UML diagrams made. Maybe a UML sequence diagram or a UML state diagram. The second approach is to follow the idea of test-driven development and craft test cases. The third approach is to do code and fix on the code. This is also OK, but I (and maybe other developers) should see the code. Can you open a pull request? |
Could we instead of deleting the discarded file in fillQueue, delete it in backUpFileDiffers method and return false there.? |
Thoughts:
Idea: Can the algorithm be changed to check whether the discarded file is the last one? If it is not the last one, it can be deleted? If it is the last one, return false at |
I have problem figuring out in which part of backUpManager should we create the "--discarded.bak" file, if not in GUI(jabRefFrame.java). When the user chooses to close jabRef and discards changes, shutdown method is called from where performBackUp is called, which picks up the backup file path and saves it. I think the discarded file should be already created at this point, so performBackUp method can save it. So it has to be before performBackUp call. |
Added code to set discardedFlagExists of backupManager to true, when user discards changes before shutting down jabRef(Issue JabRef#9361).
As user, I work on JabRef. Then, I add some things. I maybe want to cancel my changes. Example:
Then, at the start of JabRef, JabRef should NOT prompt me to restore these changes.
Four options:
discarded
file to mark that the user discarded changes. On start of JabRef, JabRef removes that file and backup takes normally place. Example filename:269b5589--test.bib--discarded.bak
. When JabRef starts freshly, it creates new backups in the backup manner. After a normal save and an additional restart, JabRef MUST NOT assume that the last quit was a discard.We opt for Option 4.
The text was updated successfully, but these errors were encountered: