File locking errors

1 view
Skip to first unread message

Mauricio Scheffer

unread,
Jul 1, 2009, 12:36:35 AM7/1/09
to gits...@googlegroups.com
I've noticed that many tests write some file locking errors to the debug console, like: FileLock: tried to unlock an unlocked filelock C:\prg\gitsharp\GitSharp\Tests\bin\Debug\trash\trash633820081373266000.0\.git\HEAD.lock Here's a little patch that fixes this by locking the entire file.
0001-fixing-file-locking.patch

Meinrad Recheis

unread,
Jul 1, 2009, 3:47:44 AM7/1/09
to gits...@googlegroups.com
Hi,
Yes, it seems to me that in java a FileLock can be unlocked multiple times without error but in C# it's not allowed to unlock an unlocked stream. Thanks for this!
Since the github fork-queue makes it so easy to pull in contributions please just commit future patches in your forked repo and drop me a pull request. 

Btw, I installed gallio. Looks quite smooth, but how do you debug failing tests with it? I didn't find a way to run gallio from within visual studio even though the extension is loaded. What do you think, is my VS installation broken?
Best wishes,
-- Henon

Mauricio Scheffer

unread,
Jul 1, 2009, 9:19:12 AM7/1/09
to GitSharp
Ok, I'll commit.

About Gallio, here are all the options to debug tests:
http://blog.bits-in-motion.com/2009/04/debugging-tests-with-gallio.html

Personally I use Gallio to run tests only in the automated build
scripts and TestDriven.Net ( http://testdriven.net/ , the personal
version is free for open source devs) or ReSharper to run and debug
tests within VS.

On Jul 1, 4:47 am, Meinrad Recheis <meinrad.rech...@gmail.com> wrote:
> Hi,Yes, it seems to me that in java a FileLock can be unlocked multiple
> > C:\prg\gitsharp\GitSharp\Tests\bin\Debug\trash\trash633820081373266000.0\.g it\HEAD.lock
Reply all
Reply to author
Forward
0 new messages