~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to debian/scripts/misc/retag

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
 
 
3
open(TAGS, "git tag -l |") or die "Could not get list of tags";
 
4
@tags = <TAGS>;
 
5
close(TAGS);
 
6
 
 
7
open(LOGS, "git log --pretty=short |") or die "ERROR: Calling git log";
 
8
my $commit = "";
 
9
 
 
10
while (<LOGS>) {
 
11
        my $origtag;
 
12
 
 
13
        if (m|^commit (.*)$|) {
 
14
                $commit = $1;
 
15
                next;
 
16
        }
 
17
 
 
18
        m|\s*UBUNTU: (Ubuntu-2\.6\..*)| or next;
 
19
 
 
20
        $tag = $1;
 
21
 
 
22
        ($origtag) = grep(/^$tag.orig$/, @tags);
 
23
 
 
24
        if (!defined($origtag)) {
 
25
                print "I: Adding original tag for $tag\n";
 
26
                system("git tag -m $tag $tag.orig $tag");
 
27
        }
 
28
 
 
29
        print "I: Tagging $tag => $commit\n";
 
30
 
 
31
        system("git tag -f -m $tag $tag $commit");
 
32
}
 
33
 
 
34
close(LOGS);