Beispiel #1
0
 def __call__(self):
     options, args = self.parser.parse_args(sys.argv[2:])
     sources = self.develop.sources
     auto_checkout = self.develop.auto_checkout
     packages = self.get_packages(args,
                                  auto_checkout=options.auto_checkout,
                                  checked_out=options.checked_out,
                                  develop=options.develop)
     workingcopies = WorkingCopies(sources)
     for name in sorted(packages):
         source = sources[name]
         if options.status:
             if source.exists():
                 if not workingcopies.matches(source):
                     print "C",
                 else:
                     if name in auto_checkout:
                         print " ",
                     else:
                         print "~",
             else:
                 if name in auto_checkout:
                     print "!",
                 else:
                     print "#",
         if options.long:
             print "(%s)" % source['kind'], name, source['url']
         else:
             print name
Beispiel #2
0
 def __call__(self, args):
     sources = self.develop.sources
     auto_checkout = self.develop.auto_checkout
     packages = self.get_packages(getattr(args, 'package-regexp'),
                                  auto_checkout=args.auto_checkout,
                                  checked_out=args.checked_out,
                                  develop=args.develop)
     workingcopies = WorkingCopies(sources)
     for name in sorted(packages):
         source = sources[name]
         if args.status:
             if source.exists():
                 if not workingcopies.matches(source):
                     print "C",
                 else:
                     if name in auto_checkout:
                         print " ",
                     else:
                         print "~",
             else:
                 if name in auto_checkout:
                     print "!",
                 else:
                     print "#",
         if args.long:
             print "(%s)" % source['kind'], name, source['url']
         else:
             print name
Beispiel #3
0
 def __call__(self, args):
     sources = self.develop.sources
     auto_checkout = self.develop.auto_checkout
     packages = self.get_packages(getattr(args, 'package-regexp'),
                                  auto_checkout=args.auto_checkout,
                                  checked_out=args.checked_out,
                                  develop=args.develop)
     workingcopies = WorkingCopies(sources)
     for name in sorted(packages):
         source = sources[name]
         if args.status:
             if source.exists():
                 if not workingcopies.matches(source):
                     print "C",
                 else:
                     if name in auto_checkout:
                         print " ",
                     else:
                         print "~",
             else:
                 if name in auto_checkout:
                     print "!",
                 else:
                     print "#",
         if args.long:
             print "(%s)" % source['kind'], name, source['url']
         else:
             print name
Beispiel #4
0
 def __call__(self):
     options, args = self.parser.parse_args(sys.argv[2:])
     sources = self.develop.sources
     auto_checkout = self.develop.auto_checkout
     packages = set(self.get_packages(args))
     workingcopies = WorkingCopies(sources)
     for name in sorted(sources):
         if args and name not in packages:
             continue
         if options.auto_checkout and name not in auto_checkout:
             continue
         source = sources[name]
         if options.status:
             if os.path.exists(source["path"]):
                 if not workingcopies.matches(source):
                     print "C",
                 else:
                     if name in auto_checkout:
                         print " ",
                     else:
                         print "~",
             else:
                 if name in auto_checkout:
                     print "!",
                 else:
                     print "#",
         if options.long:
             print "(%s)" % source["kind"], name, source["url"]
         else:
             print name
Beispiel #5
0
 def __call__(self, args):
     auto_checkout = self.develop.auto_checkout
     develeggs = self.develop.develeggs
     packages = self.get_packages(getattr(args, 'package-regexp'),
                                  auto_checkout=args.auto_checkout,
                                  checked_out=args.checked_out,
                                  develop=args.develop)
     workingcopies = WorkingCopies(self.develop.sources)
     for name in sorted(packages):
         source = self.develop.sources[name]
         if not source.exists():
             if name in auto_checkout:
                 print "!", " ", name
             continue
         if not workingcopies.matches(source):
             print "C",
         else:
             if name in auto_checkout:
                 print " ",
             else:
                 print "~",
         if args.verbose:
             status, output = workingcopies.status(source, verbose=True)
         else:
             status = workingcopies.status(source)
         if status == 'clean':
             print " ",
         else:
             print "M",
         if self.develop.config.develop.get(name, name in auto_checkout):
             if name in develeggs:
                 print " ",
             else:
                 if source.get('egg', True):
                     print "A",
                 else:
                     print " ",
         else:
             if name not in develeggs:
                 if not source.get('egg', True):
                     print " ",
                 elif name in auto_checkout:
                     print "!",
                 else:
                     print "-",
             else:
                 if source.get('egg', True):
                     print "D",
                 else:
                     print " ",
         print name
         if args.verbose:
             output = output.strip()
             if output:
                 for line in output.split('\n'):
                     print "   ", line
                 print
