def check(self, checkdir, checkdir_relative, xpkg): """Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean """ try: myf = repoman_popen("svn status --depth=files --verbose " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[:1] == "?": continue if l[:7] == " >": # tree conflict, new in subversion 1.6 continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) try: myf = repoman_popen("svn status " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[0] == "A": l = l.rstrip().split(" ")[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def _scan(self, _reindex=None): """ VCS type scan function, looks for all detectable changes @param _reindex: ensure that the git index reflects the state on disk for files returned by git diff-index (this parameter is used in recursive calls and it's not intended to be used for any other reason) @type _reindex: bool """ # Automatically reindex for commit mode, but not for other modes # were the user might not want changes to be staged in the index. if _reindex is None and self.options.mode == "commit": _reindex = True with repoman_popen("git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: changed = f.readlines() self.changed = ["./" + elem[:-1] for elem in changed] del changed with repoman_popen("git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: new = f.readlines() self.new = ["./" + elem[:-1] for elem in new] del new with repoman_popen("git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: removed = f.readlines() self.removed = ["./" + elem[:-1] for elem in removed] del removed if _reindex and (self.changed or self.new or self.removed): self.update_index([], self.changed + self.new + self.removed) self._scan(_reindex=False)
def check_svn(self, checkdir, checkdir_relative, xpkg): try: myf = repoman_popen( "svn status --depth=files --verbose " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[:1] == "?": continue if l[:7] == ' >': # tree conflict, new in subversion 1.6 continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) try: myf = repoman_popen( "svn status " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[0] == "A": l = l.rstrip().split(' ')[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def check_svn(self, checkdir, checkdir_relative, xpkg): try: myf = repoman_popen("svn status --depth=files --verbose " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[:1] == "?": continue if l[:7] == ' >': # tree conflict, new in subversion 1.6 continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) try: myf = repoman_popen("svn status " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[0] == "A": l = l.rstrip().split(' ')[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def _vcs_unadded(self): myunadded = [] mydeleted = [] if self.vcs_settings.vcs == "cvs": try: myvcstree = portage.cvstree.getentries("./", recursive=1) myunadded = portage.cvstree.findunadded(myvcstree, recursive=1, basedir="./") except SystemExit: raise # TODO propagate this except: err("Error retrieving CVS tree; exiting.") if self.vcs_settings.vcs == "svn": try: with repoman_popen("svn status --no-ignore") as f: svnstatus = f.readlines() myunadded = [ "./" + elem.rstrip().split()[1] for elem in svnstatus if elem.startswith("?") or elem.startswith("I") ] except SystemExit: raise # TODO propagate this except: err("Error retrieving SVN info; exiting.") if self.vcs_settings.vcs == "git": # get list of files not under version control or missing myf = repoman_popen("git ls-files --others") myunadded = ["./" + elem[:-1] for elem in myf] myf.close() if self.vcs_settings.vcs == "bzr": try: with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() myunadded = [ "./" + elem.rstrip().split()[1].split('/')[-1:][0] for elem in bzrstatus if elem.startswith("?") or elem[0:2] == " D" ] except SystemExit: raise # TODO propagate this except: err("Error retrieving bzr info; exiting.") if self.vcs_settings.vcs == "hg": with repoman_popen("hg status --no-status --unknown .") as f: myunadded = f.readlines() myunadded = ["./" + elem.rstrip() for elem in myunadded] # Mercurial doesn't handle manually deleted files as removed from # the repository, so the user need to remove them before commit, # using "hg remove [FILES]" with repoman_popen("hg status --no-status --deleted .") as f: mydeleted = f.readlines() mydeleted = ["./" + elem.rstrip() for elem in mydeleted] return myunadded, mydeleted
def _vcs_unadded(self): myunadded = [] mydeleted = [] if self.vcs_settings.vcs == "cvs": try: myvcstree = portage.cvstree.getentries("./", recursive=1) myunadded = portage.cvstree.findunadded( myvcstree, recursive=1, basedir="./") except SystemExit: raise # TODO propagate this except: err("Error retrieving CVS tree; exiting.") if self.vcs_settings.vcs == "svn": try: with repoman_popen("svn status --no-ignore") as f: svnstatus = f.readlines() myunadded = [ "./" + elem.rstrip().split()[1] for elem in svnstatus if elem.startswith("?") or elem.startswith("I")] except SystemExit: raise # TODO propagate this except: err("Error retrieving SVN info; exiting.") if self.vcs_settings.vcs == "git": # get list of files not under version control or missing myf = repoman_popen("git ls-files --others") myunadded = ["./" + elem[:-1] for elem in myf] myf.close() if self.vcs_settings.vcs == "bzr": try: with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() myunadded = [ "./" + elem.rstrip().split()[1].split('/')[-1:][0] for elem in bzrstatus if elem.startswith("?") or elem[0:2] == " D"] except SystemExit: raise # TODO propagate this except: err("Error retrieving bzr info; exiting.") if self.vcs_settings.vcs == "hg": with repoman_popen("hg status --no-status --unknown .") as f: myunadded = f.readlines() myunadded = ["./" + elem.rstrip() for elem in myunadded] # Mercurial doesn't handle manually deleted files as removed from # the repository, so the user need to remove them before commit, # using "hg remove [FILES]" with repoman_popen("hg status --no-status --deleted .") as f: mydeleted = f.readlines() mydeleted = ["./" + elem.rstrip() for elem in mydeleted] return myunadded, mydeleted
def scan_hg(self): with repoman_popen("hg status --no-status --modified .") as f: changed = f.readlines() self.changed = ["./" + elem.rstrip() for elem in changed] with repoman_popen("hg status --no-status --added .") as f: new = f.readlines() self.new = ["./" + elem.rstrip() for elem in new] if self.options.if_modified == "y": with repoman_popen("hg status --no-status --removed .") as f: removed = f.readlines() self.removed = ["./" + elem.rstrip() for elem in removed] del changed, new, removed
def scan_hg(self): with repoman_popen("hg status --no-status --modified .") as f: changed = f.readlines() self.changed = ["./" + elem.rstrip() for elem in changed] with repoman_popen("hg status --no-status --added .") as f: new = f.readlines() self.new = ["./" + elem.rstrip() for elem in new] if self.options.if_modified == "y": with repoman_popen("hg status --no-status --removed .") as f: removed = f.readlines() self.removed = ["./" + elem.rstrip() for elem in removed] del removed del changed, new
def _get_changed_hg_(self, mydeleted): with repoman_popen("hg status --no-status --modified .") as f: mychanged = f.readlines() mychanged = ["./" + elem.rstrip() for elem in mychanged] with repoman_popen("hg status --no-status --added .") as f: mynew = f.readlines() mynew = ["./" + elem.rstrip() for elem in mynew] with repoman_popen("hg status --no-status --removed .") as f: myremoved = f.readlines() myremoved = ["./" + elem.rstrip() for elem in myremoved] no_expansion = set() expansion = {} return (mynew, mychanged, myremoved, no_expansion, expansion)
def _scan(self): '''VCS type scan function, looks for all detectable changes''' with repoman_popen("hg status --no-status --modified .") as f: changed = f.readlines() self.changed = ["./" + elem.rstrip() for elem in changed] del changed with repoman_popen("hg status --no-status --added .") as f: new = f.readlines() self.new = ["./" + elem.rstrip() for elem in new] del new with repoman_popen("hg status --no-status --removed .") as f: removed = f.readlines() self.removed = ["./" + elem.rstrip() for elem in removed] del removed
def _get_changed_git_(self, mydeleted): with repoman_popen("git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: mychanged = f.readlines() mychanged = ["./" + elem[:-1] for elem in mychanged] with repoman_popen("git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: mynew = f.readlines() mynew = ["./" + elem[:-1] for elem in mynew] with repoman_popen("git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: myremoved = f.readlines() myremoved = ["./" + elem[:-1] for elem in myremoved] no_expansion = set() expansion = {} return (mynew, mychanged, myremoved, no_expansion, expansion)
def _get_changed_bzr_(self, mydeleted): with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() mychanged = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and elem[1:2] == "M" ] mynew = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] in "NK" or elem[0:1] == "R") ] myremoved = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem.startswith("-") ] myremoved = [ "./" + elem.split()[-3:-2][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "K" or elem[0:1] == "R") ] # Bazaar expands nothing. no_expansion = set() expansion = {} return (mynew, mychanged, myremoved, no_expansion, expansion)
def unadded(self): '''VCS method of getting the unadded files in the repository''' if self._unadded is not None: return self._unadded with repoman_popen("hg status --no-status --unknown .") as f: unadded = f.readlines() self._unadded = ["./" + elem.rstrip() for elem in unadded] del unadded return self._unadded
def _scan(self): '''VCS type scan function, looks for all detectable changes''' with repoman_popen("git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: changed = f.readlines() self.changed = ["./" + elem[:-1] for elem in changed] del changed with repoman_popen("git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: new = f.readlines() self.new = ["./" + elem[:-1] for elem in new] del new with repoman_popen("git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: removed = f.readlines() self.removed = ["./" + elem[:-1] for elem in removed] del removed
def unadded(self): """VCS method of getting the unadded files in the repository""" if self._unadded is not None: return self._unadded # get list of files not under version control or missing with repoman_popen("git ls-files --others") as f: unadded = f.readlines() self._unadded = ["./" + elem[:-1] for elem in unadded] del unadded return self._unadded
def unadded(self): '''VCS method of getting the unadded files in the repository''' if self._unadded is not None: return self._unadded # get list of files not under version control or missing with repoman_popen("git ls-files --others") as f: unadded = f.readlines() self._unadded = ["./" + elem[:-1] for elem in unadded] del unadded return self._unadded
def _get_changed_git_(self, mydeleted): with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: mychanged = f.readlines() mychanged = ["./" + elem[:-1] for elem in mychanged] with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: mynew = f.readlines() mynew = ["./" + elem[:-1] for elem in mynew] with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: myremoved = f.readlines() myremoved = ["./" + elem[:-1] for elem in myremoved] no_expansion = set() expansion = {} return (mynew, mychanged, myremoved, no_expansion, expansion)
def scan_git(self): with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: changed = f.readlines() self.changed = ["./" + elem[:-1] for elem in changed] del changed with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: new = f.readlines() self.new = ["./" + elem[:-1] for elem in new] if self.options.if_modified == "y": with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: removed = f.readlines() self.removed = ["./" + elem[:-1] for elem in removed] del removed
def unadded(self): '''VCS method of getting the unadded files in the repository''' if self._unadded is not None: return self._unadded with repoman_popen("svn status --no-ignore") as f: svnstatus = f.readlines() self._unadded = [ "./" + elem.rstrip().split()[1] for elem in svnstatus if elem.startswith("?") or elem.startswith("I")] del svnstatus return self._unadded
def expansion(self): '''VCS method of getting the expanded keywords in the repository''' if self._expansion is not None: return self._expansion # Subversion expands keywords specified in svn:keywords properties. with repoman_popen("svn propget -R svn:keywords") as f: props = f.readlines() self._expansion = dict( ("./" + prop.split(" - ")[0], prop.split(" - ")[1].split()) for prop in props if " - " in prop) del props return self._expansion
def unadded(self): '''VCS method of getting the unadded files in the repository''' if self._unadded is not None: return self._unadded with repoman_popen("svn status --no-ignore") as f: svnstatus = f.readlines() self._unadded = [ "./" + elem.rstrip().split()[1] for elem in svnstatus if elem.startswith("?") or elem.startswith("I") ] del svnstatus return self._unadded
def deleted(self): '''VCS method of getting the deleted files in the repository''' if self._deleted is not None: return self._deleted # Mercurial doesn't handle manually deleted files as removed from # the repository, so the user need to remove them before commit, # using "hg remove [FILES]" with repoman_popen("hg status --no-status --deleted .") as f: deleted = f.readlines() self._deleted = ["./" + elem.rstrip() for elem in deleted] del deleted return self._deleted
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' try: myf = repoman_popen( "svn status --depth=files --verbose " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[:1] == "?": continue if l[:7] == ' >': # tree conflict, new in subversion 1.6 continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) try: myf = repoman_popen( "svn status " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[0] == "A": l = l.rstrip().split(' ')[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def _scan(self): '''VCS type scan function, looks for all detectable changes''' with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=M HEAD") as f: changed = f.readlines() self.changed = ["./" + elem[:-1] for elem in changed] del changed with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=A HEAD") as f: new = f.readlines() self.new = ["./" + elem[:-1] for elem in new] del new with repoman_popen( "git diff-index --name-only " "--relative --diff-filter=D HEAD") as f: removed = f.readlines() self.removed = ["./" + elem[:-1] for elem in removed] del removed
def _get_changed_svn_(self, mydeleted): with repoman_popen("svn status") as f: svnstatus = f.readlines() mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if (elem[:1] in "MR" or elem[1:2] in "M")] mynew = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A")] myremoved = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D")] # Subversion expands keywords specified in svn:keywords properties. with repoman_popen("svn propget -R svn:keywords") as f: props = f.readlines() expansion = dict( ("./" + prop.split(" - ")[0], prop.split(" - ")[1].split()) for prop in props if " - " in prop) no_expansion = set() return (mynew, mychanged, myremoved, no_expansion, expansion)
def _get_changed_svn_(self, mydeleted): with repoman_popen("svn status") as f: svnstatus = f.readlines() mychanged = [ "./" + elem.split()[-1:][0] for elem in svnstatus if (elem[:1] in "MR" or elem[1:2] in "M") ] mynew = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ] myremoved = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D") ] # Subversion expands keywords specified in svn:keywords properties. with repoman_popen("svn propget -R svn:keywords") as f: props = f.readlines() expansion = dict( ("./" + prop.split(" - ")[0], prop.split(" - ")[1].split()) for prop in props if " - " in prop) no_expansion = set() return (mynew, mychanged, myremoved, no_expansion, expansion)
def _scan(self): """VCS type scan function, looks for all detectable changes""" with repoman_popen("svn status") as f: svnstatus = f.readlines() self.changed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR" ] self.new = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A") ] self.removed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D") ]
def check_bzr(self, checkdir, checkdir_relative, xpkg): try: myf = repoman_popen("bzr ls -v --kind=file " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[1:2] == "?": continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the git status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' with repoman_popen("git ls-files --others %s" % (portage._shell_quote(checkdir_relative), )) as myf: for l in myf: if l[:-1][-7:] == ".ebuild": self.qatracker.add_error( "ebuild.notadded", os.path.join(xpkg, os.path.basename(l[:-1]))) return True
def check_bzr(self, checkdir, checkdir_relative, xpkg): try: myf = repoman_popen( "bzr ls -v --kind=file " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[1:2] == "?": continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def scan_bzr(self): with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() self.changed = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and elem[1:2] == "M"] self.new = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "NK" or elem[0:1] == "R")] if self.options.if_modified == "y": self.removed = [ "./" + elem.split()[-3:-2][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "K" or elem[0:1] == "R")]
def scan_svn(self): with repoman_popen("svn status") as f: svnstatus = f.readlines() self.changed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR"] self.new = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A")] if self.options.if_modified == "y": self.removed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D")]
def _scan(self): '''VCS type scan function, looks for all detectable changes''' with repoman_popen("svn status") as f: svnstatus = f.readlines() self.changed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem and elem[:1] in "MR"] self.new = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("A")] self.removed = [ "./" + elem.split()[-1:][0] for elem in svnstatus if elem.startswith("D")]
def _scan(self): '''VCS type scan function, looks for all detectable changes''' with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() self.changed = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and elem[1:2] == "M"] self.new = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "NK" or elem[0:1] == "R")] self.removed = [ "./" + elem.split()[-3:-2][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "K" or elem[0:1] == "R")] self.bzrstatus = bzrstatus
def check(self, checkdir, checkdir_relative, xpkg): """Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean """ myf = repoman_popen("hg status --no-status --unknown %s" % (portage._shell_quote(checkdir_relative), )) for l in myf: if l[:-1][-7:] == ".ebuild": self.qatracker.add_error( "ebuild.notadded", os.path.join(xpkg, os.path.basename(l[:-1]))) myf.close() return True
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the git status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' with repoman_popen( "git ls-files --others %s" % (portage._shell_quote(checkdir_relative),)) as myf: for l in myf: if l[:-1][-7:] == ".ebuild": self.qatracker.add_error( "ebuild.notadded", os.path.join(xpkg, os.path.basename(l[:-1]))) return True
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' myf = repoman_popen( "hg status --no-status --unknown %s" % (portage._shell_quote(checkdir_relative),)) for l in myf: if l[:-1][-7:] == ".ebuild": self.qatracker.add_error( "ebuild.notadded", os.path.join(xpkg, os.path.basename(l[:-1]))) myf.close() return True
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' try: myf = repoman_popen("bzr ls -v --kind=file " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[1:2] == "?": continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def _get_changed_bzr_(self, mydeleted): with repoman_popen("bzr status -S .") as f: bzrstatus = f.readlines() mychanged = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and elem[1:2] == "M"] mynew = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] in "NK" or elem[0:1] == "R")] myremoved = [ "./" + elem.split()[-1:][0].split('/')[-1:][0] for elem in bzrstatus if elem.startswith("-")] myremoved = [ "./" + elem.split()[-3:-2][0].split('/')[-1:][0] for elem in bzrstatus if elem and (elem[1:2] == "K" or elem[0:1] == "R")] # Bazaar expands nothing. no_expansion = set() expansion = {} return (mynew, mychanged, myremoved, no_expansion, expansion)
def check(self, checkdir, checkdir_relative, xpkg): '''Perform the svn status check @param checkdir: string of the directory being checked @param checkdir_relative: string of the relative directory being checked @param xpkg: string of the package being checked @returns: boolean ''' try: myf = repoman_popen( "bzr ls -v --kind=file " + portage._shell_quote(checkdir)) myl = myf.readlines() myf.close() except IOError: raise for l in myl: if l[1:2] == "?": continue l = l.split()[-1] if l[-7:] == ".ebuild": self.eadded.append(os.path.basename(l[:-7])) return True
def check_hg(self, checkdir, checkdir_relative, xpkg): myf = repoman_popen( "hg status --no-status --unknown %s" % (portage._shell_quote(checkdir_relative),)) self.post_git_hg(myf, xpkg)
def check_git(self, checkdir, checkdir_relative, xpkg): myf = repoman_popen("git ls-files --others %s" % (portage._shell_quote(checkdir_relative), )) self.post_git_hg(myf, xpkg)
def check_hg(self, checkdir, checkdir_relative, xpkg): myf = repoman_popen("hg status --no-status --unknown %s" % (portage._shell_quote(checkdir_relative), )) self.post_git_hg(myf, xpkg)
def check_git(self, checkdir, checkdir_relative, xpkg): myf = repoman_popen( "git ls-files --others %s" % (portage._shell_quote(checkdir_relative),)) self.post_git_hg(myf, xpkg)