[Zope-CVS] CVS: RepoUtils - adjustlinks.py:1.2
Ken Manheimer
klm at zope.com
Sat Dec 13 13:48:54 EST 2003
Update of /cvs-repository/RepoUtils
In directory cvs.zope.org:/tmp/cvs-serv4322
Modified Files:
adjustlinks.py
Log Message:
Refactored (minimally) for use as imported module from CVS (svn entry
point yet to be thought through).
=== RepoUtils/adjustlinks.py 1.1 => 1.2 ===
--- RepoUtils/adjustlinks.py:1.1 Sat Dec 13 12:40:28 2003
+++ RepoUtils/adjustlinks.py Sat Dec 13 13:48:54 2003
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
"""Adjust symlinks in the repository according to the repolinks recipe file.
The repolinks file is found in the CVSROOT of the repository, along with this
@@ -25,7 +23,10 @@
EMPTY_DIR = REPO_ROOT + "/CVSROOT/Emptydir"
-def main(argv=None):
+def cvs_adjustlinks(recipe_name=RECIPE_NAME, quiet=QUIET):
+ global RECIPE_NAME, QUIET
+ RECIPE_NAME = RECIPE_NAME
+ QUIET = quiet
lm = LinkManager()
lm.assess_existing_links()
lm.assert_map()
@@ -308,9 +309,3 @@
def warn(*args, **kw):
status = kw.get('status', "** Warning")
print "%s: %s" % (status, args[0] % args[1:])
-
-if __name__ == "__main__":
- print (" === %s run ===\n ...on commit of %s...\n"
- % (sys.argv[0], RECIPE_PATH))
- main(sys.argv)
- print "-- Done."
More information about the Zope-CVS
mailing list