Jump to content


fstat -F (filter)

fstat

  • Please log in to reply
6 replies to this topic

#1 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 12 May 2015 - 12:52 AM

I want to find the files that are out-of-sync in a pending changelist.  I tried this:
p4 fstat -F "^(headRev=haveRev)" -Rco -e <pending cl #>

But the headRev=haveRev does not work.

Ideas?

#2 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 12 May 2015 - 04:52 AM

This seems to do the trick:

p4 fstat -Ro -e <pending change> "#>have,#head"


#3 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 12 May 2015 - 02:36 PM

Did not work for me:
F:\EAOS_SB\shalliday>p4 fstat -Rco -e 1050474 "#>have,#head"
Too many rows scanned (over 5000000); see 'p4 help maxscanrows'.

Also, where is #>have documented??  I don't see it on: http://www.perforce..../filespecs.html

#4 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 12 May 2015 - 02:43 PM

OK, I did get it to kind of work by limiting the file spec (//EAOS_SB/...#>have,#head), but I don't understand why I would need to do that if I used the -e option?  Why is it scanning so many rows?  Shouldn't it be limited to the items in the pending changelist?  Limiting the file spec is not going to work in our case because it could be any file in the depot that is checked out.  Also, it is really fast to see all the items in a change list if I just use -e <num> ... so clearly it does not always scan all the rows and does use the -e to limit the search.

#5 P4Sam

P4Sam

    Advanced Member

  • Members
  • PipPipPip
  • 484 posts
  • LocationSan Francisco, CA

Posted 12 May 2015 - 04:36 PM

I expect that when those two are combined it finds the #>have,#head list first and then applies the -e change filter to those results.  (The "#>have" is in "p4 help undoc" -- not a very common syntax but seemed like it might be useful here.)  It may be easier to just chain a couple of commands together rather than trying to get fstat to do everything in one shot:

p4 -F "files %depotFile%#>have,head" opened -c <pending change> | p4 -F %depotFile% -x - run


#6 shalliday

shalliday

    Member

  • Members
  • PipPip
  • 12 posts
  • LocationElectronic Arts Canada

Posted 12 May 2015 - 10:25 PM

I am actually using the P4API.NET and was doing this to help make the command faster.  We have a GUI where users can filter changelist items and one of the filters is "out-of-sync". I can easily filter the fstat results in code.  The goal was to quickly get updates even if there were 1000's of items in the changelist.  It seems like a simple thing to add to the server to support -F "^(haveRev=headRev)" or haveRev<headRev. I will add it on the feature request page :-)

I can get other updates quickly with other filters like -F "otherOpen > 0"

#7 Gurce

Gurce

    Member

  • Members
  • PipPip
  • 14 posts

Posted 06 November 2017 - 12:23 AM

I'll second this feature request, as I'd like this functionality too. @shalliday, do you have a link to this feature request? Just wanted to see if there was a means for me to up-vote it there.





Also tagged with one or more of these keywords: fstat

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users