From: Eric Wong <normalperson@yhbt.net>
To: Steven Grimm <koreth@midwinter.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] git-svn: fix dcommit losing changes when out-of-date from svn
Date: Thu, 9 Nov 2006 12:47:59 -0800 [thread overview]
Message-ID: <20061109204759.GA8560@localdomain> (raw)
In-Reply-To: <455381C7.8080207@midwinter.com>
Steven Grimm <koreth@midwinter.com> wrote:
> Junio C Hamano wrote:
> >Steven, I do not interact with real svn repository myself so I
> >can only judge from the test in this patch and Steven's test
> >case, so it would be more assuring for me if you can confirm it
> >fixes the issue for you.
> >
>
> It seems to; I can't make the problem happen any more. I am slightly
> concerned -- but I don't know libsvn well enough to say for sure -- that
> this doesn't actually *eliminate* the problem, but rather tightens the
> window of opportunity down to some very small amount of time. Which is
> certainly an improvement, of course!
>
> Maybe only Eric can answer this, but from a cursory inspection, it
> doesn't look like it actually locks the modified files before generating
> the patch to apply. Is there still a possibility of losing a change that
> hits the svn repository in the middle of git-svn dcommit running? Or
> does locking happen implicitly somewhere I'm not seeing? (Again, I
> haven't combed the code deeply, so it's entirely possible I've missed
> something.)
The commit runs as a transaction on the server-side, where all the real
locking occurs. SVN supports user-side locking (svn lock), but it is
only advisory and can be taken/unlocked by other users
(svn lock/unlock --force).
When SVN::Git::Editor is instantiated in commit_diff() (line 853), the
'r' parameter passed to it is the revision we'll generate our diffs
against. Before, we were generating diffs against the latest revision.
We generate diffs against 'r' in SVN::Git::Editor::M() (line 3339) and
SVN::Git::Editor::chg_file (line 3383) passing the $fbat baton object
(which represents the file at revision 'r') around.
--
next prev parent reply other threads:[~2006-11-09 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-09 0:34 git-svn can lose changes silently Steven Grimm
2006-11-09 7:33 ` Seth Falcon
2006-11-09 9:19 ` [PATCH] git-svn: fix dcommit losing changes when out-of-date from svn Eric Wong
2006-11-09 10:00 ` Junio C Hamano
2006-11-09 17:42 ` Seth Falcon
2006-11-09 19:22 ` Eric Wong
2006-11-09 19:30 ` Steven Grimm
2006-11-09 20:47 ` Eric Wong [this message]
2006-11-09 22:37 ` Steven Grimm
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=20061109204759.GA8560@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=koreth@midwinter.com \
/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).