Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 664a271

Browse files
committed
- 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
1 parent def9934 commit 664a271

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

Doc/tools/mksourcepkg

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,17 @@ Doc = os.path.dirname(tools)
3636
patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex")
3737

3838
quiet = 0
39-
rx = re.compile(r":ext:(?:[a-zA-Z0-9]+)@cvs\.([a-zA-Z0-9]+).sourceforge.net:"
39+
rx = re.compile(r":ext:(?:[a-zA-Z0-9]+@)?cvs\.([a-zA-Z0-9]+).sourceforge.net:"
4040
r"/cvsroot/\1")
4141

4242

4343
def main():
4444
global quiet
45+
anonymous = False
4546
try:
46-
opts, args = getopt.getopt(sys.argv[1:], "abgtzq",
47+
opts, args = getopt.getopt(sys.argv[1:], "Aabgtzq",
4748
["all", "bzip2", "gzip", "tools", "zip",
48-
"quiet"])
49+
"quiet", "anonymous"])
4950
except getopt.error, e:
5051
usage(warning=str(e))
5152
sys.exit(2)
@@ -69,6 +70,8 @@ def main():
6970
formats["bzip2"] = 1
7071
formats["gzip"] = 1
7172
formats["zip"] = 1
73+
elif opt in ("-A", "--anonymous"):
74+
anonymous = True
7275
if formats:
7376
# make order human-predictable
7477
formats = formats.keys()
@@ -88,7 +91,7 @@ def main():
8891
info = cvsinfo.RepositoryInfo(mydir)
8992
cvsroot = info.get_cvsroot()
9093
m = rx.match(cvsroot)
91-
if m:
94+
if m and anonymous:
9295
# If this is an authenticated SourceForge repository, convert to
9396
# anonymous usage for the export/checkout, since that avoids the
9497
# SSH overhead.

0 commit comments

Comments
 (0)