1608: Valid looking patch did not apply cleanly

keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 30, 2010
1431
What version are you running?
1.0.6

What's the URL of the page containing the problem?
not externally visible

What steps will reproduce the problem?
1.  Create patches for individual file using Tortoise Unified Diff
2.  Create review
3.  Patch fails

What is the expected output? What do you see instead?
All file diffs display correctly

What operating system are you using? What browser?
Client irrelevant.
Hosted on Ubuntu 9.10, Apache2

Please provide any additional information below.
The patch to 
'/trunk/src/DigiData.Core.Tests/Utilities/ConstrainedStringGenerator.cs' 
didn't apply cleanly. The temporary files have been left in 
'/tmp/reviewboard.LFMr6m' for debugging purposes. `patch` returned: 
patching file /tmp/reviewboard.LFMr6m/tmpBydrLo Hunk #1 FAILED at 1. 1 out 
of 1 hunk FAILED -- saving rejects to file 
/tmp/reviewboard.LFMr6m/tmpBydrLo-new.rej

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/views.py", line 153, in view_diff
    interdiffset, highlighting, True)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/diffutils.py", line 623, in get_diff_files
    large_data=True)
  File "/usr/local/lib/python2.6/dist-packages/Djblets-0.5.9-
py2.6.egg/djblets/util/misc.py", line 166, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/diffutils.py", line 622, in <lambda>
    enable_syntax_highlighting),
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/diffutils.py", line 345, in get_chunks
    new = get_patched_file(old, filediff)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/diffutils.py", line 261, in 
get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-
py2.6.egg/reviewboard/diffviewer/diffutils.py", line 129, in patch
    (filename, tempdir, patch_output))
Exception: The patch to 
'/trunk/src/DigiData.Core.Tests/Utilities/ConstrainedStringGenerator.cs' 
didn't apply cleanly. The temporary files have been left in 
'/tmp/reviewboard.LFMr6m' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.LFMr6m/tmpBydrLo
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file 
/tmp/reviewboard.LFMr6m/tmpBydrLo-new.rej
***************
*** 1,70 ****
- ?using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Ploeh.AutoFixture;
  
- namespace DigiData.Core.Tests.Utilities
  {
      public class ConstrainedStringGenerator
      {
- 
          private readonly int minimumLength;
- 
          private readonly int maximumLength;
  
- 
- 
-         public ConstrainedStringGenerator(int minimumLength,
- 
-             int maximumLength)
          {
- 
              if (maximumLength < 0)
              {
- 
                  throw new ArgumentOutOfRangeException("...");
- 
              }
  
              if (minimumLength > maximumLength)
              {
- 
                  throw new ArgumentOutOfRangeException("...");
- 
              }
  
- 
- 
              this.minimumLength = minimumLength;
- 
              this.maximumLength = maximumLength;
- 
          }
  
- 
- 
          public string CreateAnonymous(string seed)
          {
david
#1 david