Skip to content

Commit f27797e

Browse files
authored
Merge branch 'main' into reduce-log-noise
2 parents a16719e + b8497e9 commit f27797e

21 files changed

+1707
-752
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ The title of the PR must not reference an issue, because GitHub does not support
1111
- [x] done; [ ] not done / not applicable
1212
-->
1313

14+
```[tasklist]
15+
### Compulsory checks
1416
- [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if applicable)
1517
- [ ] Tests created for changes (if applicable)
1618
- [ ] Manually tested changed features in running JabRef (always required)
1719
- [ ] Screenshots added in PR description (for UI changes)
1820
- [ ] [Checked developer's documentation](https://devdocs.jabref.org/): Is the information available and up to date? If not, I outlined it in this pull request.
1921
- [ ] [Checked documentation](https://docs.jabref.org/): 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.
22+
```

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
2323
### Changed
2424

2525
- 'Get full text' now also checks the file url. [#568](https://github.com/koppor/jabref/issues/568)
26+
- We modified the `Add Group` dialog to use the most recently selected group hierarchical context. [#9141](https://github.com/JabRef/jabref/issues/9141)
2627
- We refined the 'main directory not found' error message. [#9625](https://github.com/JabRef/jabref/pull/9625)
28+
- JabRef writes a new backup file only if there is a change. Before, JabRef created a backup upon start. [#9679](https://github.com/JabRef/jabref/pull/9679)
29+
- Backups of libraries are not stored per JabRef version, but collected together.
30+
- We streamlined the paths for logs and backups: The parent path fragement is always `logs` or `backups`.
2731
- `log.txt` now contains debug messages. Debugging needs to be enabled explicitly. [#9678](https://github.com/JabRef/jabref/pull/9678)
2832
- `log.txt` does not contain entries for non-found files during PDF indexing. [#9678](https://github.com/JabRef/jabref/pull/9678)
29-
- We modified the `Add Group` dialog to use the most recently selected group hierarchical context [#9141](https://github.com/JabRef/jabref/issues/9141)
33+
- We improved the Medline importer to correctly import ISO dates for `revised`. [#9536](https://github.com/JabRef/jabref/issues/9536)
3034

3135

3236

build.gradle

-10
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ processResources {
259259

260260
task generateSource(dependsOn: ["generateBstGrammarSource",
261261
"generateSearchGrammarSource",
262-
"generateMedlineSource",
263262
"generateBibtexmlSource",
264263
"generateEndnoteSource",
265264
"generateModsSource",
@@ -290,15 +289,6 @@ tasks.register("generateSearchGrammarSource", JavaExec) {
290289
args = ["-o","src-gen/main/java/org/jabref/search" , "-visitor", "-no-listener", "-package", "org.jabref.search", "$projectDir/src/main/antlr4/org/jabref/search/Search.g4"]
291290
}
292291

293-
task generateMedlineSource(type: XjcTask) {
294-
group = 'JabRef'
295-
description = "Generates java files for the medline importer."
296-
297-
schemaFile = "src/main/resources/xjc/medline/medline.xsd"
298-
outputDirectory = "src-gen/main/java"
299-
javaPackage = "org.jabref.logic.importer.fileformat.medline"
300-
}
301-
302292
task generateBibtexmlSource(type: XjcTask) {
303293
group = 'JabRef'
304294
description = "Generates java files for the bibtexml importer."

docs/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gem "jekyll", "~> 4.3" # installed by `gem jekyll`
55
# Homepage: https://github.com/paulrobertlloyd/jekyll-figure#jekyll-figure
66
gem 'jekyll-figure'
77

8-
gem "just-the-docs", "0.4.0.rc3"
8+
gem "just-the-docs", "0.4.2"
99

1010
gem "jekyll-remote-theme"
1111

src/main/java/org/jabref/cli/Launcher.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import org.jabref.logic.remote.RemotePreferences;
2323
import org.jabref.logic.remote.client.RemoteClient;
2424
import org.jabref.logic.util.BuildInfo;
25+
import org.jabref.logic.util.OS;
2526
import org.jabref.migrations.PreferencesMigrations;
2627
import org.jabref.model.database.BibDatabaseContext;
2728
import org.jabref.model.database.BibDatabaseMode;
@@ -90,10 +91,12 @@ public static void main(String[] args) {
9091
* the log configuration programmatically anymore.
9192
*/
9293
private static void addLogToDisk() {
93-
Path directory = Path.of(AppDirsFactory.getInstance().getUserLogDir(
94-
"jabref",
95-
new BuildInfo().version.toString(),
96-
"org.jabref"));
94+
Path directory = Path.of(AppDirsFactory.getInstance()
95+
.getUserDataDir(
96+
OS.APP_DIR_APP_NAME,
97+
"logs",
98+
OS.APP_DIR_APP_AUTHOR))
99+
.resolve(new BuildInfo().version.toString());
97100
try {
98101
Files.createDirectories(directory);
99102
} catch (IOException e) {

src/main/java/org/jabref/gui/backup/BackupResolverDialog.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public BackupResolverDialog(Path originalPath) {
3232
getDialogPane().setMinHeight(180);
3333
getDialogPane().getButtonTypes().setAll(RESTORE_FROM_BACKUP, REVIEW_BACKUP, IGNORE_BACKUP);
3434

35-
Optional<Path> backupPathOpt = BackupFileUtil.getPathOfLatestExisingBackupFile(originalPath, BackupFileType.BACKUP);
35+
Optional<Path> backupPathOpt = BackupFileUtil.getPathOfLatestExistingBackupFile(originalPath, BackupFileType.BACKUP);
3636
String backupFilename = backupPathOpt.map(Path::getFileName).map(Path::toString).orElse(Localization.lang("File not found"));
3737
String content = new StringBuilder()
3838
.append(Localization.lang("A backup file for '%0' was found at [%1]",

src/main/java/org/jabref/gui/dialogs/BackupUIManager.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private static Optional<ParserResult> showReviewBackupDialog(DialogService dialo
6363
// This will be modified by using the `DatabaseChangesResolverDialog`.
6464
BibDatabaseContext originalDatabase = originalParserResult.getDatabaseContext();
6565

66-
Path backupPath = BackupFileUtil.getPathOfLatestExisingBackupFile(originalPath, BackupFileType.BACKUP).orElseThrow();
66+
Path backupPath = BackupFileUtil.getPathOfLatestExistingBackupFile(originalPath, BackupFileType.BACKUP).orElseThrow();
6767
BibDatabaseContext backupDatabase = OpenDatabase.loadDatabase(backupPath, importFormatPreferences, new DummyFileUpdateMonitor()).getDatabaseContext();
6868

6969
DatabaseChangeResolverFactory changeResolverFactory = new DatabaseChangeResolverFactory(dialogService, originalDatabase, preferencesService.getBibEntryPreferences());

src/main/java/org/jabref/logic/autosaveandbackup/BackupManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class BackupManager {
6464
// During a write, the less recent backup file is deleted
6565
private final Queue<Path> backupFilesQueue = new LinkedBlockingQueue<>();
6666

67-
private boolean needsBackup = true;
67+
private boolean needsBackup = false;
6868

6969
BackupManager(BibDatabaseContext bibDatabaseContext, BibEntryTypesManager entryTypesManager, PreferencesService preferences) {
7070
this.bibDatabaseContext = bibDatabaseContext;
@@ -87,7 +87,7 @@ static Path getBackupPathForNewBackup(Path originalPath) {
8787
* Determines the most recent existing backup file name
8888
*/
8989
static Optional<Path> getLatestBackupPath(Path originalPath) {
90-
return BackupFileUtil.getPathOfLatestExisingBackupFile(originalPath, BackupFileType.BACKUP);
90+
return BackupFileUtil.getPathOfLatestExistingBackupFile(originalPath, BackupFileType.BACKUP);
9191
}
9292

9393
/**

0 commit comments

Comments
 (0)