mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
- don't re-write a SourceForge authenticated CVS root into the
anonymous flavor unless the user asks for it on the command line - decompose SourceForge authenticated CVS roots correctly
This commit is contained in:
parent
def9934c91
commit
664a27133c
1 changed files with 7 additions and 4 deletions
|
|
@ -36,16 +36,17 @@ Doc = os.path.dirname(tools)
|
||||||
patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex")
|
patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex")
|
||||||
|
|
||||||
quiet = 0
|
quiet = 0
|
||||||
rx = re.compile(r":ext:(?:[a-zA-Z0-9]+)@cvs\.([a-zA-Z0-9]+).sourceforge.net:"
|
rx = re.compile(r":ext:(?:[a-zA-Z0-9]+@)?cvs\.([a-zA-Z0-9]+).sourceforge.net:"
|
||||||
r"/cvsroot/\1")
|
r"/cvsroot/\1")
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global quiet
|
global quiet
|
||||||
|
anonymous = False
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "abgtzq",
|
opts, args = getopt.getopt(sys.argv[1:], "Aabgtzq",
|
||||||
["all", "bzip2", "gzip", "tools", "zip",
|
["all", "bzip2", "gzip", "tools", "zip",
|
||||||
"quiet"])
|
"quiet", "anonymous"])
|
||||||
except getopt.error, e:
|
except getopt.error, e:
|
||||||
usage(warning=str(e))
|
usage(warning=str(e))
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
@ -69,6 +70,8 @@ def main():
|
||||||
formats["bzip2"] = 1
|
formats["bzip2"] = 1
|
||||||
formats["gzip"] = 1
|
formats["gzip"] = 1
|
||||||
formats["zip"] = 1
|
formats["zip"] = 1
|
||||||
|
elif opt in ("-A", "--anonymous"):
|
||||||
|
anonymous = True
|
||||||
if formats:
|
if formats:
|
||||||
# make order human-predictable
|
# make order human-predictable
|
||||||
formats = formats.keys()
|
formats = formats.keys()
|
||||||
|
|
@ -88,7 +91,7 @@ def main():
|
||||||
info = cvsinfo.RepositoryInfo(mydir)
|
info = cvsinfo.RepositoryInfo(mydir)
|
||||||
cvsroot = info.get_cvsroot()
|
cvsroot = info.get_cvsroot()
|
||||||
m = rx.match(cvsroot)
|
m = rx.match(cvsroot)
|
||||||
if m:
|
if m and anonymous:
|
||||||
# If this is an authenticated SourceForge repository, convert to
|
# If this is an authenticated SourceForge repository, convert to
|
||||||
# anonymous usage for the export/checkout, since that avoids the
|
# anonymous usage for the export/checkout, since that avoids the
|
||||||
# SSH overhead.
|
# SSH overhead.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue