From ab14d0ebcb59ef560dbade11c1915f940ab03e88 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 19 Oct 2012 21:43:08 -0400 Subject: [PATCH] vcs: adjust .original_year() relative path calculation to match .authors(). I should have fixed .authors() back when I fixed .original_year(). Now the filename handling is identical, which should make it easier for people to keep future updates in sync. --- update_copyright/vcs/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/update_copyright/vcs/__init__.py b/update_copyright/vcs/__init__.py index 32e5d4c..e62cf26 100644 --- a/update_copyright/vcs/__init__.py +++ b/update_copyright/vcs/__init__.py @@ -47,8 +47,9 @@ class VCSBackend (object): years.update(self._year_hacks.values()) else: filename = _os_path.relpath(filename, self._root) - if _utils.splitpath(filename) in self._year_hacks: - years.add(self._year_hacks[_utils.splitpath(filename)]) + splitpath = _utils.splitpath(filename) + if splitpath in self._year_hacks: + years.add(self._year_hacks[splitpath]) years = sorted(years) return years[0] -- 2.26.2