开发者

Is there a way to auto-resume in a subversion commit?

I ofen get transaction errors when committing. These, as far as I know, are as result of commits that fail halfway through. Is there a way, preferably using开发者_如何学Go a GUI such as TortoiseSVN, that will automatically resume a commit where it failed and will keep retrying until everything is commit?

Example of a failed commit:

Commit failed (details follow): PUT of '/svn/namcloud/!svn/wrk/02b0f9ff-2510-a147-892a-2ee0b7b442dc/src/sites/all/modules/globalredirect/LICENSE.txt': Could not read response body: An existing connection was forcibly closed by the remote host. (http://XXX.XXX.XXX)


It is not entirely automatic, but there is a TortoiseSVN -> Settings... -> Dialogs 2 -> Reopen commit and branch/tag dialog after a commit failed checkbox. This cuts down on the annoyance a bit, automatically resurrecting your log message.

"An existing connection was forcibly closed by the remote host" probably indicates an RST coming back along the TCP/IP connection. This can be generated by anything between you and the remote host.

I'd recommend grabbing something like Wireshark and seeing if there's anything immediately obvious. (This kind of diagnosis is tricky if you're not used to it, but worth a quick look all the same.)

As A.H. suggested, you may want to get in touch with the server administrator. It is possible some evidence of a connection timeout may show up in their webserver or firewall logs, or there may be an immediately obvious timeout setting in e.g. a SSL configuration directive.


Unfortunately, we do not always have the choice of what we use, or what kind of support/management we have on the server side of things.

One 'more evil' way to go about it would be to create a script that commits every file in the tree individually, over and over again, until they all succeed.

Of course, on a large commit, someone might complain that there are 100+ nearly identical log messages, one for each file, and just like a big RCS/CVS commit, people will 'update' and get something 'between' the start of the commit and the finish, but then you can tell them about the problems you have, and the 'solution' you were forced to resort to, in order to GET WORK DONE, despite poor management and support.

Unfortunately, for particularly big files, or particularly 'bad' network problems, this still might not work.

Worst case, everyone else on the project begs you for the script, too.

Or I guess someone could 'fire' you over it. But that would probably be a better outcome than working in the sort of environment that sabotages your every effort to accomplish goals, then holds you 'accountable' when you try to overcome their obstacles to get things done.


A "transaction" or "atomic commit" in SVN is exactly that - all or nothing. Therefore there is no auto_resume. All you could do is to start the checkin from the very beginning.

The better solution is talking to the appropriate server admin to investigate and fix the cause. Curing the symptoms only is never a good idea.


TortoiseSVN -> Settings... -> Dialogs 2 -> Reopen commit and branch/tag dialog after a commit failed

I think this feature has been removed. I don't see this option in TortoiseSVN 1.7.11 Build 23600


The problem is that some network providers break the connection after a short time-out. Complain all you want to a hotel in China (or to Rogers in Canada), they are not going to fix that. Unfortunately when the commit is interrupted, all the already uploaded files are lost. So it's never possible to complete the commit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