Opened 5 years ago

Closed 6 months ago

#3646 closed task (duplicate)

Enforce requirement that our repos contains a subset of upstream's patches

Reported by: igloo Owned by:
Priority: lowest Milestone:
Component: Trac & Git Version:
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #8251 Differential Revisions:

Description

Simon Marlow wrote this prehook script:

#!/bin/sh -e

# checkupstream.sh

# Only allow applying of patches that are also in this upstream repository:
UPSTREAM=$1

# echo DARCS_PATCHES_XML = $DARCS_PATCHES_XML

# Take $DARCS_PATCHES_XML and turn it into a list of patch hashes
# suitable for looping over.
hashes=`echo $DARCS_PATCHES_XML | sed 's|</patch>|</patch>\n|g' | sed -n
'/hash/p' | sed "s|^.*hash='\([^']*\)'.*$|\1|"`

# echo hashes: $hashes

# For each patch, try pulling the patch from the upstream repo.  If
# the patch is not upstream, then fail.
for p in $hashes; do
if darcs pull --match="hash $p" $UPSTREAM --xml --dry-run | grep "$p"
>/dev/null; then
      echo "Patch $p is upstream; ok"
  else
      echo "Patch $p is not upstream!"
      exit 1
  fi
done

exit 0

although this is not ideal, as what we really want is to abort the entire darcs-all push, not just the push to that repo. e.g. if you haven't pushed to the upstream Cabal repo yet, then you shouldn't push the accompanying patches to the ghc repo.

Change History (10)

comment:1 Changed 5 years ago by igloo

  • Type changed from bug to task

comment:2 Changed 5 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:3 Changed 5 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:4 Changed 4 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:5 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:9 Changed 9 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:10 Changed 6 months ago by thomie

  • Component changed from Compiler to Trac & Git
  • Milestone 7.10.1 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Type of failure set to None/Unknown
  • Version 6.10.4 deleted
Note: See TracTickets for help on using tickets.