From: Nate Parsons <parsons.nate@gmail.com>
To: git@vger.kernel.org
Subject: Re: git .lock file error
Date: Thu, 30 Sep 2010 14:00:52 -0400 [thread overview]
Message-ID: <AANLkTim2sFCx8qZ-6o4tiugX3a-EBN9T8wuCSWXb5L12@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin+MRkYv7vL7eY+mdWG1vTg-E9pVpU4_QujoxdZ@mail.gmail.com>
OK, so this is definitely a win32 issue. I believe that the perl
script is simply creating .lock files too fast for Windows to keep up.
Simply trying again fixes the problem for me.
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3676,8 +3676,10 @@ sub rev_map_set {
"$db => $db_lock ($!)\n";
}
- sysopen(my $fh, $db_lock, O_RDWR | O_CREAT)
- or croak "Couldn't open $db_lock: $!\n";
+ my $fh;
+ my $tries=10;
+ for(; !sysopen($fh, $db_lock, O_RDWR | O_CREAT) && $tries>=0; $tries--) { }
+ if($tries <= 0) { croak "Couldn't open $db_lock: $!\n"; }
$update_ref eq 'reset' ? _rev_map_reset($fh, $rev, $commit) :
_rev_map_set($fh, $rev, $commit);
if ($sync) {
If this is a reasonable solution, I can go figure out how to properly
format a patch to the list.
-Nate
On Sun, Sep 19, 2010 at 10:42 PM, Nate Parsons <parsons.nate@gmail.com> wrote:
>
> Hello again,
>
> I realized I have git-cheetah running as well, so I killed
> explorer.exe (the only process using git_shell_ext.exe), and tried
> again. That's when I noticed that running 'git svn fetch' spawned two
> git processes and a perl process (which later spawned another perl).
> Is this something that should be happening?
>
> Thanks,
> -Nate
>
> On Mon, Sep 13, 2010 at 11:19 AM, Nate Parsons <parsons.nate@gmail.com> wrote:
> >
> > Hi everyone,
> >
> > I'm trying to switch to git, so I apologize in advance for my
> > ignorance. For this, I'm using cygwin git, version 1.7.1 to talk to a
> > svn server running 1.4.2.
> >
> > When I 'git svn clone' or 'git svn clone; git svn fetch', I sometimes
> > run into the following error.
> > > Couldn't open .git/svn/refs/remotes/0.0.0/.rev_map.b8cad480-e46b-48b4-8317-a683ee46c2bd.lock: Device or resource busy
> > > at /usr/lib/git-core/git-svn line 5210
> >
> > And when I 'git svn rebase'
> > > Couldn't open .git/svn/refs/remotes/git-svn/.rev_map.cc05479a-e8ea-436f-8d71-e07493b7796c.lock: Device or resource busy
> > > at /usr/lib/git-core/git-svn line 1528
> >
> > Sometimes the line number is different (578, I think?), but when I
> > retry the fetch command, it rebuilds the file corresponding to the
> > lockfile, and then continues a little farther before dying again.
> >
> > When I watch the directory in question, I see the lock file appear,
> > and then disappearing a short time after the script gives up.
> >
> > I don't have a series of steps to reproduce the problem, sometimes it
> > goes for an hour, and sometimes for just a few minutes/seconds.
> >
> > I do have TortoiseGit running my machine, but this issue happens even
> > when TGitCache.exe is not running. If some other instance of git is
> > accessing the repository, I don't know which or how.
> >
> > Thanks,
> > -Nate
next prev parent reply other threads:[~2010-09-30 18:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 15:19 git .lock file error Nate Parsons
2010-09-20 2:42 ` Nate Parsons
2010-09-30 18:00 ` Nate Parsons [this message]
2010-09-30 19:13 ` Ævar Arnfjörð Bjarmason
2010-09-30 20:15 ` Junio C Hamano
2010-09-30 21:10 ` Nate Parsons
2010-09-30 21:16 ` Ævar Arnfjörð Bjarmason
2010-09-30 23:45 ` Erik Faye-Lund
2010-10-01 0:57 ` Nate Parsons
[not found] ` <AANLkTik2HtyVGz6xFb_VmCh1gSAA_vwpUXhytHFzgCwa@mail.gmail.com>
2010-10-01 1:59 ` Erik Faye-Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTim2sFCx8qZ-6o4tiugX3a-EBN9T8wuCSWXb5L12@mail.gmail.com \
--to=parsons.nate@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).