From: W. Trevor King Date: Sat, 20 Oct 2012 01:43:08 +0000 (-0400) Subject: vcs: adjust .original_year() relative path calculation to match .authors(). X-Git-Tag: v0.5~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab14d0ebcb59ef560dbade11c1915f940ab03e88;p=update-copyright.git 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. --- 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]