diff fetch_command.py @ 234:33e885f5f86a

Add --username and --password options to all commands
author Daniel Tang <dytang@cs.purdue.edu>
date Mon, 06 Apr 2009 02:52:14 -0400
parents 7f20914e52e8
children c90cfa665b81
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -41,7 +41,9 @@ def fetch_revisions(ui, svn_url, hg_repo
                   ' of SWIG.\n')
         have_replay = False
     initializing_repo = False
-    svn = svnwrap.SubversionRepo(svn_url, username=merc_util.getuser())
+    user = opts.get('username', merc_util.getuser())
+    passwd = opts.get('password', '')
+    svn = svnwrap.SubversionRepo(svn_url, user, passwd)
     author_host = "@%s" % svn.uuid
     tag_locations = tag_locations.split(',')
     hg_editor = hg_delta_editor.HgChangeReceiver(hg_repo_path,