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 6567011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:17:08+00:00 2026-05-25T14:17:08+00:00

I have a perforce shelf that’s CL 1000. It was shelved by someone else

  • 0

I have a perforce shelf that’s CL 1000. It was shelved by someone else at some unknown CL X.

I’m at CL 2000. I’d like to sync to whatever X is and unshelf 1000 so my code is exactly the same as when it was shelved. How do I do this?

  • 1 1 Answer
  • 1 View
  • 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-25T14:17:09+00:00Added an answer on May 25, 2026 at 2:17 pm

    Unfortunately, there’s no guarantee that their entire client workspace was synced to just one changelist when they shelved. In the extreme case, they could have synced each file at a different change number.

    That said, they were probably synced to one point in time, and you can extrapolate this from the revision numbers of the files in their shelf.

    $ p4 files @=1000
    //depot/foo/bar.txt#3 - edit change 1000 (text)
    //depot/baz/quux.c#5 - edit change 1000 (text)
    

    The revision numbers after the filenames indicate the revision of each shelved file that the user synced before opening them for edit.

    Then, you can run p4 files with each of the file paths and revisions to get change numbers:

    $ p4 files //depot/foo/bar.txt#3 //depot/baz/quux.c#5
    //depot/foo/bar.txt#3 - edit change 983 (text)
    //depot/baz/quux.c#5 - edit change 998 (text)
    

    Pick the largest of the change numbers from the second command, and try syncing your client to that.

    Caveats to the above

    Even if we assume they synced to a single point in time, the above isn’t foolproof. It only tells us they synced to a change after or including 998 and before 1000.

    Let’s say they synced to change 999. Their client workspace might have looked like this:

    $ p4 have
    //depot/an/otherfile#7 - /home/user/a/an/otherfile
    //depot/foo/bar.txt#3 - /home/user/a/foo/bar.txt
    //depot/baz/quux.c#5 - /home/user/a/baz/quux.c
    

    Let’s further say that it was change 999 that updated otherfile to revision 7, and that change 999 only contained otherfile.

    Since otherfile was never shelved, and the latest shelved revision above came from change 998, you can’t conclude based on the shelf whether the client workspace was synced to change 998 or change 999.

    The even bigger caveat is that this all falls apart if they synced different files to different change numbers, but usually people don’t do that.

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

Sidebar

Related Questions

I have a Perl app that runs some perforce operations, in the end I
In Perforce P4V, I'd like to do a search for all changelists that have
I have a project that's currently in a Perforce repository. Unfortunately, due to some
I have a parameterized job that uses the Perforce plugin and would like to
I have two perforce clients (client-a, client-b) that each contain about 40 file specs.
I have seen behaviour in Perforce that I am unable to explain. I took
I have made some changes in one perforce client, but haven't submitted them. I
I have a large source file in Perforce that has been split up into
I have a ruby script that does a few perforce operations (through the scripting
I would like to ask why Maven and Perforce settings have to be configured

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.