File: edit.sh

package info (click to toggle)
cssc 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 11,368 kB
  • sloc: cpp: 39,446; ansic: 17,403; sh: 11,328; python: 3,923; makefile: 1,929; perl: 342; awk: 15; sed: 15
file content (49 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | download | duplicates (4)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh
# edit.sh:  Editing the last normal delta when the top delta
#           has been rmdel'ed -- this is what "sccs fix" does.

# Import common functions & definitions.
. ../common/test-common

g=testfile.txt
s=s.$g
z=z.$g
x=x.$g
p=p.$g

remove command.log log log.stdout log.stderr $g $s $z $x $p

remove $g
echo "hello, this is a test file" > $g

# Prepare an SCCS file with two revisions.
docommand a1 "${admin} -i${g} $s" 0 "" IGNORE
remove $g
docommand a2 "${get} -e $s" 0 "1.1\nnew delta 1.2\n1 lines\n" ""
docommand a3 "${delta} -yNoComment $s" 0 \
	"1.2\n0 inserted\n0 deleted\n1 unchanged\n"   \
    IGNORE

# Remove 1.2.
docommand a4 "${vg_rmdel} -r1.2 $s" 0 "" ""

# Now edit 1.1 and make sure that the new SID is 1.2.
docommand a5 "${get} -e $s" 0 "1.1\nnew delta 1.2\n1 lines\n" ""

# Make sure we can check it in too.
docommand a6 "${delta} -yNoComment $s" 0 \
	"1.2\n0 inserted\n0 deleted\n1 unchanged\n"   \
    IGNORE


# Do the same thing again, but in a new release.
docommand a7 "${get} -e -r2 $s" 0 "1.2\nnew delta 2.1\n1 lines\n" ""

# Make sure we can check it in too.
docommand a8 "${delta} -yNoComment $s" 0 \
	"2.1\n0 inserted\n0 deleted\n1 unchanged\n"   \
    IGNORE


remove command.log log log.stdout log.stderr $g $s $z $x $p
success