From 28cabd9909d3a9bdfbdc9fab46e2572a72acb325 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Feb 2014 16:59:39 -0400 Subject: [PATCH] Revert "work around absNormPath not working on Windows" This reverts commit 0fc3ad82c506929e619084b3c37d845228c39c69. That caused 2 other test cases to fail. Windows path slash issues are horrible. --- Utility/Path.hs | 10 +++++----- debian/changelog | 1 - ...Windows_the_Comitted_Symlinks_are_not_Relative.mdwn | 10 ---------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Utility/Path.hs b/Utility/Path.hs index 0b15e74213..44ac72f068 100644 --- a/Utility/Path.hs +++ b/Utility/Path.hs @@ -21,10 +21,10 @@ import Control.Applicative import Data.Char import qualified System.FilePath.Posix as Posix #else +import qualified "MissingH" System.Path as MissingH import System.Posix.Files #endif -import qualified "MissingH" System.Path as MissingH import Utility.Monad import Utility.UserInfo @@ -34,15 +34,15 @@ import Utility.UserInfo - - On Unix, collapses and normalizes ".." etc in the path. May return Nothing - if the path cannot be normalized. + - + - MissingH's absNormPath does not work on Windows, so on Windows + - no normalization is done. -} absNormPath :: FilePath -> FilePath -> Maybe FilePath #ifndef mingw32_HOST_OS absNormPath dir path = MissingH.absNormPath dir path #else -absNormPath dir path = todos <$> MissingH.absNormPath (fromdos dir) (fromdos path) - where - fromdos = replace "\\" "/" - todos = replace "/" "\\" +absNormPath dir path = Just $ combine dir path #endif {- Returns the parent directory of a path. diff --git a/debian/changelog b/debian/changelog index 3c5d46de4a..5bfb26194a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,7 +28,6 @@ git-annex (5.20140128) UNRELEASED; urgency=medium directories. * Windows: Fix deletion of repositories by test suite and webapp. * Windows: Test suite 100% passes again. - * Windows: Fix bug in symlink calculation code. -- Joey Hess Tue, 28 Jan 2014 13:57:19 -0400 diff --git a/doc/bugs/On_Windows_the_Comitted_Symlinks_are_not_Relative.mdwn b/doc/bugs/On_Windows_the_Comitted_Symlinks_are_not_Relative.mdwn index 3ea44f8575..159e48310c 100644 --- a/doc/bugs/On_Windows_the_Comitted_Symlinks_are_not_Relative.mdwn +++ b/doc/bugs/On_Windows_the_Comitted_Symlinks_are_not_Relative.mdwn @@ -90,13 +90,3 @@ The output of `git log -p` for me: @@ -0,0 +1 @@ +.git/annex/objects/5X/qQ/SHA256E-s19915186--c6dc288ec8a77404c0ebc22cbe9b4ec911103fd022c3ca74eec582604dff80a7.exe/SHA256E-s19915186--c6dc288ec8a77404c0ebc22cbe9b4ec911103fd022c3ca74eec582604dff80a7.exe \ No newline at end of file - -> [[fixed|done]] -- I didn't notice this before because it happened to do -> the right thing if you cd'd into the subdir before adding the file there. -> -> WRT the slow down issue, I don't see how it could matter to git-annex on -> Windows whether the symlinks point to the right place. It only looks at -> the basename of the symlink target to get the key. If you have a -> repository that behaves poorly, you can probably use --debug to see if -> git-annex is calling some expensive series of git commands somehow. -> --[[Joey]]