Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 62898
Collapse All | Expand All

(-)file_not_specified_in_diff (-10 / +40 lines)
Line 100 Link Here
100
			elif x in ["--tree"]:
101
				opts["tree"] = 1
Lines 127-132 Link Here
127
			for name in cnt:
129
			# it errors otherwise if --tree isn't specified
128
				print fileAsStr(name,
130
			if opts.has_key("tree"):
129
								cnt[name],
131
				sorted = cnt.keys()
130
								showType=opts["showType"],
132
				sorted.sort()
131
								showTimestamp=opts["showTimestamp"],
133
				last = []
132
								showMD5=opts["showMD5"])
134
				for package in sorted:
133
--
135
					c = package.split( "/" )[1:]
136
				        if cnt[package][0] == "dir":
137
				                if len( last ) == 0:
138
				                        last = c
139
				                        print green( " /" + c[0] )
140
				                        continue
141
				                numol = 0
142
				                for d in c:
143
				                        if d in last:
144
				                                numol = last.index( d ) + 1
145
				                                continue
146
				                        last = c
147
				                        if len( last ) == 1:
148
				                                print green( " /" + last[0] )
149
				                                continue
150
				                        print " " * ( numol * 3 ) + bold( "> " ) + green( "/" + last[-1] )
151
				        elif cnt[package][0] == "obj":
152
				                bl = len( last )
153
				                print " " * ( bl * 3 ) + bold( "> " ) + turquoise( c[-1] )
154
				        elif cnt[package][0] == "sym":
155
				                print " " * ( bl * 3 ) + bold( "> " ) + turquoise( c[-1] ) + bold( " -> " ) + turquoise( cnt[package][2] )
156
			else:
157
				for name in cnt:
158
					print fileAsStr(name,
159
									cnt[name],
160
									showType=opts["showType"],
161
									showTimestamp=opts["showTimestamp"],
162
									showMD5=opts["showMD5"])
Lines 145-146 Link Here
145
			   "  " + yellow("--md5sum") + "	 - append md5sum\n" + \
175
			   "  " + yellow("--md5sum") + "     - append md5sum\n" + \
146
			   "  " + yellow("--type") + "	   - prepend file type"			   
176
			   "  " + yellow("--type") + "       - prepend file type\n" + \
147
--
177
			   "  " + yellow("--tree") + "       - display results in a tree\n"
178

Return to bug 62898