-
-
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
Git Integration and UI Improvements #12252
base: main
Are you sure you want to change the base?
Changes from 77 commits
094252c
d0f6346
7fd8f89
9ab37a2
d8812ef
af50c7c
e72d408
d427e05
0737f48
f68236f
129d175
b82682a
34a2889
b299e5f
d2b3619
d84fcab
54fa60a
9a8e615
62a8beb
df21a4d
0f9fcb9
7b6ee3f
b67b2d9
3f9584e
76b6f92
fc94296
d6df47a
9a07077
9c86a64
fa42e86
be482cd
2797c01
27f7c47
d070e67
528fe03
d40eadd
11f65c7
8ebb62a
562b285
a2fa8b0
1ad47a3
a580032
9a1c3a1
1013c3c
4daf772
ecad580
c356375
5d22a1a
ae8583a
44f4e17
19b0ef5
7f89d89
850e681
119e5d0
a7d271b
96c3239
5d0afe6
7a48131
47d5238
e881ce4
02fa1d1
c219a98
5ae7407
ebe6f6b
b0cc7f7
7085fc4
3532d2e
08b3c0c
2c6da4b
bca3558
7e63aa2
97caf34
b1c006e
aac4915
a292db3
7ae97d1
5bbefcf
70b123b
69ad0f3
a577ad9
e55a831
cf23e68
61a1987
b515e51
8f06c80
d3b6dd3
2a05da5
dbe6f2b
3d13e22
e065399
01478c7
e4ad25c
da79d5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,11 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv | |
|
||
### Added | ||
|
||
- Implemented BackupManagerGit to handle automatic backups of .bib files using Git, ensuring centralized, version-controlled backup management. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
- Added automatic copying of .bib files to a jabref/backups directory every 19 seconds with comprehensive commit history. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
- Added support for unique file naming using UUIDs to prevent overwriting files with identical names in the backup directory. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Part of internal implementation of the introduced feature and not a "change" from existing release. Remove this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @khola22 Please do not mark review comments as resolved (except if it is trivially visible that it has been resolved). In this case, this was asked to be removed, and it is not (yet). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @subhramit okay ! sorry about that . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No issues, and no need to be sorry. It's on us to guide new contributors! |
||
- Introduced UI functionality (only during opening) for saving, restoring, reviewing and discarding changes with accurate commit details retrieval. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Part of the introduced feature (also pertains to the same issue). Remove this as well. |
||
- Enabled a "Restore" button to recover specific backup versions. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some user facing information should be kept, e.g. "enhanced backup and restore functionality". |
||
- We added a Markdown export layout. [#12220](https://github.com/JabRef/jabref/pull/12220) | ||
- We added a "view as BibTeX" option before importing an entry from the citation relation tab. [#11826](https://github.com/JabRef/jabref/issues/11826) | ||
- We added support finding LaTeX-encoded special characters based on plain Unicode and vice versa. [#11542](https://github.com/JabRef/jabref/pull/11542) | ||
|
@@ -52,6 +57,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv | |
|
||
### Changed | ||
|
||
- Refactored backup-related components to integrate with the new BackupManagerGit, replacing the older BackupManager logic. [#2961](https://github.com/JabRef/jabref/issues/2961) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Internal implementation, not relevant to user-side. Remove. |
||
- A search in "any" fields ignores the [groups](https://docs.jabref.org/finding-sorting-and-cleaning-entries/groups). [#7996](https://github.com/JabRef/jabref/issues/7996) | ||
- When a communication error with an [online service](https://docs.jabref.org/collect/import-using-online-bibliographic-database) occurs, JabRef displays the HTTP error. [#11223](https://github.com/JabRef/jabref/issues/11223) | ||
- The Pubmed/Medline Plain importer now imports the PMID field as well [#11488](https://github.com/JabRef/jabref/issues/11488) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
import org.jabref.gui.autocompleter.SuggestionProvider; | ||
import org.jabref.gui.autocompleter.SuggestionProviders; | ||
import org.jabref.gui.autosaveandbackup.AutosaveManager; | ||
import org.jabref.gui.autosaveandbackup.BackupManager; | ||
import org.jabref.gui.autosaveandbackup.BackupManagerGit; | ||
import org.jabref.gui.collab.DatabaseChangeMonitor; | ||
import org.jabref.gui.dialogs.AutosaveUiManager; | ||
import org.jabref.gui.entryeditor.EntryEditor; | ||
|
@@ -105,6 +105,7 @@ | |
import com.tobiasdiez.easybind.Subscription; | ||
import org.controlsfx.control.NotificationPane; | ||
import org.controlsfx.control.action.Action; | ||
import org.eclipse.jgit.api.errors.GitAPIException; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
|
@@ -308,7 +309,7 @@ private void onDatabaseLoadingStarted() { | |
getMainTable().placeholderProperty().setValue(loadingLayout); | ||
} | ||
|
||
private void onDatabaseLoadingSucceed(ParserResult result) { | ||
private void onDatabaseLoadingSucceed(ParserResult result) throws GitAPIException, IOException { | ||
OpenDatabaseAction.performPostOpenActions(result, dialogService, preferences); | ||
if (result.getChangedOnMigration()) { | ||
this.markBaseChanged(); | ||
|
@@ -343,7 +344,7 @@ private void onDatabaseLoadingFailed(Exception ex) { | |
dialogService.showErrorDialogAndWait(title, content, ex); | ||
} | ||
|
||
private void setDatabaseContext(BibDatabaseContext bibDatabaseContext) { | ||
private void setDatabaseContext(BibDatabaseContext bibDatabaseContext) throws GitAPIException, IOException { | ||
TabPane tabPane = this.getTabPane(); | ||
if (tabPane == null) { | ||
LOGGER.debug("User interrupted loading. Not showing any library."); | ||
|
@@ -367,13 +368,13 @@ private void setDatabaseContext(BibDatabaseContext bibDatabaseContext) { | |
installAutosaveManagerAndBackupManager(); | ||
} | ||
|
||
public void installAutosaveManagerAndBackupManager() { | ||
public void installAutosaveManagerAndBackupManager() throws GitAPIException, IOException { | ||
if (isDatabaseReadyForAutoSave(bibDatabaseContext)) { | ||
AutosaveManager autosaveManager = AutosaveManager.start(bibDatabaseContext); | ||
autosaveManager.registerListener(new AutosaveUiManager(this, dialogService, preferences, entryTypesManager)); | ||
} | ||
if (isDatabaseReadyForBackup(bibDatabaseContext) && preferences.getFilePreferences().shouldCreateBackup()) { | ||
BackupManager.start(this, bibDatabaseContext, Injector.instantiateModelOrService(BibEntryTypesManager.class), preferences); | ||
BackupManagerGit.start(this, bibDatabaseContext, Injector.instantiateModelOrService(BibEntryTypesManager.class), preferences); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
} | ||
|
||
|
@@ -750,7 +751,7 @@ private boolean confirmClose() { | |
} | ||
|
||
if (buttonType.equals(discardChanges)) { | ||
BackupManager.discardBackup(bibDatabaseContext, preferences.getFilePreferences().getBackupDirectory()); | ||
LOGGER.debug("Discarding changes"); | ||
return true; | ||
} | ||
|
||
|
@@ -798,7 +799,7 @@ private void onClosed(Event event) { | |
LOGGER.error("Problem when shutting down autosave manager", e); | ||
} | ||
try { | ||
BackupManager.shutdown(bibDatabaseContext, | ||
BackupManagerGit.shutdown(bibDatabaseContext, | ||
preferences.getFilePreferences().getBackupDirectory(), | ||
preferences.getFilePreferences().shouldCreateBackup()); | ||
} catch (RuntimeException e) { | ||
|
@@ -1078,7 +1079,15 @@ public static LibraryTab createLibraryTab(BackgroundTask<ParserResult> dataLoadi | |
|
||
newTab.setDataLoadingTask(dataLoadingTask); | ||
dataLoadingTask.onRunning(newTab::onDatabaseLoadingStarted) | ||
.onSuccess(newTab::onDatabaseLoadingSucceed) | ||
.onSuccess(result -> { | ||
try { | ||
newTab.onDatabaseLoadingSucceed(result); | ||
} catch (Exception e) { | ||
// We need to handle the exception. | ||
// Handle the exception, e.g., log it or show an error dialog | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
||
LOGGER.error("An error occurred while loading the database", e); | ||
} | ||
}) | ||
.onFailure(newTab::onDatabaseLoadingFailed) | ||
.executeWith(taskExecutor); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog entries are primarily for users, so they are not supposed to be aware of internal implementations or class names ("BackupManagerGit"). Just mention git-based version control. Ideally make entries short and crisp as well. For example: