Example #1
0
File: jobs.py Project: 159645/Linux
   def _rcsoperation(self, fichier, rev=''):
      """ Check-in ou check-out des fichiers. 
      """

      fop = rcsoperation(fichier)

      if fichier in self.todolist.cin:
         # check-in du fichier

         if not fop._checkin('initial check-in'):
            self.infob('[fic] %s check-in' % fichier) 
         else:
            self.errorb('[fic] %s check-in' % fichier)

      elif fichier in self.todolist.cout:
         # check-out du fichier

         if not fop._checkout(rev=rev):
            self.infob('[fic] %s check-out' % fichier)
     
            # on applique le template apres le check-out
            if fichier in self.todolist.template:
               self.infob('[fic] %s template' % fichier)
               fop._template()
         else:
            self.errorb('[fic] %s check-out' % fichier)
Example #2
0
 def __revlist(self):
    revlist = []
    if self.rcscontrolled:
       fop = rcsoperation(self.filename)
       revlist = fop.revs()
    return revlist
Example #3
0
   if cmds[0] == 'change':
      if conf.poste != 'admin':
         echo.errorb("[fic] impossible de modifier les fichiers sur ce poste.")
         sys.exit(1)

      cmds.remove(cmds[0])
      if len(cmds) < 2:
         echo.errorb("[fic] vous devez fournir un nom de fichier, et un commentaire.")
         usage()
      else:
         fichier = cmds[0]
         comment = ' '.join(cmds[1:])
         if fichier in conf.filelist and \
            fichier not in todo.skips:
            check.rcsoperation(fichier).change(comment)            
         else:
            echo.errorb("[fic] non pris en charge %s" % fichier)
            

   if cmds[0] == 'info':
      cmds.remove(cmds[0])

      if len(cmds) == 0:
         def show(f):
            print ('%-80s|%-10s|%-5s|%-5s|' % 
                  (f, todo.files[f]['rcscontrolled'],
                      todo.files[f]['rcsfirstrev'],
                      todo.files[f]['rcslastrev'],
                  ))
         print 105*'-'