Author: ai0867
Date: Fri Nov 11 17:01:56 2011
New Revision: 51954
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51954&view=rev
Log:
Add github authentication to wescamp.py
Modified:
trunk/data/tools/wesnoth/wescamp.py
Modified: trunk/data/tools/wesnoth/wescamp.py
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth/wescamp.py?rev=51954&r1=51953&r2=51954&view=diff
==============================================================================
--- trunk/data/tools/wesnoth/wescamp.py (original)
+++ trunk/data/tools/wesnoth/wescamp.py Fri Nov 11 17:01:56 2011
@@ -51,6 +51,7 @@
if __name__ == "__main__":
use_git = False
git_version = None
+ git_userpass = None
"""Download an addon from the server.
@@ -159,7 +160,7 @@
svn_dir + "/" + addon)
if use_git:
- github = libgithub.GitHub(svn_dir, git_version)
+ github = libgithub.GitHub(svn_dir, git_version,
userpass=git_userpass)
github.create_addon(addon)
else:
@@ -219,7 +220,7 @@
# update the wescamp checkout for the translation,
if use_git:
- addon_obj = libgithub.GitHub(wescamp, git_version).addon(addon)
+ addon_obj = libgithub.GitHub(wescamp, git_version,
userpass=git_userpass).addon(addon)
else:
svn = libsvn.SVN(wescamp + "/" + addon)
@@ -289,7 +290,7 @@
addon, svn_dir)
if use_git:
- addon_obj = libgithub.GitHub(svn_dir, git_version).addon(addon)
+ addon_obj = libgithub.GitHub(svn_dir, git_version,
userpass=git_userpass).addon(addon)
# Note: this is probably not implemented, as it would destroy a
repository, including the history.
addon_obj.erase()
@@ -356,6 +357,9 @@
action = "store_true",
help = "Use git instead of svn to interface with wescamp. "
+ "This is a temporary option for the conversion from berlios to
github.")
+
+ optionparser.add_option("-G", "--github-login",
+ help = "Username and password for github in the user:pass format")
options, args = optionparser.parse_args()
@@ -396,6 +400,7 @@
if(options.git):
use_git = True
+ git_userpass = options.github_login
if not wescamp:
logging.error("No wescamp checkout specified. Needed for git
usage.")
sys.exit(2)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits