def Execute(self, opt, args): if not args or len(args) > 2: self.Usage() self.out = _Coloring(self.manifest.globalConfig) self.printText = self.out.nofmt_printer('text') if opt.color: self.printProject = self.out.nofmt_printer('project', attr='bold') self.printAdded = self.out.nofmt_printer('green', fg='green', attr='bold') self.printRemoved = self.out.nofmt_printer('red', fg='red', attr='bold') self.printRevision = self.out.nofmt_printer('revision', fg='yellow') else: self.printProject = self.printAdded = self.printRemoved = self.printRevision = self.printText manifest1 = XmlManifest(self.manifest.repodir) manifest1.Override(args[0]) if len(args) == 1: manifest2 = self.manifest else: manifest2 = XmlManifest(self.manifest.repodir) manifest2.Override(args[1]) diff = manifest1.projectsDiff(manifest2) if opt.raw: self._printRawDiff(diff) else: self._printDiff(diff, color=opt.color)
def Execute(self, opt, args): self.out = _Coloring(self.manifest.globalConfig) self.printText = self.out.nofmt_printer("text") if opt.color: self.printProject = self.out.nofmt_printer("project", attr="bold") self.printAdded = self.out.nofmt_printer("green", fg="green", attr="bold") self.printRemoved = self.out.nofmt_printer("red", fg="red", attr="bold") self.printRevision = self.out.nofmt_printer("revision", fg="yellow") else: self.printProject = ( self.printAdded ) = self.printRemoved = self.printRevision = self.printText manifest1 = XmlManifest(self.manifest.repodir) manifest1.Override(args[0], load_local_manifests=False) if len(args) == 1: manifest2 = self.manifest else: manifest2 = XmlManifest(self.manifest.repodir) manifest2.Override(args[1], load_local_manifests=False) diff = manifest1.projectsDiff(manifest2) if opt.raw: self._printRawDiff(diff, pretty_format=opt.pretty_format) else: self._printDiff(diff, color=opt.color, pretty_format=opt.pretty_format)
def Execute(self, opt, args): if not args or len(args) > 2: self.Usage() self.out = _Coloring(self.manifest.globalConfig) self.printText = self.out.nofmt_printer('text') if opt.color: self.printProject = self.out.nofmt_printer('project', attr = 'bold') self.printAdded = self.out.nofmt_printer('green', fg = 'green', attr = 'bold') self.printRemoved = self.out.nofmt_printer('red', fg = 'red', attr = 'bold') self.printRevision = self.out.nofmt_printer('revision', fg = 'yellow') else: self.printProject = self.printAdded = self.printRemoved = self.printRevision = self.printText manifest1 = XmlManifest(self.manifest.repodir) manifest1.Override(args[0]) if len(args) == 1: manifest2 = self.manifest else: manifest2 = XmlManifest(self.manifest.repodir) manifest2.Override(args[1]) diff = manifest1.projectsDiff(manifest2) if opt.raw: self._printRawDiff(diff) else: self._printDiff(diff, color=opt.color)
def Execute(self, opt, args): self.out = _Coloring(self.manifest.globalConfig) self.printText = self.out.nofmt_printer('text') if opt.color: self.printProject = self.out.nofmt_printer('project', attr='bold') self.printAdded = self.out.nofmt_printer('green', fg='green', attr='bold') self.printRemoved = self.out.nofmt_printer('red', fg='red', attr='bold') self.printRevision = self.out.nofmt_printer('revision', fg='yellow') else: self.printProject = self.printAdded = self.printRemoved = self.printRevision = self.printText manifest1 = XmlManifest(self.manifest.repodir) manifest1.Override(args[0], load_local_manifests=False) if len(args) == 1: manifest2 = self.manifest else: manifest2 = XmlManifest(self.manifest.repodir) manifest2.Override(args[1], load_local_manifests=False) diff = manifest1.projectsDiff(manifest2) if opt.raw: self._printRawDiff(diff, pretty_format=opt.pretty_format) else: self._printDiff(diff, color=opt.color, pretty_format=opt.pretty_format)