Skip to content
Snippets Groups Projects
  1. Nov 10, 2011
    • Nicolas Venegas's avatar
      mdiff/patch: fix bad hunk handling for unified diffs with zero context · 2b1ec74c961f
      Nicolas Venegas authored
      Prior to this patch "hg diff -U0", i.e., zero lines of context, would
      output hunk headers with a start line one greater than what GNU patch
      and git output. Guido van Rossum documents the unified diff format[1]
      as having a start line value "one lower than one would expect" for
      zero length hunks.
      
      Comparing the behaviour of the three systems prior to this patch in
      transforming
      
        c1
        c3
      
      to
      
        c1
        c2
        c3
      
      - GNU "diff -U0" reports the hunk as "@@ -1,0 +2 @@"
      - "git diff -U0" reports the hunk as "@@ -1,0 +2 @@"
      - "hg diff -U0" reports the hunk as "@@ -2,0 +2,1 @@"
      
      After this patch, "hg diff -U0" reports "@@ -1,0 +2,1 @@".
      
      Since "hg export --config diff.unified=0" outputs zero-context unified
      diffs, "hg import" has also been updated to account for start lines
      one less than expected for zero length hunk ranges.
      
      [1]: http://www.artima.com/weblogs/viewpost.jsp?thread=164293
      2b1ec74c961f
  2. Nov 08, 2011
    • Patrick Mezard's avatar
      convert/bzr: correctly handle divergent nested renames (issue3089) · 6ba2fc0a87ab
      Patrick Mezard authored
      With renames like:
      
        a   -> b
        a/c -> a/c
      
      We were ignoring or duplicating the second one instead of leaving files
      unchanged or moving them to their proper destination only.
      
      To avoid this, we process the files in reverse lexicographic order, from most
      to least specific change, and ignore files already processed.
      
      v2:
      - Add a test
      - Change "reverse=1" into "reverse=True"
      6ba2fc0a87ab
  3. Nov 04, 2011
  4. Nov 03, 2011
  5. Nov 01, 2011
  6. Oct 31, 2011
  7. Oct 20, 2011
    • Hao Lian's avatar
      largefiles: replace tempfile.NamedTemporaryFile with tempfile.mkstemp · a5a6a9b7f3b9
      Hao Lian authored
      This is consistent with the rest of Mercurial's code, mirroring the
      try-finally-unlink structure elsewhere. Furthermore, it fixes the case where
      largefiles throws an IOError on Windows when the temporary file is opened a
      second time by copytocacheabsolute.
      
      This patch creates the temporary file in the repo's largefiles store rather than
      /tmp, which might be a different filesystem.
      a5a6a9b7f3b9
  8. Oct 31, 2011
  9. Oct 30, 2011
  10. Oct 29, 2011
  11. Oct 28, 2011
  12. Oct 29, 2011
  13. Oct 28, 2011
  14. Oct 27, 2011
  15. Oct 26, 2011
    • Peer Stritzinger's avatar
      revert: fix missing removes when parent was changed in dirstate · 9a2582e325a5
      Peer Stritzinger authored
      When dirstate parent is changed with dirstate.setparent before a
      revert so it no longer points to where the dirstate refered to, revert
      does not remove all files it should:
      
      Revert to a different revision needs also to remove files that are not
      found through disptables and not in the context or parent manifest.
      9a2582e325a5
  16. Oct 27, 2011
    • Matt Mackall's avatar
      check-code: fix issues with finding patterns in unified tests, fix tests · 695ac6aca77f
      Matt Mackall authored
      - old-style patterns without ^ were getting improperly anchored
      - finditer was matching against beginning of line poorly
      - \s was matching newlines
      - [^x] was matching newlines
      
      so we:
      
      - remove earlier hacks for multiline matching
      - fix unified test anchoring by adding .*
      - replace \s with [ \t]
      - replace [^x] with [^\nx]
      - force all matches into multiline mode so ^ anchors work
      
      This uncovers a number of test issues that are then repaired.
      695ac6aca77f
  17. Oct 25, 2011
Loading