view tests/test-commit-copy.t @ 15372:695ac6aca77f stable

check-code: fix issues with finding patterns in unified tests, fix tests - 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.
author Matt Mackall <mpm@selenic.com>
date Thu, 27 Oct 2011 17:22:04 -0500
parents ec5886db9dc6
children
line wrap: on
line source

  $ hg init dir
  $ cd dir
  $ echo bleh > bar
  $ hg add bar
  $ hg ci -m 'add bar'

  $ hg cp bar foo
  $ echo >> bar
  $ hg ci -m 'cp bar foo; change bar'

  $ hg debugrename foo
  foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
  $ hg debugindex bar
     rev    offset  length   base linkrev nodeid       p1           p2
       0         0       6      0       0 26d3ca0dfd18 000000000000 000000000000
       1         6       7      1       1 d267bddd54f7 26d3ca0dfd18 000000000000