[Debian-l10n-commits] r1379 - in /pootle/trunk/debian: changelog patches/pootle_continue_after_po_failure.patch patches/pootle_get_pofiles_with_find.patch patches/pootle_ll_CC_languages.patch

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Wed Oct 1 21:09:25 UTC 2008


Author: nekral-guest
Date: Wed Oct  1 21:09:25 2008
New Revision: 1379

URL: http://svn.debian.org/wsvn/?sc=1&rev=1379
Log:
    + debian/patches/pootle_ll_CC_languages.patch: Updated for 1.2.0~rc1.
    + debian/patches/pootle_continue_after_po_failure.patch:  Updated for
      1.2.0~rc1.
    + debian/patches/pootle_get_pofiles_with_find.patch: Updated for
      1.2.0~rc1.

Modified:
    pootle/trunk/debian/changelog
    pootle/trunk/debian/patches/pootle_continue_after_po_failure.patch
    pootle/trunk/debian/patches/pootle_get_pofiles_with_find.patch
    pootle/trunk/debian/patches/pootle_ll_CC_languages.patch

Modified: pootle/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/changelog?rev=1379&op=diff
==============================================================================
--- pootle/trunk/debian/changelog (original)
+++ pootle/trunk/debian/changelog Wed Oct  1 21:09:25 2008
@@ -1,6 +1,11 @@
 pootle (1.2.0~rc1-1) experimental; urgency=low
 
   * (NOT RELEASED YET) New upstream release
+    + debian/patches/pootle_ll_CC_languages.patch: Updated for 1.2.0~rc1.
+    + debian/patches/pootle_continue_after_po_failure.patch:  Updated for
+      1.2.0~rc1.
+    + debian/patches/pootle_get_pofiles_with_find.patch: Updated for
+      1.2.0~rc1.
   * debian/control: Homepage field moved to the source package and set to the
     wiki index.
   * debian/control: Added fields Vcs-Svn and Vcs-Browser.

Modified: pootle/trunk/debian/patches/pootle_continue_after_po_failure.patch
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/patches/pootle_continue_after_po_failure.patch?rev=1379&op=diff
==============================================================================
--- pootle/trunk/debian/patches/pootle_continue_after_po_failure.patch (original)
+++ pootle/trunk/debian/patches/pootle_continue_after_po_failure.patch Wed Oct  1 21:09:25 2008
@@ -6,21 +6,21 @@
 --- pootle-1.0.1.orig/Pootle/pootlefile.py	2007-07-01 18:07:42.000000000 +0100
 +++ pootle-1.0.1/Pootle/pootlefile.py	2007-07-01 19:57:06.000000000 +0100
 @@ -460,6 +460,18 @@
-     # make sure encoding is reset so it is read from the file
-     self.encoding = None
-     self.units = []
-+    try:
-+      self._readpofile()
-+    except:
-+      import sys
-+      import traceback
-+      sys.stderr.write("Problem while reading %s.\n"%self.filename)
-+      traceback.print_exc()
-+      sys.stderr.write("\n")
-+      self.transunits = []
-+      self.statistics.classifyunits()
+       self.encoding = None
+       self.units = []
+       self._total = util.undefined
++      try:
++        self._readpofile()
++      except:
++        import sys
++        import traceback
++        sys.stderr.write("Problem while reading %s.\n"%self.filename)
++        traceback.print_exc()
++        sys.stderr.write("\n")
++        self.transunits = []
++        self.statistics.classifyunits()
 +
-+  def _readpofile(self):
-     pomtime, filecontents = self.lockedfile.getcontents()
-     # note: we rely on this not resetting the filename, which we set earlier, when given a string
-     self.parse(filecontents)
++    def _readpofile(self):
+       pomtime, filecontents = self.lockedfile.getcontents()
+       # note: we rely on this not resetting the filename, which we set earlier, when given a string
+       self.parse(filecontents)

Modified: pootle/trunk/debian/patches/pootle_get_pofiles_with_find.patch
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/patches/pootle_get_pofiles_with_find.patch?rev=1379&op=diff
==============================================================================
--- pootle/trunk/debian/patches/pootle_get_pofiles_with_find.patch (original)
+++ pootle/trunk/debian/patches/pootle_get_pofiles_with_find.patch Wed Oct  1 21:09:25 2008
@@ -15,14 +15,14 @@
        """adds the files to the set of files for this project"""
        basedirname = dirname.replace(podir, "", 1)
 @@ -493,7 +494,7 @@
