Patchwork D1081: tests: add check in test-check-commit.t to verify releasenotes directives

login
register
mail settings
Submitter phabricator
Date Oct. 14, 2017, 8:42 p.m.
Message ID <differential-rev-PHID-DREV-3q5mlnuf5a4qgsm7djml-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24914/
State New
Headers show

Comments

phabricator - Oct. 14, 2017, 8:42 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I had some trouble getting this right in a recent change of mine, and
  also found that some of our commits since 4.3 don't work right, so
  let's bounce commits that get it wrong.

TEST PLAN
  made a commit with broken releasenotes directives, verified I
  got some failure output from test-check-commit.t. It's not the
  prettiest, but it'll do for now.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1081

AFFECTED FILES
  tests/test-check-commit.t

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 15, 2017, 3:48 a.m.
yuja requested changes to this revision.
yuja added a comment.
This revision now requires changes to proceed.


  It makes a file named "notes" in the repository because of cd $TESTDIR/...
  Perhaps we should send the output to > /dev/null.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1081

To: durin42, #hg-reviewers, indygreg, yuja
Cc: yuja, mercurial-devel
phabricator - Oct. 15, 2017, 4:45 a.m.
durin42 added a comment.


  In https://phab.mercurial-scm.org/D1081#18135, @yuja wrote:
  
  > It makes a file named "notes" in the repository because of cd $TESTDIR/...
  >  Perhaps we should send the output to > /dev/null.
  
  
  D'oh. Fixed in the revised version.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1081

To: durin42, #hg-reviewers, indygreg, yuja
Cc: yuja, mercurial-devel
phabricator - Oct. 15, 2017, 1:02 p.m.
yuja requested changes to this revision.
yuja added a comment.
This revision now requires changes to proceed.


  Looked good, but it appears that releasenotes requires fuzzywuzzy.
  
    +  abort: No module named fuzzywuzzy.fuzz!
  
  (on gcc112)
  
  Another problem is it doubles the execution time of test-check-commit.t
  and timed out on my laptop. Perhaps, we can move `hg releasenotes` out
  of the shell for-loop.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1081

To: durin42, #hg-reviewers, indygreg, yuja
Cc: yuja, mercurial-devel
phabricator - Oct. 17, 2017, 11:24 p.m.
pulkit requested changes to this revision.
pulkit added a comment.


  I have tweaked releasenotes to not error out in this case, rather show a warning only. So this patch is no longer applicable.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1081

To: durin42, #hg-reviewers, indygreg, yuja, pulkit
Cc: pulkit, yuja, mercurial-devel

Patch

diff --git a/tests/test-check-commit.t b/tests/test-check-commit.t
--- a/tests/test-check-commit.t
+++ b/tests/test-check-commit.t
@@ -17,6 +17,10 @@ 
   >        cat ${TESTTMP}/check-commit.out
   >        echo
   >   fi
+  >   testrepohg --config extensions.releasenotes= releasenotes -r $node notes
+  >   if [ $? -ne 0 ] ; then
+  >        echo "Revision $node has broken releasenotes declaration"
+  >   fi
   > done