From 3e80c52166403ed00965cd311d86f154ba58a933 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Fri, 27 May 2011 03:23:35 +0000
Subject: [PATCH] Unbreak 'M' response.

---
 exec/load/cvslib.js | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/exec/load/cvslib.js b/exec/load/cvslib.js
index 638518e8c0..9144e7f105 100644
--- a/exec/load/cvslib.js
+++ b/exec/load/cvslib.js
@@ -169,6 +169,34 @@ CVS = new (function () {
 		return null;
 	}
 
+	this.log = function(dir, files, srv, root, user, pw) {
+		// Boilerplate...
+		if(srv)
+			this.CVSSERV = srv;
+		if(root)
+			this.CVSROOT = root;
+		if(user)
+			this.CVSUSER = user;
+		if(pw)
+			this.CVSPASS = pw;
+
+		this.verifyConnection();
+		while(dir.charAt(0)=='/')
+			dir=dir.substr(1);
+		while(dir.charAt(dir.length-1)=='/')
+			dir=dir.substr(0,dir.length-1);
+		this.protocol.Directory('.', this.CVSROOT+(dir.length?'/'+dir:''));
+		this.protocol.Entry('/'+file+'/'+curr_ver+'///');
+		this.protocol.Unchanged(file);
+		this.protocol.Argument(file);
+		this.protocol.update();
+		this.disconnect();
+		if(this.files[(dir.length?dir+'/':'')+file]) {
+			return this.files[(dir.length?dir+'/':'')+file].data;
+		}
+		return null;
+	}
+
 	/* verify that socket is connected to the server */
 	this.verifyConnection = function() {
 		if(!this.socket || !this.socket.is_connected) {
@@ -295,7 +323,7 @@ CVS = new (function () {
 					this.files[repofile].status=cmd[0];
 					break;
 				case 'M':
-					this.println(cmd[1]);
+					this.writeln(cmd[1]);
 					break;
 				case 'MT':
 					var m=split_cmd(cmd[1],2);
-- 
GitLab