History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CCNET-1209
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Kevin Boistis
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
CruiseControl .NET

Perforce source control client fails when view is in quotes

Created: 04/Aug/08 12:11 PM   Updated: 04/Aug/08 12:11 PM
Component/s: Source Control
Affects Version/s: None
Fix Version/s: None

Original Estimate: 1 hour Remaining Estimate: 1 hour Time Spent: Unknown


 Description  « Hide
The GenerateClientView method in ProcessP4Initializer#3.cs has a minor bug which does not allow for quotes in the view. Need to use Quotes for views that contain spaces.

The error is that is inserts at 2 if the view starts with a quote or not:
builder.Append(string.Format(" {0} {1}", viewLine, viewLine.Insert(2, client + "/")));

Updated methos to:
private string GenerateClientView(string[] view, string client)
{
StringBuilder builder = new StringBuilder();
foreach (string viewLine in view)
{
if (viewLine.StartsWith("//"))
builder.Append(string.Format(" {0} {1}", viewLine, viewLine.Insert(2, client + "/")));
else if (viewLine.StartsWith(@"""//"))
builder.Append(string.Format(" {0} {1}", viewLine, viewLine.Insert(3, client + "/")));

builder.Append("\n");
}
return builder.ToString();
}

 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.