[GHC] #3646: Enforce requirement that our repos contains a subset of upstream's patches

View: New views
2 Messages — Rating Filter:   Alert me  

[GHC] #3646: Enforce requirement that our repos contains a subset of upstream's patches

by GHC-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

#3646: Enforce requirement that our repos contains a subset of upstream's patches
-------------------------------+--------------------------------------------
  Reporter:  igloo             |          Owner:                  
      Type:  bug               |         Status:  new            
  Priority:  normal            |      Milestone:  6.12 branch    
 Component:  Compiler          |        Version:  6.10.4          
  Severity:  normal            |       Keywords:                  
Difficulty:  Unknown           |       Testcase:                  
        Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-------------------------------+--------------------------------------------
 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.

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3646>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@...
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Re: [GHC] #3646: Enforce requirement that our repos contains a subset of upstream's patches

by GHC-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

#3646: Enforce requirement that our repos contains a subset of upstream's patches
---------------------------------+------------------------------------------
    Reporter:  igloo             |        Owner:                  
        Type:  task              |       Status:  new            
    Priority:  normal            |    Milestone:  6.12 branch    
   Component:  Compiler          |      Version:  6.10.4          
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown        
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by igloo):

  * type:  bug => task

--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3646#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@...
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs