tests/test-check-setup-manifest.t
author Anton Shestakov <av6@dwimlabs.net>
Sat, 06 Apr 2019 15:49:22 +0200
changeset 4477 faf99d48eda9
parent 2116 39d84b395343
permissions -rw-r--r--
stack: fix phasecache._phasesets check logic When _phasesets is not None, it's a list, and it contains set()s of revisions in a specific phase, starting from public, draft, secret and so on. But since repos are supposed to have the majority of revisions in public phase, the first element of this list is not a (potentially huge) set, but None. Previously this code tried to check if there's any element that is None, and was always finding None at index 0, so the short path was executed every time and the rest of the function was never used.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2116
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
#require test-repo
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
  $ checkcm() {
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
  >   if ! (which check-manifest > /dev/null); then
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
  >     echo skipped: missing tool: check-manifest;
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
  >     exit 80;
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     7
  >   fi;
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
  > };
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     9
  $ checkcm
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
  $ cat << EOF >> $HGRCPATH
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
  > [experimental]
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
  > evolution=all
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
  > EOF
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
Run check manifest:
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
  $ cd $TESTDIR/..
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
  $ check-manifest
39d84b395343 checks: add a test that check MANIFEST.in content
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
  lists of files in version control and sdist match