Jump to content


p4bill

Member Since 06 Sep 2011
Offline Last Active Yesterday, 02:01 PM
-----

Posts I've Made

In Topic: P4API.NET DepotType enum does not have an entry for Graph depot

25 June 2019 - 02:47 PM

Hello,

P4API.NET source can be found here:
http://ftp.perforce....19.1/bin.ntx86/

It is near the top of that list: p4api.net-src.zip

There is no public schedule for new releases, but I expect that 2019.2 will be out in early August.

Graph depots are currently not supported in P4V or P4Admin but I am told that they are on the product roadmap.

In Topic: P4API.NET connects to Perforce server via rsh protocol

25 June 2019 - 02:43 PM

Hello,

The link that you reference is showing me a page not found error. I have no familiarity with connecting via rsh. For this question, you are probably better off emailing support@perforce.com.

Have you tried connecting under the client's auth configuration? If setting P4PORT to the "rsh:..." you mention works for the P4 command line client, it may just work with P4API.NET by setting the same for _serverUri.

In Topic: P4API.NET DepotType enum does not have an entry for Graph depot

24 June 2019 - 02:59 PM

View Postlaurent_tr, on 21 June 2019 - 12:55 PM, said:

Hello,

Thank you for the update.

By chance, could you please verify that GetDepots() also returns Graph depots?
I have created via the command line p4 a Graph depot, which is visible via "p4 depots" with user having read permission on this depot.
However using GetDepots() with the same user never shows me the depot.

I have also tried to create my own method that sends "p4 depots -t graph":
public IList<Depot> GetDepots()
{
var options = new Options();
options["-t"] = "graph";
P4CommandResult p4CommandResult = new P4Command(this, "depots", true, new string[0]).Run((StringList) options);
if (p4CommandResult.Success)
{
if (p4CommandResult.TaggedOutput == null || p4CommandResult.TaggedOutput.Count <= 0)
	 return (IList<Depot>) null;
bool dst_mismatch = false;
string offset = string.Empty;
if (this.Server != null && this.Server.Metadata != null)
{
	 offset = this.Server.Metadata.DateTimeOffset;
	 dst_mismatch = FormBase.DSTMismatch(this.Server.Metadata);
}
List<Depot> depotList = new List<Depot>();
foreach (TaggedObject objectInfo in (List<TaggedObject>) p4CommandResult.TaggedOutput)
{
	 Depot depot = new Depot();
	 depot.FromDepotsCmdTaggedOutput(objectInfo, offset, dst_mismatch);
	 depotList.Add(depot);
}
return (IList<Depot>) depotList;
}
P4Exception.Throw(p4CommandResult.ErrorList);
return (IList<Depot>) null;
}

But the result is empty.

Thanks

Following up with Sam's suggestion, it does appear that the 'enableGraph' protocol needs to be set. This is a change required in P4API.NET. I'll log an issue and schedule it for the next release.

If you are building P4API.NET from the source distribution, you can make the required change in P4BridgeServer.cpp around lines 1035-1039 where other protocols are set:

pConnection->SetProtocol("specstring", "");
pConnection->SetProtocol("enableStreams", "");
pConnection->SetProtocol("enableGraph", "");
pConnection->SetProtocol("wingui", "999");
pConnection->SetProtocol("unicode", "");


In Topic: P4API.NET DepotType enum does not have an entry for Graph depot

21 June 2019 - 07:26 PM

Thanks Sam. Thought it might be a protocol, but did not see anything in the API doc. I'll pass along your doc posting request.

@laurent_tr, more info when I get it, but it looks like another issue to log for P4API.NET to set the enableGraph protocol.

In Topic: P4API.NET DepotType enum does not have an entry for Graph depot

21 June 2019 - 07:10 PM

Hello,

GetDepots() will not return Graph depots, even if they are added to the DepotType enum. I see that a Tangent server will be returned with GetDepots() but will be incorrectly shown as DepotType.Local. I am guessing that there is something different required when using the base P4API with Graph depots. Unfortunately, I am not at all familiar with them. I'd suggest contacting support for more help specific to Graph depot usage. I'll ask internally why p4 depots run in p4api.net does not return Graph depots.