diff tools/common.sh @ 1229:46523cdfd3b0 stable 1.6.3

pushmod: prepend "link " to base text for links http://svn.apache.org/viewvc?view=revision&revision=1223036 exposes what is arguably a bug in hgsubversion push code. Specifically, when we are receiving text from the server in an editor, we prepend a "link " to the text of symlinks when opening a file and strip it when closing a file. We don't, however, prepend "link " to the base we use when sending text changes to the server. This was working before because prior to that revision, the first thing subversion did was to check whether the entirety of the before text or the entirety of the after text was less than 64 bytes. In that case, it just sent the entirety of the after text as a single insert operation. I'd expect most, but not all symlinks to fit under the 64 byte limit, including the leading "link " text on the subversion end. After the change, the first thing subversion does is check for a leading match that is more than 4 bytes long, or that is the full length of the after text. In this case, it sends a copy operation for the leading match, and then goes into the if < 64 bytes remaining send the whole thing behavior. It also looks for trailing matches of more than 4 bytes even in the <64 byte case, but that's not what breaks the tests. Incidentally, changing the destination of long symlinks was broken even before this subversion change. This diff includes test additions that cover that breakage.
author David Schleimer <dschleimer@gmail.com>
date Thu, 07 Aug 2014 19:30:26 -0700
parents 5071b8511572
children
line wrap: on
line diff