Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: release-201303…
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (24 sloc) 0.793 kb
#! /usr/bin/env python2.6
# vi: expandtab ts=4 sw=4
# Takes a 'manifest' style file and outputs a sorted version, warning about
# any duplicates.
import os
import sys
files = {}
for line in sys.stdin.readlines():
line = line.strip()
if len(line) == 0 or line[0] == '#':
fields = line.split(' ')
if len(fields) < 2:
sys.stderr.write("WARNING: unexpected manifest line: '%s' (removing)\n" % line)
if fields[1] in files and not (
# Don't warn about same directory with identical properties.
fields[0] == 'd' and files[fields[1]] == line):
sys.stderr.write("WARNING: duplicate entry for '%s'\n" % fields[1])
files[fields[1]] = line
for key in sorted(files):
print files[key].rstrip(' ')
Jump to Line
Something went wrong with that request. Please try again.