Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7012719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:17:33+00:00 2026-05-27T22:17:33+00:00

Using the p4java library from Perforce (http://kb.perforce.com/article/1086/p4java-api), I’m trying to find out what files

  • 0

Using the p4java library from Perforce (http://kb.perforce.com/article/1086/p4java-api), I’m trying to find out what files in a changelist are unresolved and need to be resolved before I can submit them.

IChangelist changelist = getServer().getChangelist(changelistId);
List<IFileSpec> changelistPendingFiles = changelist.getFiles(false);

In this List, I’m trying to figure out which IFileSpec still need to be resolved.

Something like this:

for (IFileSpec pendingFile : changelistPendingFiles) {
    // How to find out if pendingFile needs to be resolved?

    FileAction action = pendingFile.getAction();
    // The above results in "FileAction.EDIT",
    // but that doesn't tell me anything about the unresolved state

    // The "diffStatus" variable for this pendingFile is "pending"
    // The "howResolved" variable for this pendingFile is null
    // The "opStatus" variable for this pendingFile is VALID
}

Thanks for anything you can provide!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:17:33+00:00Added an answer on May 27, 2026 at 10:17 pm

    The comprehensive way is to run P4Java’s version of the fstat command, and check if the file needs resolving. Here’s a code sample (not guaranteed to be bulletproof) that works in a simple test case.

    List<IExtendedFileSpec> extfiles = server.getExtendedFiles(changelistPendingFiles,
        -1,
        -1,
        -1,
        new FileStatOutputOptions(false, false, false, false, false, true),
        null);
    
    for(IExtendedFileSpec extfile : extfiles) {        
        System.out.println(extfile.isUnresolved());
    }
    

    In the FileStatOutputOptions, I’m asking for information on files that are open and need resolving. The isUnresolved method should tell you what you want.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using jQuery, one can easily find out whether a particular element is visible using
Using Tsql, how can I find out when MS SQL server was installed?
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using Rails 3.2.0 with haml, sass and coffeescript: Basically I am trying to disable
Using the HTML5 File API I can get the Binary String representation of a
Using jQuery, how do I get the value from a textbox and then load

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.