From 2a6c45f882f871862f7bf3ebb4e2ab8699114c5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20A=2E=20Holm?= Date: Fri, 13 Feb 2009 19:59:22 +0100 Subject: [PATCH] =?utf8?q?*=20/trunk/src/gpstools/Patch/suuid.patch=20=20?= =?utf8?q?=20Ny.=20Noe=20som=20kommer.=20M=C3=A5=20ordne=20andre=20ting=20?= =?utf8?q?f=C3=B8rst=20som=20har=20med=20de=20modulene=20=20=20=C3=A5=20gj?= =?utf8?q?=C3=B8re.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 6ae6ee40-fa00-11dd-ae44-0001805bf4b1 git-svn-id: svn+ssh://svnhost/utils@2899 ddca7c6a-6bd8-0310-abd8-a0f6a7c394c1 --- Patch/suuid.patch | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Patch/suuid.patch diff --git a/Patch/suuid.patch b/Patch/suuid.patch new file mode 100644 index 0000000..29e4bf3 --- /dev/null +++ b/Patch/suuid.patch @@ -0,0 +1,117 @@ +Index: addpoints +=================================================================== +--- addpoints (revision 2897) ++++ addpoints (working copy) +@@ -109,6 +109,93 @@ + system($exec_str); + } + } ++ if ($Opt{'type'} =~ /suuid/) { ++ if (open(FromFP, "<$Currfile")) { ++ while (my $Line = ) { ++ # Version description from suuid r2886 (04c64336-f744-11dd-bddd-000475e441b9): ++ # Version 1 (same as above, but with version field): ++ # 1 \t ++ # uuid \t ++ # curr_time \t ++ # tag \t ++ # comment \n ++ # Version 2 ++ # 2 \t ++ # uuid \t ++ # curr_time \t ++ # tag \t ++ # comment \t ++ # current_dir \n ++ # Version 3 ++ # 3 \t ++ # uuid \t ++ # curr_time \t ++ # tag \t ++ # comment \t ++ # current_dir \t ++ # username \n ++ ++ my %Data = (); ++ if ($Line =~ # Version 1 ++ /^ ++ (1)\t # version ++ (.*?)\t # uuid ++ (.*?)\t # date ++ (.*?)\t # tag ++ (.*?)\n # comment ++ /x ++ ) { ++ $Data{'version'} = $1; ++ $Data{'uuid'} = $2; ++ $Data{'date'} = $3; ++ $Data{'tag'} = $4; ++ $Data{'comment'} = $5; ++ } ++ elsif ($Line =~ # Version 2 ++ /^ ++ (2)\t # version ++ (.*?)\t # uuid ++ (.*?)\t # date ++ (.*?)\t # tag ++ (.*?)\n # comment ++ (.*?)\n # currdir ++ /x ++ ) { ++ $Data{'version'} = $1; ++ $Data{'uuid'} = $2; ++ $Data{'date'} = $3; ++ $Data{'tag'} = $4; ++ $Data{'comment'} = $5; ++ $Data{'currdir'} = $5; ++ } ++ elsif ($Line =~ # Version 3 ++ /^ ++ (3)\t # version ++ (.*?)\t # uuid ++ (.*?)\t # date ++ (.*?)\t # tag ++ (.*?)\n # comment ++ (.*?)\n # currdir ++ (.*?)\n # username ++ /x ++ ) { ++ $Data{'version'} = $1; ++ $Data{'uuid'} = $2; ++ $Data{'date'} = $3; ++ $Data{'tag'} = $4; ++ $Data{'comment'} = $5; ++ $Data{'currdir'} = $5; ++ $Data{'username'} = $5; ++ } ++ } ++ print( ++INSERT INTO suuid (version, suuid, date, tag, comment, currdir, username) VALUES ( ++ '$Data{'version'}', ++ close(FromFP); ++ } else { ++ warn("$progname: $Currfile: Cannot open file for read: $!\n"); ++ } ++ } + if ($Opt{'type'} =~ /track/) { + my $exec_str = + "gpst -o pgtab -d -rpt $Currfile | " . +Index: postgres/create_table.sql +=================================================================== +--- postgres/create_table.sql (revision 2897) ++++ postgres/create_table.sql (working copy) +@@ -81,3 +81,14 @@ + lastupdate timestamptz, + lastname timestamptz + ); ++ ++CREATE TABLE suuid ( ++ version smallint, ++ suuid uuid, ++ date timestamptz, ++ tag varchar, ++ comment varchar. ++ currdir varchar, ++ username varchar, ++ id serial ++); -- 2.11.4.GIT