[PATCH 2 of 4 accept-scripts] land: demonstrate bug that reviewers can't issue one of two acceptances

Augie Fackler raf at durin42.com
Wed Jun 12 00:52:23 EDT 2019


# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1560312726 14400
#      Wed Jun 12 00:12:06 2019 -0400
# Node ID 4ca38ec4124f43199bc03472af423af62cb72c31
# Parent  eaf44a303cf907051ec24a17c3b5899edcb44e8f
land: demonstrate bug that reviewers can't issue one of two acceptances

diff --git a/tests/test-land.t b/tests/test-land.t
--- a/tests/test-land.t
+++ b/tests/test-land.t
@@ -112,3 +112,76 @@ the destination repository.
   472110eab2fa3ee331c706b610596d9c40d00f01 alice alice bob
   6cfb447dff0e28177a4bc60d2a20f5d449f322ee alice alice bob
   0cccaca5797043d1bd484de71068c4e47384dc84 alice alice bob
+
+  $ cd ..
+  $ rm -r complexsrc complextgt
+  $ hg init complexsrc
+  $ hg init complextgt
+
+Another complicated case from the real world: repeated consecutive
+merges from stable into default. The first commit on default was
+pushed by a reviewer, not a full accepter. All revisions should land.
+
+  $ cd complexsrc
+  $ hg debugbuilddag '+2 :pubdefault . <2 @stable . :pubstable @default <2 /1 <2 @stable . @default /2 .'
+  $ hg push -r pubstable -r pubdefault ../complextgt
+  pushing to ../complextgt
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 0 changes to 0 files
+  $ hg log -G -T'{rev}:{node|shortest} {branch} {tags}\n' \
+  >   -r 'outgoing("../complextgt")'
+  o  7:eefd default tip
+  |
+  o    6:a500 default
+  |\
+  | o  5:0d90 stable
+  | |
+  | ~
+  o    4:ad91 default
+  |\
+  | ~
+  o  2:0124 default
+  |
+  ~
+  $ logpush 2 alice fred
+  $ echo `hg log -r 2 --template '{node}'` >> ../bob-accepted
+  $ for rev in `hg log -r 'not ::pubstable and not ::pubdefault - 2' -T'{rev}\n'` ; do
+  >   logpush $rev fred alice
+  >   echo `hg log -r $rev --template '{node}'` >> ../bob-accepted
+  > done
+  $ hg log -G -T'{rev}:{node|shortest} {branch} {tags} {extdata("reviewers")}\n'
+  o  7:eefd default tip alice bob
+  |
+  o    6:a500 default  alice bob
+  |\
+  | o  5:0d90 stable  alice bob
+  | |
+  o |  4:ad91 default  alice bob
+  |\|
+  | o  3:0acc stable pubstable
+  | |
+  o |  2:0124 default  fred bob
+  |/
+  o  1:66f7 default pubdefault
+  |
+  o  0:1ea7 default
+  
+  $ accepted
+  ad9193bbd7242c2bb6df4bb3cf71d0ce2e68457c alice bob
+  0d90bd0be154baaf1b9e9eb4906e031d2874ece2 alice bob
+  a500f39c86e6e58d237748a861d3a5567101bd48 alice bob
+  eefd39cebb36c0cbc653ebf033972850e44801fd alice bob
+BUG: we don't accept 1 reviewer and one accepter as being accepted.
+  $ blocker
+  01241442b3c2bf3211e593b549c655ea65b295e3 bob
+  $ land
+  $ hg log -G -T'{rev}:{node|shortest} {branch} {tags}\n' -R ../complextgt
+  o  2:0acc stable tip
+  |
+  o  1:66f7 default
+  |
+  o  0:1ea7 default
+  


More information about the Mercurial-devel mailing list