/[soft]/mga-gnome/trunk/mga-gnome
ViewVC logotype

Diff of /mga-gnome/trunk/mga-gnome

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3082 by ovitters, Sun Feb 26 20:12:05 2012 UTC revision 3083 by ovitters, Sun Feb 26 20:21:16 2012 UTC
# Line 326  class Patch(object): Line 326  class Patch(object):
326      @property      @property
327      def svn_author(self):      def svn_author(self):
328          if not hasattr(self, '_svn_author'):          if not hasattr(self, '_svn_author'):
329              p = subprocess.Popen(['svn', 'log', '-q', "--", self.path], stdout=subprocess.PIPE, close_fds=True)              try:
330              contents = p.stdout.read().strip("\n").splitlines()                  contents = subprocess.check_output(['svn', 'log', '-q', "--", self.path], close_fds=True).strip("\n").splitlines()
331              ecode = p.wait()  
             if ecode == 0:  
332                  for line in contents:                  for line in contents:
333                      if ' | ' not in line:                      if ' | ' not in line:
334                          continue                          continue
# Line 337  class Patch(object): Line 336  class Patch(object):
336                      fields = line.split(' | ')                      fields = line.split(' | ')
337                      if len(fields) >= 3:                      if len(fields) >= 3:
338                          self._svn_author = fields[1]                          self._svn_author = fields[1]
339                except subprocess.CalledProcessError:
340                    pass
341    
342          if not hasattr(self, '_svn_author'):          if not hasattr(self, '_svn_author'):
343              return None              return None
# Line 363  def get_upstream_names(): Line 364  def get_upstream_names():
364  def get_downstream_names():  def get_downstream_names():
365      re_file = re.compile(r'^(?P<module>.*?)[_-](?:(?P<oldversion>([0-9]+[\.])*[0-9]+)-)?(?P<version>([0-9]+[\.\-])*[0-9]+)\.(?P<format>(?:tar\.|diff\.)?[a-z][a-z0-9]*)$')      re_file = re.compile(r'^(?P<module>.*?)[_-](?:(?P<oldversion>([0-9]+[\.])*[0-9]+)-)?(?P<version>([0-9]+[\.\-])*[0-9]+)\.(?P<format>(?:tar\.|diff\.)?[a-z][a-z0-9]*)$')
366    
367      p = subprocess.Popen(['urpmf', '--files', '.', "--media", MEDIA], stdout=subprocess.PIPE, close_fds=True)      contents = subprocess.check_output(['urpmf', '--files', '.', "--media", MEDIA], close_fds=True).strip("\n").splitlines()
     contents = p.stdout.read().strip("\n").splitlines()  
     ecode = p.wait()  
     if ecode != 0:  
         sys.exit(1)  
368    
369      FILES = {}      FILES = {}
370      TARBALLS = {}      TARBALLS = {}
# Line 420  def cmd_ls(options, parser): Line 417  def cmd_ls(options, parser):
417    
418      matches = upstream & set(downstream.keys())      matches = upstream & set(downstream.keys())
419      for module in matches:      for module in matches:
420          print "\n".join(downstream[module])          print "\n".join(sorted(downstream[module]))
421    
422  def cmd_patches(options, parser):  def cmd_patches(options, parser):
423      upstream = get_upstream_names()      upstream = get_upstream_names()

Legend:
Removed from v.3082  
changed lines
  Added in v.3083

  ViewVC Help
Powered by ViewVC 1.1.30