File: cvsbackport

package info (click to toggle)
kde-dev-scripts 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,612 kB
  • sloc: perl: 15,615; lisp: 5,627; sh: 4,560; python: 3,892; ruby: 1,386; makefile: 13; sed: 9
file content (32 lines) | stat: -rwxr-xr-x 787 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Backport the last change in HEAD, to a branch.
# Usage: cvsbackport <files>
# WARNING: the branch tag is hardcoded into the script, make sure to check it!
#
# Initial author: Dirk Mueller
# Support for multiple command-line arguments: David Faure

BRANCH=KDE_3_4_BRANCH
echo "Backporting to $BRANCH"
TMPFILE=`mktemp cvsbackport.XXXXXX` || exit 1
files=$*
until test $# -eq 0; do

  echo "looking for last change to $1..."
  CVSLASTCHANGE_KEEP_WHITESPACE=1 cvslastchange $1 > $TMPFILE
  echo "browsing last change to $1..."
  less $TMPFILE
  cvs up -r$BRANCH $1
  patch < $TMPFILE
  rm -f $TMPFILE
  echo "showing diff for $1..."
  cvs diff $1 | less

  shift
done

echo "Press ENTER now to commit ($files) or Ctrl+C to abort"
read confirm

cvs commit $files
cvs up -A $files