git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-svn dcommit to HTTP proxy can fail
@ 2011-01-22 19:58 Ben Jackson
  0 siblings, 0 replies; only message in thread
From: Ben Jackson @ 2011-01-22 19:58 UTC (permalink / raw)
  To: git

git-svn dcommit turns each new git commit into an SVN commit, then uses
its normal fetch mechanism to pull the new revision back from the SVN
server.  It compares the fetched version to the git version with diff-tree.
If they don't match you generally get a very cryptic error message.

The primary reason for the mismatches seems to be SVN HTTP proxies.  When
the svn-remote is an HTTP proxy the commit is delegated to the actual
SVN server.  It acknowledges the commit as usual and then updates the
proxies with a post-commit hook.  This means that the commit+fetch combo
is often fast enough to catch the proxy in the pre-commit state and no
new revisions are fetched at all.

Someone has described this with examples on stackoverflow:
http://stackoverflow.com/questions/4238876/git-svn-fails-to-dcommit-even-after-clean-checkout

I wrote an answer to that question including a patch which adds retries
(polling the proxy until the expected revision appears).  I am currently
using that patch at work and it is a big improvement.  I keep meaning to
"productize" it and send it to this list, but there are two remaining
problems:

1.  The proxy update seems to have at least two phases: one that creates
the commit and one that sets metadata (such as author).  The new code is
pretty good at racing in and catching the new commit in an intermediate
state with the author "syncuser" (instead of me).  I don't think that
"syncuser" is a fixed name and I worry that waiting for the commit author
email address to match will break if there is any user mapping going on.

2.  My linear backoff retries total about 10 seconds, and I've blown
that budget with commits of large binaries (eg FPGA images).  You do get
a much more informative error ("New revision 1234 did not appear in
repository after 30 retries.") but it still fails.  Of course I can
increase it, but what's reasonable?

Suggestions?

-- 
Ben Jackson AD7GD
<ben@ben.com>
http://www.ben.com/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-22 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 19:58 git-svn dcommit to HTTP proxy can fail Ben Jackson

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).