-         if not os.path.exists(os.path.join(dirname, fname)):
-           print "file does not exist:", os.path.join(dirname, fname)
-           continue
+         # check that it actually exists (to avoid problems with broken symbolic
+         # links, for example)
+         fpath = os.path.join(basedirname, fname)
 -        if fname.endswith(os.extsep+poext):
 +        if fname.endswith(ext):
-           ponames.append(fname)
-       pofilenames.extend([os.path.join(basedirname, poname) for poname in ponames])
+           pofilenames.append(fpath)
  
+     def addgnufiles(podir, dirname, fnames):
 @@ -502,14 +503,20 @@
        basedirname = dirname.replace(podir, "", 1)
        while basedirname.startswith(os.sep):
@@ -31,12 +31,11 @@
        ponames = [fn for fn in fnames if fn.endswith(ext) and self.languagematch(languagecode, fn[:-len(ext)])]
        pofilenames.extend([os.path.join(basedirname, poname) for poname in ponames])
  
-     pofilenames = []
      podir = self.getpodir(languagecode, projectcode)
      if self.hasgnufiles(podir, languagecode) == "gnu":
 -      os.path.walk(podir, addgnufiles, podir)
 +      # if we can use find, it is much much faster:
-+      cmd = 'find %s \\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, languagecode, ext, languagecode, ext, languagecode, ext)
++      cmd = 'find %s/ \\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, languagecode, ext, languagecode, ext, languagecode, ext)
 +      fd = os.popen(cmd)
 +      pofilenames = [n[:-1] for n in fd.readlines()]
 +      if fd.close():
@@ -44,5 +43,5 @@
 +        pofilenames = []
 +        os.path.walk(podir, addgnufiles, podir)
      else:
-       os.path.walk(podir, addfiles, podir)
-     return pofilenames
+       pwd = os.path.abspath(os.curdir)
+       os.chdir(podir)

Modified: pootle/trunk/debian/patches/pootle_ll_CC_languages.patch
URL: http://svn.debian.org/wsvn/pootle/trunk/debian/patches/pootle_ll_CC_languages.patch?rev=1379&op=diff
==============================================================================
--- pootle/trunk/debian/patches/pootle_ll_CC_languages.patch (original)
+++ pootle/trunk/debian/patches/pootle_ll_CC_languages.patch Wed Oct  1 21:09:25 2008
@@ -14,23 +14,23 @@
        """adds the files to the set of files for this project"""
        basedirname = dirname.replace(podir, "", 1)
 @@ -494,6 +498,8 @@
-         if not os.path.exists(os.path.join(dirname, fname)):
-           print "file does not exist:", os.path.join(dirname, fname)
-           continue
+       for fname in fnames:
+         # check that it actually exists (to avoid problems with broken symbolic
+         # links, for example)
 +        if fname in excludepofiles:
 +          continue
+         fpath = os.path.join(basedirname, fname)
          if fname.endswith(ext):
-           ponames.append(fname)
-       pofilenames.extend([os.path.join(basedirname, poname) for poname in ponames])
+           pofilenames.append(fpath)
 @@ -510,7 +516,10 @@
      podir = self.getpodir(languagecode, projectcode)
      if self.hasgnufiles(podir, languagecode) == "gnu":
        # if we can use find, it is much much faster:
--      cmd = 'find %s \\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, languagecode, ext, languagecode, ext, languagecode, ext)
+-      cmd = 'find %s/ \\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, languagecode, ext, languagecode, ext, languagecode, ext)
 +      excludestr = ""
 +      for l in excludepofiles:
 +        excludestr += "-name %s -o "%l
-+      cmd = 'find %s %s\\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, excludestr, languagecode, ext, languagecode, ext, languagecode, ext)
++      cmd = 'find %s/ %s\\( -name "%s%s" -o -name "%s_[A-Z][A-Z]%s" -o -name "%s_[A-Z][A-Z][A-Z]%s" \\) -printf "%%P\\n"'%(podir, excludestr, languagecode, ext, languagecode, ext, languagecode, ext)
        fd = os.popen(cmd)
        pofilenames = [n[:-1] for n in fd.readlines()]
        if fd.close():




More information about the Debian-l10n-commits mailing list