Beispiel #6
0
 def __call__(self):
     options, args = self.parser.parse_args(sys.argv[2:])
     sources = self.develop.sources
     auto_checkout = self.develop.auto_checkout
     develeggs = self.develop.develeggs
     packages = set(self.get_packages(args))
     workingcopies = WorkingCopies(sources)
     for name in sorted(sources):
         if args and name not in packages:
             continue
         source = sources[name]
         path = source["path"]
         if not os.path.exists(path):
             if name in auto_checkout:
                 print "!", " ", name
             continue
         if not workingcopies.matches(source):
             print "C",
         else:
             if name in auto_checkout:
                 print " ",
             else:
                 print "~",
         if options.verbose:
             status, output = workingcopies.status(source, verbose=True)
         else:
             status = workingcopies.status(source)
         if status == "clean":
             print " ",
         else:
             print "M",
         if self.develop.config.develop.get(name, name in auto_checkout):
             if name in develeggs:
                 print " ",
             else:
                 print "A",
         else:
             if name not in develeggs:
                 if name in auto_checkout:
                     print "!",
                 else:
                     print "-",
             else:
                 print "D",
         print name
         if options.verbose:
             output = output.strip()
             if output:
                 for line in output.split("\n"):
                     print "   ", line
                 print
Beispiel #7
0
    def __call__(self, args):
        auto_checkout = self.develop.auto_checkout
        sources_dir = self.develop.sources_dir
        develeggs = self.develop.develeggs
        package_regexp = getattr(args, 'package-regexp')
        packages = self.get_packages(package_regexp,
                                     auto_checkout=args.auto_checkout,
                                     checked_out=args.checked_out,
                                     develop=args.develop)
        workingcopies = WorkingCopies(self.develop.sources)
        paths = []
        for name in sorted(packages):
            source = self.develop.sources[name]
            if not source.exists():
                if name in auto_checkout:
                    print "!", " ", name
                continue
            paths.append(source['path'])
            if not workingcopies.matches(source):
                print "C",
            else:
                if name in auto_checkout:
                    print " ",
                else:
                    print "~",
            if args.verbose:
                status, output = workingcopies.status(source, verbose=True)
            else:
                status = workingcopies.status(source)
            if status == 'clean':
                print " ",
            else:
                print "M",
            if self.develop.config.develop.get(name, name in auto_checkout):
                if name in develeggs:
                    print " ",
                else:
                    if source.get('egg', True):
                        print "A",
                    else:
                        print " ",
            else:
                if name not in develeggs:
                    if not source.get('egg', True):
                        print " ",
                    elif name in auto_checkout:
                        print "!",
                    else:
                        print "-",
                else:
                    if source.get('egg', True):
                        print "D",
                    else:
                        print " ",
            print name
            if args.verbose:
                output = output.strip()
                if output:
                    for line in output.split('\n'):
                        print "   ", line
                    print

        # Only report on unknown entries when we have no package regexp.
        if not package_regexp:
            for entry in os.listdir(sources_dir):
                if not os.path.join(sources_dir, entry) in paths:
                    print '?', ' ', entry
Beispiel #8
0
    def __call__(self, args):
        auto_checkout = self.develop.auto_checkout
        sources_dir = self.develop.sources_dir
        develeggs = self.develop.develeggs
        package_regexp = getattr(args, 'package-regexp')
        packages = self.get_packages(package_regexp,
                                     auto_checkout=args.auto_checkout,
                                     checked_out=args.checked_out,
                                     develop=args.develop)
        workingcopies = WorkingCopies(self.develop.sources)
        paths = []
        for name in sorted(packages):
            source = self.develop.sources[name]
            if not source.exists():
                if name in auto_checkout:
                    print "!", " ", name
                continue
            paths.append(source['path'])
            if not workingcopies.matches(source):
                print "C",
            else:
                if name in auto_checkout:
                    print " ",
                else:
                    print "~",
            if args.verbose:
                status, output = workingcopies.status(source, verbose=True)
            else:
                status = workingcopies.status(source)
            if status == 'clean':
                print " ",
            else:
                print "M",
            if self.develop.config.develop.get(name, name in auto_checkout):
                if name in develeggs:
                    print " ",
                else:
                    if source.get('egg', True):
                        print "A",
                    else:
                        print " ",
            else:
                if name not in develeggs:
                    if not source.get('egg', True):
                        print " ",
                    elif name in auto_checkout:
                        print "!",
                    else:
                        print "-",
                else:
                    if source.get('egg', True):
                        print "D",
                    else:
                        print " ",
            print name
            if args.verbose:
                output = output.strip()
                if output:
                    for line in output.split('\n'):
                        print "   ", line
                    print

        # Only report on unknown entries when we have no package regexp.
        if not package_regexp:
            for entry in os.listdir(sources_dir):
                if not os.path.join(sources_dir, entry) in paths:
                    print '?', ' ', entry