[p4] PerForte (GVCS/Perforce) bug in P4ListCommand (with add)

DRees at Boldtech.com DRees at Boldtech.com
Mon Jan 28 20:15:58 PST 2002


Hi All (Axel CC'd),

I have converted the PerForte implementation at
http://www.sts.tu-harburg.de/~ax.wienberg/perforte/index.html to windows and
have it happily working (thanks to all who worked on it).

I am seeing one problem and wanted to see if it was due to the windows
implementation of p4 or just a minor oversight.

If a file is added it is listed in NetBeans as "missing". instead of "add".

I think this is because of a minor logic bug in the P4ListCommand, or
perhaps fstat is printing something different for me in windows (2K). When I
fstat a newly added file I get:

... depotFile
//BoldIP/Projects/ebf/source/java/com/boldtech/ebf/test2.txt.txt
... clientFile
d:\BoldIP\Projects\ebf\source\java\com\boldtech\ebf\test2.txt.txt

... action add
... change default


However, the P4CommandList code below first checks for a (non-existing)
haveRev entry and then ends up making it as "missing" instead of "add".

	if (haveRev == null) {
            if (headAction != null && headAction.equals("delete"))
                // ignore deleted files
                return;
	    fileStatus = "missing";
	} else {
	    if (action != null) {
		fileStatus = action;
		if (props.get(PROP_OUR_LOCK) != null) {
		    fileStatus += ",*locked*";
		}
		if (props.get(PROP_UNRESOLVED) != null) {
		    fileStatus += ",unresolved";
		}
	    } else {
		fileStatus = "have";
	    }
	}

I am thinking the first line just needs to be 
	if ( (haveRev == null) && !action.equals("add") ) {


Or is there some Windows difference here?

thanks,

d




This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, you should delete this message and are
hereby notified that any disclosure, copying, or distribution of this
message, or the taking of any action based on it, is strictly prohibited.



More information about the perforce-user mailing list