Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 229033 | Differences between
and this patch

Collapse All | Expand All

(-)bin/repoman (-9 / +19 lines)
Lines 1737-1755 Link Here
1737
		mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
1744
		mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
1738
		myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
1745
		myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
1739
		bin_blob_pattern = re.compile("^-kb$")
1746
		bin_blob_pattern = re.compile("^-kb$")
1740
		bin_blobs = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
1747
		expansion = set(portage.cvstree.findoption(mycvstree, bin_blob_pattern,
1741
			recursive=1, basedir="./"))
1748
			recursive=1, basedir="./"))
1742
1749
1743
1750
1744
	if vcs == "svn":
1751
	if vcs == "svn":
1745
		svnstatus = os.popen("svn status").readlines()
1752
		svnstatus = os.popen("svn status").readlines()
1746
		mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
1753
		mychanged = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("M") ]
1747
		for manifest in [ file for file in mychanged if '/Manifest' in file ]:
1754
		mynew     = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
1748
			mychanged.remove(manifest)
1749
		mynew = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("A") ]
1750
		myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
1755
		myremoved = [ elem.rstrip()[7:] for elem in svnstatus if elem.startswith("D") ]
1751
		# no idea how to detect binaries in SVN
1756
		# in contrast to CVS, SVN expands nothing by default.
1752
		bin_blobs = []
1757
		# bin_blobs historically
1758
		# were just there to see what files need to be checked for
1759
		# keyword expansion, which is exactly what we do here, so
1760
		# slightly change the semantic meaning of "bin_blob"...  In the
1761
		# future we could store which keyword is expanded.
1762
		props = os.popen("svn propget -R svn:keywords").readlines()
1763
		expansion = [ prop.split("-")[0].strip() for prop in props ]
1753
1764
1754
	if vcs:
1765
	if vcs:
1755
		if not (mychanged or mynew or myremoved):
1766
		if not (mychanged or mynew or myremoved):
Lines 1769-1776 Link Here
1769
	headerstring = "'\$(Header|Id)"
1780
	headerstring = "'\$(Header|Id)"
1770
	headerstring += ".*\$'"
1781
	headerstring += ".*\$'"
1771
	for myfile in myupdates:
1782
	for myfile in myupdates:
1772
		if myfile in bin_blobs:
1783
		# for CVS, expansion contains files that are excluded from expansion
1784
		if vcs == "cvs" and myfile in expansion:
1773
			continue
1785
			continue
1786
		# for SVN, expansion contains files that are included in expansion
1787
		if vcs == "svn" and myfile not in expansion:
1788
			continue
1774
		myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
1789
		myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
1775
		if myout[0] == 0:
1790
		if myout[0] == 0:
1776
			myheaders.append(myfile)
1791
			myheaders.append(myfile)
Lines 1825-1830 Link Here
1825
1840
1826
	if myupdates or myremoved:
1841
	if myupdates or myremoved:
1827
		myfiles = myupdates + myremoved
1842
		myfiles = myupdates + myremoved
1843
		if not myheaders and "sign" not in repoman_settings.features:
1844
			myfiles += mymanifests
1828
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1845
		fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
1829
		mymsg = os.fdopen(fd, "w")
1846
		mymsg = os.fdopen(fd, "w")
1830
		mymsg.write(commitmessage)
1847
		mymsg.write(commitmessage)
Lines 1911-1918 Link Here
1911
			write_atomic(x, "".join(mylines))
1928
			write_atomic(x, "".join(mylines))
1912
1929
1913
	manifest_commit_required = True
1930
	manifest_commit_required = True
1914
	if myheaders or myupdates or myremoved or mynew:
1931
	if myupdates or myremoved or mynew:
1915
		myfiles=myheaders+myupdates+myremoved+mynew
1932
		myfiles=myupdates+myremoved+mynew
1916
		for x in range(len(myfiles)-1, -1, -1):
1933
		for x in range(len(myfiles)-1, -1, -1):
1917
			if myfiles[x].count("/") < 4-repolevel:
1934
			if myfiles[x].count("/") < 4-repolevel:
1918
				del myfiles[x]
1935
				del myfiles[x]

Return to bug 229033