jabref
jabref copied to clipboard
Add git support
Fixes https://github.com/koppor/jabref/issues/578
- SSH auth method
- Username/password dialog box auth method
- Username/password env variables auth method
- Store username/password in JabRef preferences
- Fail silently
- Support for local and remote git repositories
Mandatory checks
- [x] Change in
CHANGELOG.md
described in a way that is understandable for the average user (if applicable) - [x] Tests created for changes (if applicable)
- [x] Manually tested changed features in running JabRef (always required)
- [x] Screenshots added in PR description (for UI changes)
- [x] Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
- [x] Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.
* Store username/password in JabRef preferences
Do you use our new way to store passwords? Using https://github.com/javakeyring/java-keyring?
Did you try the integration with Git Credential Manager?
Please fix compile errors
home/runner/work/jabref/jabref/src/main/java/org/jabref/gui/collab/ExternalChangesResolverViewModel.java:57: error: name clash: ExternalChangesResolverViewModel(List<GitChange>,UndoManager) and ExternalChangesResolverViewModel(List<DatabaseChange>,UndoManager) have the same erasure
public ExternalChangesResolverViewModel(List<GitChange> changes2, UndoManager undoManager2) {
^
sorry about the compile errors, it was a WIP of the git merge conflicts resolver we were trying to implement.
Please fix compile errors
home/runner/work/jabref/jabref/src/main/java/org/jabref/gui/collab/ExternalChangesResolverViewModel.java:57: error: name clash: ExternalChangesResolverViewModel(List<GitChange>,UndoManager) and ExternalChangesResolverViewModel(List<DatabaseChange>,UndoManager) have the same erasure public ExternalChangesResolverViewModel(List<GitChange> changes2, UndoManager undoManager2) { ^
i believe we will need to update it
@koppor currently we are developing the rebase conflicts resolver view, and we should be good to go for another, and hopefully last, PR
@koppor currently we are developing the rebase conflicts resolver view, and we should be good to go for another, and hopefully last, PR
Please do not do another pull request, please just push commits (as you did)
Maybe @lbenicio you overlooked my comments
https://github.com/JabRef/jabref/pull/10586#pullrequestreview-1740637199
for a deeper (and soon) feedback, I would need screenshot of the git diff dialogs.
This means: Please do attach a screenshot of the git diff dialog WITH DATA which you implemented
https://github.com/JabRef/jabref/pull/10586#issuecomment-1820582681
* Store username/password in JabRef preferences
Do you use our new way to store passwords? Using https://github.com/javakeyring/java-keyring? - Reformulated: Can you tell us how you store passwords in the preferences? (you can also share a link to the precise location in the code)
Did you try the integration with Git Credential Manager?
We are migrating our implementation to use java key ring, we were not using it. Now we see the problem. The diff dialog is still under heavy issues (I added the files from the database diff but still difficulty to navigate how to change it to git diffs). It seems more challenging them what we have thought.
@lbenicio you can replace the whole diff dialog by using JabRefs own feature to compare two libraries (bib files). Remember, the is the "file changed on disk" feature of JabRef. Maybe, you simply write out the file of the remote to the disk and then let JabRef do it's magic. The magic includes a) displaying all diffs and b) guiding the user through accepting, rejecting, and merging changes.
@koppor We thought, as a v1, we could just create a text dialog with the diff output from the user and let the user decide
@lbenicio As I understand you, the dialog does not work. What I say: Remove that code, add approx. three lines of code and let JabRef do its magic. For sure, you can train your JavaFX skills with your dialog. Then please add screenshots!
I don't quite understand how that will work as the class uses bib files, but i will try.
@lbenicio you can replace the whole diff dialog by using JabRefs own feature to compare two libraries (bib files). Remember, the is the "file changed on disk" feature of JabRef. Maybe, you simply write out the file of the remote to the disk and then let JabRef do it's magic. The magic includes a) displaying all diffs and b) guiding the user through accepting, rejecting, and merging changes.
I tried to pull before save the bib file, but i think file monitor is more slow than save action. Is it possible to check in file monitor if a conflict happened and if user resolved it ?
I tried to pull before save the bib file, but i think file monitor is more slow than save action.
The file monitor monitors the file on the disk. Thus, it cannot be slower than the save action.
Is it possible to check in file monitor if a conflict happened and if user resolved it ?
No. There are other listeners taking care of the work. For the first "MVP", it is enough to save the pulled file and let the user to the work - without going back the path of the save call. The handling of conflicts will be done in another independent thread then.
Happy new year! 🎉
This PR could take longer to be finished. Do you still have some time?
If yes, I would ask you to check the CI output: Checkstyle complains and some other checkers, too. Please check their output. Especially reconfigure IntelliJ to follow JabRef's code style. See https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/intellij-13-code-style.html for details. You can then use Ctrl+Alt+L to reformat your classes.
I make the changes, but I don't understand this changelog.md error.
I make the changes, but I don't understand this changelog.md error.
Not sure, how I should explain.
You know software releases? You know that for each version, there is a section in CHANGELOG.md. Thus, for each released version, there is a section.
What if updates to the software come? Are older releases changed? No, new releases are made! - What about the CHANGELOG.md sections of older releases? Do new features go into these sections? No, a new section unreleased
is used.
Now, let's check your patch:
The patch is in section of version 5.11 of JabRef. It adds a new feature to 5.11. BUT - hey, JabRef 5.11 is already released. See the release date in the heading and the releases at https://github.com/JabRef/jabref/releases.
Thus, this patch should NOT go into 5.11, but into the unreleased
section of CHANGELOG.md
All right, and this last one, is it related to what we did?
All right, and this last one, is it related to what we did?
I don't understand, where "last one" refers to...
These Fetcher tests.
You can ignore the fetcher tests
Marcelo Nascimento @.***> schrieb am Mo., 22. Jan. 2024, 21:25:
These Fetcher tests.
— Reply to this email directly, view it on GitHub https://github.com/JabRef/jabref/pull/10586#issuecomment-1904748473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOFZDHVKABZOHT7XPOVNDYP3DNLAVCNFSM6AAAAAA6QCNEUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUG42DQNBXGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Unfortunately, my classes started a few days ago and I will not be able to continue this project. If there is someone else who can continue this issue, you can pass it on.
Ok, yes, we will look into it. Thanks for your work on enhancing JabRef.