[haiku-commits] r35107 - haiku/trunk/3rdparty/qtcreator

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 16 Jan 2010 23:21:40 +0100 (CET)

Author: zooey
Date: 2010-01-16 23:21:39 +0100 (Sat, 16 Jan 2010)
New Revision: 35107
Changeset: http://dev.haiku-os.org/changeset/35107/haiku

Modified:
   haiku/trunk/3rdparty/qtcreator/create_project_files.pl
Log:
* improved create_project_files.pl to automatically add the created qt-creator 
  project files to svn:ignore


Modified: haiku/trunk/3rdparty/qtcreator/create_project_files.pl
===================================================================
--- haiku/trunk/3rdparty/qtcreator/create_project_files.pl      2010-01-16 
19:33:34 UTC (rev 35106)
+++ haiku/trunk/3rdparty/qtcreator/create_project_files.pl      2010-01-16 
22:21:39 UTC (rev 35107)
@@ -7,6 +7,8 @@
 
 This simple script traverses the haiku sources and creates (incomplete) *.pro
 files in order to make the haiku sources available within the qt-creator IDE.
+Additionally, it will add those files to svn:ignore of their parent directory
+(unless already contained there).
 
 =cut
 
@@ -81,4 +83,24 @@
                        "SOURCES = ".join(" \\\n\t", sort 
@{$info->{sources}})."\n";
        }
        close $proFileFH;
+       
+       updateSvnIgnore($proFile);
 }
+
+sub updateSvnIgnore
+{
+       my $proFile = shift;
+
+       my ($filename, $parentDir) = fileparse($proFile);
+
+       my $svnIgnore = qx{svn propget --strict svn:ignore $parentDir};
+       if (!grep { $_ eq $filename } split "\n", $svnIgnore) {
+               chomp $svnIgnore;
+               $svnIgnore .= "\n" unless !$svnIgnore;
+               $svnIgnore .= "$filename\n";
+               open(my $propsetFH, "|svn propset svn:ignore --file - 
$parentDir")
+                       or die "unable to open pipe to 'svn propset'";
+               print $propsetFH $svnIgnore;
+               close($propsetFH);
+       }
+}


Other related posts:

  • » [haiku-commits] r35107 - haiku/trunk/3rdparty/qtcreator - zooey