From c2e52ec4c45afa3e9c8e081cc718deb73dc14a4a Mon Sep 17 00:00:00 2001 From: Olivier Mangin Date: Mon, 20 Aug 2018 12:17:40 +0200 Subject: [PATCH] Makes 'copy' the default for the `add_doc` configuration option. --- changelog.md | 2 +- pubs/config/spec.py | 2 +- tests/test_usecase.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 4ab4d92..0d8a214 100644 --- a/changelog.md +++ b/changelog.md @@ -8,7 +8,7 @@ ### Implemented enhancements -- Adds `move`, and `link` options for handling of documents during import (copy being the default). [(#159)](https://github.com/pubs/pubs/pull/159) +- Adds `move`, and `link` options for handling of documents during `import` (copy being the default). Makes `copy` the default for document handling during `add`. [(#159)](https://github.com/pubs/pubs/pull/159) - Better dialog after editing paper [(#142)](https://github.com/pubs/pubs/issues/142) diff --git a/pubs/config/spec.py b/pubs/config/spec.py index d881898..76421a4 100644 --- a/pubs/config/spec.py +++ b/pubs/config/spec.py @@ -11,7 +11,7 @@ docsdir = string(default="docsdir://") # Specify if a document should be copied or moved in the docdir, or only # linked when adding a publication. -doc_add = option('copy', 'move', 'link', default='move') +doc_add = option('copy', 'move', 'link', default='copy') # the command to use when opening document files open_cmd = string(default=None) diff --git a/tests/test_usecase.py b/tests/test_usecase.py index fb8a109..a2f8f2f 100644 --- a/tests/test_usecase.py +++ b/tests/test_usecase.py @@ -668,7 +668,7 @@ class TestUsecase(DataCommandTestCase): def test_first(self): correct = ['Initializing pubs in /paper_first\n', 'added to pubs:\n[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n' - 'data/pagerank.pdf was moved to the pubs repository.\n', + 'data/pagerank.pdf was copied to the pubs repository.\n', '[Page99] Page, Lawrence et al. "The PageRank Citation Ranking: Bringing Order to the Web." (1999) \n', '\n', '',