[viewvc-dev] [PATCH]: make-database --- allow database to be remote
"Philip M. Gollucci" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Organization | P6M7G8 Consulting |
| Message-ID | <4835F0B9.4060402__36570.0549017221$1211494657$gmane$org@p6m7g8.com> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hopefully the whitespace isn't mangled.....
diff -u make-database.orig make-database
- --- make-database.orig 2008-05-22 22:11:03.000000000 +0000
+++ make-database 2008-05-22 22:13:11.000000000 +0000
@@ -126,6 +126,10 @@
~ user = raw_input("MySQL User: ")
~ passwd = raw_input("MySQL Password: ")
~ dbase = raw_input("ViewVC Database Name [default: ViewVC]: ")
+ dhost = raw_input("ViewVC Database Host [default: localhost]: ")
+ if dhost:
+ dhost = "-h %s" % dhost
+
~ if not dbase:
~ dbase = "ViewVC"
@@ -133,12 +137,12 @@
~ if sys.platform == "win32":
~ # popen2.Popen3 is not provided on windows
- - cmd = "mysql --user=%s --password=%s" % (user, passwd)
+ cmd = "mysql --user=%s --password=%s %s " % (user, passwd, dhost)
~ mysql = os.popen(cmd, "w")
~ mysql.write(dscript)
~ status = mysql.close()
~ else:
- - cmd = "{ mysql --user=%s --password=%s ; } 2>&1" % (user, passwd)
+ cmd = "{ mysql --user=%s --password=%s %s ; } 2>&1" % (user, passwd, dhost)
~ pipes = popen2.Popen3(cmd)
~ pipes.tochild.write(dscript)
~ pipes.tochild.close()
- --
- ------------------------------------------------------------------------
Philip M. Gollucci ([email protected])
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C
Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFINfC5dbiP+9ubjBwRAoB2AJwOn13oUzwT2OWJIK41KuPSxfO8TwCfZ465
4LlzVYedwMjfXSwcHFxNhUk=
=HVQq
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]