tests/test-journal-exists.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sun, 01 Nov 2015 08:38:56 +0900
branchstable
changeset 26838 47dd34f2e727
parent 21274 3b4c75690206
child 39489 f1186c292d03
permissions -rw-r--r--
i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up Since 44cc9f63a2f1, deprecated commands, options and so on are detected by "(DEPRECATED)" instead of "DEPRECATED". "hg.pot" generated from recent source files doesn't contain msgid "DEPRECATED", and looking the translation of "DEPRECATED" up in up-to-date *.po files works incorrectly. But on the other hand, there are still old *.po files, which contain msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of "(DEPRECATED)" up in such old *.po files also works incorrectly. This patch resolves this problem by looking translation of both "DEPRECATED" and "(DEPRECATED)" up. This should work correctly, because previous patch makes "deprecated" checker be applied only on translations, of which msgid contains exact "(DEPRECATED)" string. 'p.msgstr' examination in 'deprecatedsetup()' is needed to ignore untranslated entries. This also makes 'deprecatedpe.msgstr' examination in 'deprecated()' meaningless.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     1
  $ hg init
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     2
  $ echo a > a
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     3
  $ hg ci -Am0
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     4
  adding a
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     6
  $ hg -q clone . foo
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     7
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
     8
  $ touch .hg/store/journal
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    10
  $ echo foo > a
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    11
  $ hg ci -Am0
21274
3b4c75690206 journal: set Abort hint when failing due to an abandoned transaction
Johan Bjork <jbjoerk@gmail.com>
parents: 20008
diff changeset
    12
  abort: abandoned transaction found!
3b4c75690206 journal: set Abort hint when failing due to an abandoned transaction
Johan Bjork <jbjoerk@gmail.com>
parents: 20008
diff changeset
    13
  (run 'hg recover' to clean up transaction)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12205
diff changeset
    14
  [255]
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    16
  $ hg recover
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    17
  rolling back interrupted transaction
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    18
  checking changesets
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    19
  checking manifests
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    20
  crosschecking files in changesets and manifests
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    21
  checking files
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    22
  1 files, 1 changesets, 1 total revisions
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    24
Check that zero-size journals are correctly aborted:
9693
c40a1ee20aa5 transaction: always remove empty journal on abort
Sune Foldager <cryo@cyanite.org>
parents: 5867
diff changeset
    25
20008
e54a078153f7 tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents: 16959
diff changeset
    26
#if unix-permissions no-root
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    27
  $ hg bundle -qa repo.hg
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    28
  $ chmod -w foo/.hg/store/00changelog.i
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    29
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    30
  $ hg -R foo unbundle repo.hg
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    31
  adding changesets
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
    32
  abort: Permission denied: $TESTTMP/foo/.hg/store/.00changelog.i-* (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12205
diff changeset
    33
  [255]
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    34
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    35
  $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
16959
acba1281e064 test-journal-exists: use #if
Adrian Buehlmann <adrian@cadifra.com>
parents: 15443
diff changeset
    36
#endif
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
    37