Commit Graph

6 Commits

Author SHA1 Message Date
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Patrick Mezard
a884b59cee mdiff: adjust hunk offsets with --ignore-blank-lines (issue3234)
When diffing the following documents with --ignore-blank-lines (-B):

  $ cat > a <<EOF
  >
  >
  >
  > b
  > x
  > d
  > EOF

and:

  $ cat > b <<EOF
  > b
  > y
  > d
  > EOF

the context lines are taken from the first document, even if the lines differ
(with -w or -b) or if the number of lines differ (with -B). In the second case,
we have to adjust the hunk new lines offsets or we end with inconsistent diffs
like (see the @@ offsets):

  diff -r 0e66aa54f318 a
  --- a/a
  +++ b/a
  @@ -1,4 +1,3 @@

   b
  -x
  +y
   d

Note that having different context lines in a and b means the diff can be
applied but is not invertible.

Reported by Nicholas Riley <com-selenic@sabi.net>
2012-02-06 21:17:50 +01:00
Idan Kamara
22e5d8d701 localrepo: don't add deleted files to list of modified/added files (issue2761)
If a file is deleted (rm, not 'hg rm') from the working dir
an attempt to run 'hg diff -r X', with the file being present in X will
cause an abort.

We didn't check if the file has been deleted from the working dir
and later on tried to open it to compare with the one from X, causing the abort.

This fix adds that check. Consequently, no output will be returned.
2011-04-11 21:44:22 +03:00
Matt Mackall
430e769c2b tests: various fixes for new unified test pattern format 2010-09-22 18:20:47 -05:00
Matt Mackall
5d9fc42983 tests: drop a bunch of sed calls from unified tests 2010-09-21 16:44:13 -05:00
Adrian Buehlmann
a8ea57a0d0 tests: unify some of test-mq* 2010-09-19 23:42:18 +02:00