From e9ee69fec2da197ac01f7e308fa9979bb58f6fcd Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 10 Oct 2014 19:08:47 -0400 Subject: [PATCH 1/4] Fixed VCS relative paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relative paths should be relative to the current directory, not relative to the root of the working copy. Also, ‘-r’ was added to the Git remove command to allow directory recursion. Fixes #163 --- doorstop/core/vcs/base.py | 2 +- doorstop/core/vcs/git.py | 2 +- doorstop/core/vcs/test/test_commands.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doorstop/core/vcs/base.py b/doorstop/core/vcs/base.py index d77a2491d..b9c32b9cb 100644 --- a/doorstop/core/vcs/base.py +++ b/doorstop/core/vcs/base.py @@ -26,7 +26,7 @@ def __init__(self, path): def relpath(self, path): """Get a relative path to the working copy root for commands.""" - return os.path.relpath(path, self.path).replace('\\', '/') + return os.path.relpath(path).replace('\\', '/') @staticmethod def call(*args, return_stdout=False): # pragma: no cover (abstract method) diff --git a/doorstop/core/vcs/git.py b/doorstop/core/vcs/git.py index 535b77ae5..f7d653863 100644 --- a/doorstop/core/vcs/git.py +++ b/doorstop/core/vcs/git.py @@ -24,7 +24,7 @@ def add(self, path): self.call('git', 'add', self.relpath(path)) def delete(self, path): - self.call('git', 'rm', self.relpath(path), '--force', '--quiet') + self.call('git', 'rm', '-r', self.relpath(path), '--force', '--quiet') def commit(self, message=None): message = message or input("Commit message: ") # pylint: disable=W0141 diff --git a/doorstop/core/vcs/test/test_commands.py b/doorstop/core/vcs/test/test_commands.py index 554643db5..7a4f9ffd2 100644 --- a/doorstop/core/vcs/test/test_commands.py +++ b/doorstop/core/vcs/test/test_commands.py @@ -69,7 +69,7 @@ def test_add(self, mock_call): def test_delete(self, mock_call): """Verify Git can delete files.""" self.delete() - calls = [call(("git", "rm", self.path, "--force", "--quiet"))] + calls = [call(("git", "rm", "-r", self.path, "--force", "--quiet"))] mock_call.assert_has_calls(calls) def test_commit(self, mock_call): From 9f5b9023255a71764f4fbe530dd6fb1b787945ff Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 10 Oct 2014 19:22:41 -0400 Subject: [PATCH 2/4] Update CHANGES --- CHANGES.md | 5 +++++ doorstop/__init__.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 50b3abf37..31bc08e57 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,11 @@ Changelog ========= +0.8.3 (dev) +----------- + +- Fixed a bug running VCS commands in subdirectories. + 0.8.2 (2014/09/29) ------------------ diff --git a/doorstop/__init__.py b/doorstop/__init__.py index 7a1766d7c..633587d22 100644 --- a/doorstop/__init__.py +++ b/doorstop/__init__.py @@ -1,7 +1,7 @@ """Package for doorstop.""" __project__ = 'Doorstop' -__version__ = '0.8.2' +__version__ = '0.8.3-dev' CLI = 'doorstop' GUI = 'doorstop-gui' From 4d7d0372f5045dd80a456174677c1d1524781f14 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 10 Oct 2014 19:32:57 -0400 Subject: [PATCH 3/4] Exclude openpyxl==2.1.0 as a dependency openpyxl==2.1.0 broke tests (see #161). In openpyxl==2.1.1 these tests are no longer broken so the old dependency requirements were restored with an exclusion of the broken version. Fixes #161 --- CHANGES.md | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 31bc08e57..91687b75a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Changelog ----------- - Fixed a bug running VCS commands in subdirectories. +- Excluded `openpyxl==2.1.0` as a dependency version. 0.8.2 (2014/09/29) ------------------ diff --git a/setup.py b/setup.py index e0490753e..fcb1b3d3f 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ install_requires=[ "PyYAML >= 3.10, < 4", "Markdown >= 2, < 3", - "openpyxl >= 2, < 2.1.0", + "openpyxl >= 2, < 3, != 2.1.0", "bottle >= 0.12, < 0.13", "requests >= 2, < 3", "pyficache >= 0.2.3, < 0.3", From 0fb34bc794d37acf4ff558e8281a858e067701d6 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 10 Oct 2014 19:39:36 -0400 Subject: [PATCH 4/4] Bump release version number --- CHANGES.md | 4 ++-- doorstop/__init__.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 91687b75a..f31edd231 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,8 @@ Changelog ========= -0.8.3 (dev) ------------ +0.8.3 (2014/10/10) +------------------ - Fixed a bug running VCS commands in subdirectories. - Excluded `openpyxl==2.1.0` as a dependency version. diff --git a/doorstop/__init__.py b/doorstop/__init__.py index 633587d22..840a59302 100644 --- a/doorstop/__init__.py +++ b/doorstop/__init__.py @@ -1,7 +1,7 @@ """Package for doorstop.""" __project__ = 'Doorstop' -__version__ = '0.8.3-dev' +__version__ = '0.8.3' CLI = 'doorstop' GUI = 'doorstop-gui'