Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Error logging for various file operaitions. This will help a lot if some... #17

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

MrCsabaToth
Copy link

...one looks into the log of a deployed instance.

(I'm tracking down an issue where both on my Win 8.1 dev box and both on a Server 2012 box, where GitCandy cannot create a repo when it is deployed. With theses error logging I'm investigating this:

04/11/2015 13:46:37.964 -07:00 Error, LibGit2Sharp.NameConflictException: Failed to make directory 'c:/Users/Csaba/Documents': Cannot create a file when that file already exists.

at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_repository_init_ext(FilePath workdirPath, FilePath gitdirPath, Boolean isBare)
at LibGit2Sharp.Repository.Init(String path, Boolean isBare)
at GitCandy.Git.GitService.CreateRepository(String name)

My Repositoriesdirectory settings points to c:/Users/Csaba/Documents/GCD/Repositories/ and when I start GitCandy from debugger in an IIS Express, it works.)

@Aimeast
Copy link
Owner

Aimeast commented Apr 13, 2015

My purpose of updating was that libgit2/libgit2sharp#795 is mysteriously looks like the same what I experience. And that issue was fixed in libgit2, and thus in LibGit2Sharp. So for the upgrade didn't solve my problem. See also this SO entry downvoted by some smart asses: https://stackoverflow.com/questions/29583302/gitcandy-cannot-create-repository-when-it-is-deployed

I can't reappear this problem in my environment, even though, I believe lg2s has been improved for this kind of problem, and we need update GitCandy nothing. So, please update lg2s to latest version. Just modify long size = 0; -> var size = 0L; on here

By the way, please merge logs into one line just like Logger.Error("Something: " + ex) and reverse the count of retrying.

@Aimeast Aimeast force-pushed the dev branch 2 times, most recently from e26a3a5 to e3f97e0 Compare January 1, 2016 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants