From e0b8a5a276fb8bbeda9fd996afce4728a19cc1db Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Wed, 29 Jun 2016 10:48:18 +0200 Subject: [PATCH] Don't trace download of remote files twice --- RELEASE_NOTES.md | 1 + src/Paket.Core/RemoteDownload.fs | 9 ++------- src/Paket/Paket.fsproj | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9e24ad8a7a..f75e016b6e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -5,6 +5,7 @@ * BUGFIX: Using network cache with invalid credentials should not fail restore - https://github.com/fsprojects/Paket/issues/1758 * BUGFIX: Make the copy task more robust if we can't parse target framework - https://github.com/fsprojects/Paket/issues/1756 * USABILITY: Show out-of-sync warning message if paket.lock is not matching paket.dependencies - https://github.com/fsprojects/Paket/issues/1750 +* COSMETICS: Don't trace download of remote files twice #### 3.3.0 - 25.06.2016 * Paket fails on dependencies file that has same package twice in same group - https://github.com/fsprojects/Paket/issues/1757 diff --git a/src/Paket.Core/RemoteDownload.fs b/src/Paket.Core/RemoteDownload.fs index 0ecfda49a6..6f8ca623e1 100644 --- a/src/Paket.Core/RemoteDownload.fs +++ b/src/Paket.Core/RemoteDownload.fs @@ -178,7 +178,7 @@ let downloadRemoteFiles(remoteFile:ResolvedSourceFile,destination) = async { match remoteFile.Origin, remoteFile.Name with | Origin.GitLink (RemoteGitOrigin cloneUrl), _ - | Origin.GitLink (LocalGitOrigin cloneUrl), _ -> + | Origin.GitLink (LocalGitOrigin cloneUrl), _ -> if not <| Utils.isMatchingPlatform remoteFile.OperatingSystemRestriction then () else let cloneUrl = cloneUrl.TrimEnd('/') @@ -224,7 +224,6 @@ let downloadRemoteFiles(remoteFile:ResolvedSourceFile,destination) = async { with | exn -> failwithf "Could not run \"%s\".\r\nError: %s" tCommand exn.Message | Origin.GistLink, Constants.FullProjectSourceFileName -> - tracefn "Downloading %O to %s" remoteFile destination let fi = FileInfo(destination) let projectPath = fi.Directory.FullName @@ -242,8 +241,7 @@ let downloadRemoteFiles(remoteFile:ResolvedSourceFile,destination) = async { } ) |> Async.Parallel task |> Async.RunSynchronously |> ignore - | Origin.GitHubLink, Constants.FullProjectSourceFileName -> - tracefn "Downloading %O to %s" remoteFile destination + | Origin.GitHubLink, Constants.FullProjectSourceFileName -> let fi = FileInfo(destination) let projectPath = fi.Directory.FullName let zipFile = Path.Combine(projectPath,sprintf "%s.zip" remoteFile.Commit) @@ -256,17 +254,14 @@ let downloadRemoteFiles(remoteFile:ResolvedSourceFile,destination) = async { let source = Path.Combine(projectPath, sprintf "%s-%s" remoteFile.Project remoteFile.Commit) DirectoryCopy(source,projectPath,true) | Origin.GistLink, _ -> - tracefn "Downloading %O to %s" remoteFile destination let downloadUrl = rawGistFileUrl remoteFile.Owner remoteFile.Project remoteFile.Name let authentication = auth remoteFile.AuthKey downloadUrl return! downloadFromUrl(authentication, downloadUrl) destination | Origin.GitHubLink, _ -> - tracefn "Downloading %O to %s" remoteFile destination let url = rawFileUrl remoteFile.Owner remoteFile.Project remoteFile.Commit remoteFile.Name let authentication = auth remoteFile.AuthKey url return! downloadFromUrl(authentication, url) destination | Origin.HttpLink(origin), _ -> - tracefn "Downloading %O to %s" remoteFile destination let url = origin + remoteFile.Commit let authentication = auth remoteFile.AuthKey url match Path.GetExtension(destination).ToLowerInvariant() with diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index 1fbecb3dee..ce3ab37362 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -51,8 +51,8 @@ D:\code\PaketKopie update -f D:\code\Paket\integrationtests\scenarios\i001117-aws\temp - install - D:\temp\paket + update + D:\code\paketkopie 11