[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

"Save to Clipboard" including BOM marker

From: Eric Hirst <Eric.Hirst_at_magnitudesoftware.com>
Date: Wed, 15 Jul 2015 17:38:19 +0000

We've been having a problem that I initially attributed to our code review tool (Crucible/Fisheye) but which now seems to be a TSVN bug. Repro steps are very simple:

SIMPLE REPRO STEPS:

1. Compare 2 attached .patch files in TortoiseMerge and notice the BOM in the one from the clipboard.

DETAILED REPRO STEPS:

1. Check in a file similar to IPaintable.cs (attached) into your SVN repository. (I think any .cs file will work.)

2. Make an edit to one of the first couple lines (see IPaintable - revised.cs) and save the file locally

3. Open the .cs file in the TSVN commit dialog.

4. Right-click to "Create Patch"

5. (a) Save as a file (to get the attached IPaintable.cs.patch)
(b) Choose the "Save to clipboard" option, pasting the result into Notepad or similar, then saving to a file (to get the attached IPaintable.cs.Clipboard.patch).

6. Diff the two patch files using TortoiseMerge and notice that the clipboard version includes the beginning of file byte-order marker (BOM).
ERROR: this BOM breaks 3rd party tools, including Crucible, which has a "paste from clipboard" feature.

7. Revert the change to the .cs file and try applying either of the 2 patches.
ERROR: the patch built from the clipboard paste does not work in TortoiseSVN either. An error box seems to flash up, but I can't read anything it might be trying to tell me.

IMPACT:
This ends up adversely affecting about 25% of our code reviews, preventing iterative reviews and breaking Crucible's ability to show the full context of changes. Our actual workflow is a variant of 5b, the difference being that we paste directly into Crucible instead of into Notepad. My question on https://answers.atlassian.com/questions/21627643, posted yesterday when I thought this was a Crucible bug, describes that workflow.

WORKAROUND:
Now that we understand the issue, we can add extra steps to our workflow and save patches as files before uploading, rather than simply using the TSVN "Save to clipboard" --> Crucible "Paste" approach that we use today.

Thanks, Eric

Eric Hirst
Principal Software Engineer

[cid:image001.jpg_at_01CF6917.89960BB0]
Eric.Hirst_at_magnitudesoftware.com<mailto:Eric.Hirst_at_magnitudesoftware.com>
Magnitude Software
5010 148th Ave. NE, Ste. 100, Redmond, WA 98052
Direct: 425.372.2758 | Cell: 206.930.8358
Website<http://www.magnitudesoftware.com/> | Twitter<https://twitter.com/Mag_SW> | LinkedIn<https://linkedin.com/company/3701133>

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3127273

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

image001.jpg
Received on 2015-07-15 19:41:24 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.