~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/db_printlog/dbname.awk

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id$
2
 
#
3
 
# Take a comma-separated list of database names and spit out all the
4
 
# log records that affect those databases.
5
 
 
6
 
NR == 1 {
7
 
        nfiles = 0
8
 
        while ((ndx = index(DBNAME, ",")) != 0) {
9
 
                filenames[nfiles] = substr(DBNAME, 1, ndx - 1) 0;
10
 
                DBNAME = substr(DBNAME, ndx + 1, length(DBNAME) - ndx);
11
 
                files[nfiles] = -1
12
 
                nfiles++
13
 
        }
14
 
        filenames[nfiles] = DBNAME 0;
15
 
        files[nfiles] = -1
16
 
        myfile = -1;
17
 
}
18
 
 
19
 
/^\[.*dbreg_register/ {
20
 
        register = 1;
21
 
}
22
 
/opcode:/ {
23
 
        if (register == 1) {
24
 
                if ($2 == 1)
25
 
                        register = 3;
26
 
                else
27
 
                        register = $2;
28
 
        }
29
 
}
30
 
/name:/ {
31
 
        if (register >= 2) {
32
 
                for (i = 0; i <= nfiles; i++) {
33
 
                        if ($2 == filenames[i]) {
34
 
                                if (register == 2) {
35
 
                                        printme = 0;
36
 
                                        myfile = -1;
37
 
                                        files[i] = -1;
38
 
                                } else {
39
 
                                        myfile = i;
40
 
                                }
41
 
                                break;
42
 
                        }
43
 
                }
44
 
        }
45
 
        register = 0;
46
 
}
47
 
/fileid:/{
48
 
        if (myfile != -1) {
49
 
                files[myfile] = $2;
50
 
                printme = 1;
51
 
                register = 0;
52
 
                myfile = -1;
53
 
        } else
54
 
                for (i = 0; i <= nfiles; i++)
55
 
                        if ($2 == files[i]) {
56
 
                                printme = 1
57
 
                                break;
58
 
                        }
59
 
}
60
 
 
61
 
/^\[/{
62
 
        if (printme == 1) {
63
 
                printf("%s\n", rec);
64
 
                printme = 0
65
 
        }
66
 
        rec = "";
67
 
 
68
 
        rec = $0
69
 
}
70
 
 
71
 
TXN == 1 && /txn_regop/ {printme = 1}
72
 
/^      /{
73
 
        rec = sprintf("%s\n%s", rec, $0);
74
 
}
75
 
 
76
 
END {
77
 
        if (printme == 1)
78
 
                printf("%s\n", rec);
79
 
}