Opened 7 years ago

Closed 2 years 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 Rev(s):
Wiki Page:

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 7 years ago by igloo

Type: bugtask

comment:2 Changed 7 years ago by igloo

Milestone: 6.12 branch6.12.3

comment:3 Changed 7 years ago by igloo

Milestone: 6.12.36.14.1
Priority: normallow

comment:4 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:5 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:6 Changed 5 years ago by igloo

Milestone: 7.2.17.4.1

comment:7 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: lowlowest

comment:8 Changed 4 years ago by igloo

Milestone: 7.6.17.6.2

comment:9 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:10 Changed 2 years ago by thomie

Component: CompilerTrac & Git
Milestone: 7.10.1
Resolution: duplicate
Status: newclosed
Type of failure: None/Unknown
Version: 6.10.4
Note: See TracTickets for help on using tickets.