diff -rN -u old-buildbot/buildbot/changes/monotone.py new-buildbot/buildbot/changes/monotone.py
--- old-buildbot/buildbot/changes/monotone.py	2008-10-06 20:41:07.000000000 -0500
+++ new-buildbot/buildbot/changes/monotone.py	2008-10-06 20:41:07.000000000 -0500
@@ -36,13 +36,16 @@
 class Monotone:
     """All methods of this class return a Deferred."""
 
-    def __init__(self, bin, db):
+    def __init__(self, bin, db, user):
         self.bin = bin
         self.db = db
+        self.user = user
 
     def _run_monotone(self, args):
         d = defer.Deferred()
         cmdline = (self.bin, "--db=" + self.db) + tuple(args)
+        if self.user:
+        	cmdline += ('-k'+self.user,)  #add user if provided, note comma at end to form tuple
         p = _MTProtocol(d, cmdline)
         log.msg("Running command: %r" % (cmdline,))
         log.msg("wd: %s" % os.getcwd())
@@ -137,14 +140,14 @@
     volatile = ["loop", "d", "tmpfile", "monotone"]
 
     def __init__(self, server_addr, branch, trusted_keys, db_path,
-                 pollinterval=60 * 10, monotone_exec="monotone"):
+                 pollinterval=60 * 10, monotone_exec="monotone",user=None):
         self.server_addr = server_addr
         self.branch = branch
         self.trusted_keys = trusted_keys
         self.db_path = db_path
         self.pollinterval = pollinterval
         self.monotone_exec = monotone_exec
-        self.monotone = Monotone(self.monotone_exec, self.db_path)
+        self.monotone = Monotone(self.monotone_exec, self.db_path, user)
 
     def startService(self):
         self.loop = LoopingCall(self.start_poll)
diff -rN -u old-buildbot/buildbot/slave/commands.py new-buildbot/buildbot/slave/commands.py
--- old-buildbot/buildbot/slave/commands.py	2008-10-06 20:41:07.000000000 -0500
+++ new-buildbot/buildbot/slave/commands.py	2008-10-06 20:41:07.000000000 -0500
@@ -1630,6 +1630,14 @@
 
     def setup(self, args):
         SourceBase.setup(self, args)
+        self.user = None
+        self.password = None
+        
+        #add username / pass support
+        if args.has_key('user'):
+        	self.user = args['user']
+        if args.has_key('password'):
+        	self.password = args['password']
         self.vcexe = getCommand("darcs")
         self.repourl = args['repourl']
         self.sourcedata = "%s\n" % self.repourl
@@ -1654,6 +1662,8 @@
                          sendRC=False, timeout=self.timeout)
         self.command = c
         return c.start()
+        if self.user:
+        	command.append('-k'+self.user)
 
     def doVCFull(self):
         # checkout or export
@@ -1668,6 +1678,8 @@
             f.close()
             # tell Darcs to use that context
             command.append('--context')
+        if self.user:
+        	command.append('-k'+self.user)
             command.append(n)
         command.append(self.repourl)
 
@@ -1689,6 +1701,8 @@
         c = ShellCommand(self.builder, command,
                          os.path.join(self.builder.basedir, self.srcdir),
                          environ=self.env,
+        if self.user:
+        	command.append('-k'+self.user)               
                          sendStdout=False, sendStderr=False, sendRC=False,
                          keepStdout=True)
         c.usePTY = False
@@ -1701,6 +1715,8 @@
 class Monotone(SourceBase):
     """Monotone-specific VC operation.  In addition to the arguments handled
     by SourceBase, this command reads the following keys:
+        if self.user:
+        	command.append('-k'+self.user)
 
     ['server_addr'] (required): the address of the server to pull from
     ['branch'] (required): the branch the revision is on
diff -rN -u old-buildbot/buildbot/steps/source.py new-buildbot/buildbot/steps/source.py
--- old-buildbot/buildbot/steps/source.py	2008-10-06 20:41:06.000000000 -0500
+++ new-buildbot/buildbot/steps/source.py	2008-10-06 20:41:07.000000000 -0500
@@ -1050,7 +1050,7 @@
     name = "monotone"
 
     def __init__(self, server_addr, branch, db_path="monotone.db",
-                 monotone="monotone",
+                 monotone="monotone", user=None,
                  **kwargs):
         Source.__init__(self, **kwargs)
         self.addFactoryArguments(server_addr=server_addr,
@@ -1061,7 +1061,8 @@
         self.args.update({"server_addr": server_addr,
                           "branch": branch,
                           "db_path": db_path,
-                          "monotone": monotone})
+                          "monotone": monotone,
+                          "user":user})
 
     def computeSourceRevision(self, changes):
         if not changes:


