cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# This program is free software; you can redistribute it and/or modify
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# it under the terms of the GNU General Public License version 2
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# as published by the Free Software Foundation.
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# This program is distributed in the hope that it will be useful,
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# but WITHOUT ANY WARRANTY; without even the implied warranty of
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# GNU General Public License for more details.
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# You should have received a copy of the GNU General Public License
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# along with this program; if not, write to the Free Software
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
87ab362234f761757d96ff1a758ab5c3bd85ed83Richard Lowe# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelsonCreate a wx-style active list on stdout based on a Mercurial
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelsonworkspace in support of webrev's Mercurial support.
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson# NB: This assumes the normal onbld directory structure
87ab362234f761757d96ff1a758ab5c3bd85ed83Richard Lowesys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib",
87ab362234f761757d96ff1a758ab5c3bd85ed83Richard Lowe# Allow running from the source tree, using the modules in the source tree
87ab362234f761757d96ff1a758ab5c3bd85ed83Richard Lowesys.path.insert(2, os.path.join(os.path.dirname(__file__), ".."))
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson sys.stderr.write("usage: %s [-p parent] -w workspace\n" %
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson sys.stderr.write("failed to open repository: %s\n" % e)
9a70fc3be3b1e966bf78825cdb8d509963a6f0a1Mark J. Nelson sys.stderr.write("could not open output file: %s\n" % e)
e6ccc173e1790aa96d62728631f62d5217d0188dEdward Pilatowicz if entry.is_renamed() or entry.is_copied():
9a70fc3be3b1e966bf78825cdb8d509963a6f0a1Mark J. Nelson fh.write("%s %s\n" % (entry.name, entry.parentname))
cdf0c1d55d9b3b6beaf994835440dfb01aef5cf0mjnelson # Strip blank lines.