~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to contrib/pwk

  • Committer: Martin Pool
  • Date: 2005-07-04 08:06:51 UTC
  • Revision ID: mbp@sourcefrog.net-20050704080651-6ecec49164359e48
- track pending-merges

- unit tests for this

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
PWK_ROOT='http://patchwork.ozlabs.org/bazaar-ng'
11
11
PWK_AUTH_ROOT='https://patchwork.ozlabs.org/bazaar-ng'
12
12
 
 
13
# bzr uses -p0 style; others use -p1
 
14
PATCH_OPTS='-p0'
 
15
 
13
16
usage() {
14
17
    cat <<EOF
15
18
usage: 
16
 
   pwk cat PATCH-ID       show the patch text
 
19
   pwk show PATCH-ID       show the patch text
17
20
   pwk try PATCH-ID        see if the patch applies cleanly
18
21
   pwk apply PATCH-ID      apply patch into current directory
19
22
EOF
39
42
    catpatch $2 | ${PAGER:-less}
40
43
    ;;
41
44
try)
42
 
    catpatch $2 | patch -p1 --dry-run
 
45
    catpatch $2 | patch -p0 --dry-run
43
46
    ;;
44
47
apply)
45
 
    catpatch $2 | patch -p1
 
48
    catpatch $2 | patch -p0
46
49
    ;;
47
50
*)
48
51
    usage
49
52
    exit 1
50
 
esac
 
53
esac
 
 
b'\\ No newline at end of file'