Jump to content


Xcode 6.3 and perforce unlock script


  • Please log in to reply
10 replies to this topic

#1 NicoAD

NicoAD

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 04 May 2015 - 07:56 AM

Hello,

I m using this script to check out files in perforce with Xcode

http://answers.perfo...rticles/KB/2997

Since Xcode 6.3 , the script generates a freeze of 1-2 minutes when a file need to a checkout

@Perforce team : are you aware of it ? any suggestion to quick fix the issue.

Thanks,

Nicolas

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 06 May 2015 - 12:35 AM

Hello Nicolas,

Just to verify, are you using the script 'xcodeunlock.sh (for Xcode 5+)' with Xcode 6.3 version?

#3 NicoAD

NicoAD

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 06 May 2015 - 10:16 AM

Hello P4Shimada,

yes I am. me and other engineers here. all have the same issue.

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 06 May 2015 - 05:53 PM

Hi Nicolas,

Thanks for confirming. Sorry to hear you and other engineers are having issues with freezing when checking out. You may want to try Jaime Rios’ Perforce plugin for Xcode:

    https://swarm.worksh...eperforceplugin

It can be installed using Alcatraz too (conveniently served up via Git Fusion):

    http://alcatraz.io

I hope this helps.

#5 almo

almo

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 19 May 2015 - 02:06 PM

So... um... how do I download that project without clicking each file? The interface of the plugin project site is horrible.

EDIT:

Ok, forget it. I just used Alcatraz. Still I don't know how we're supposed to get a full project off the project site.

Further Edit:

I'm unable to get the plugin to work. Really annoyed Apple dropped P4 support. :(

#6 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 19 May 2015 - 05:51 PM

Sorry about the download experience there; the download module triggers on the branch name 'main'. You'll see a download button now to grab all the content.

Which version of Xcode are you using? I'll try to repro on my dev system.

#7 jaime_rios

jaime_rios

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 27 May 2015 - 06:17 PM

Hi Almo,
I'm also curious to know what is now working in the plugin.

What version of Xcode are you using?

Does the plugin appear under the "Source Control" menu?

If so, what part of the plugin is not working for you?

#8 Micha

Micha

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 10 July 2015 - 02:05 PM

I'm having the exact same issue. So I tried Jaime's plugin but I'm not happy with it: The p4 commands are only working on actual source files, not for the project files, plists, entitlements or xcassets folders. Furthermore it doesn't stop XCode from asking to unlock a file for each first change on an unchanged file. It's seriously interfering with my workflow.
I think the best bet is the shellscript-approach on the unlock-hook. I think I'll have to go tinker myself ..

#9 Dithermaster

Dithermaster

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 31 August 2015 - 08:16 PM

Based on this StackOverflow posting, I found a work-around for the Perforce check-out hang in Xcode 6.4 / 6.3: In xcodeunlock.sh change at line 27 change
fb=1
to
fb=0
.

This prevents the confirmation (or error) dialog from coming up, but also prevents the hang. My theory is that the hang is due to our proxy server, which could explain why more people in the world aren’t seeing this.

#10 rfdb

rfdb

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 19 February 2016 - 05:21 PM

I finally did some digging with this.  I personally wasn't seeing it with Xcode 6.1 or earlier versions, on OS X 10.11 or earlier.  But as soon as I started using Xcode 7.2, I see it. Switching back, 6.1 is still fine.

The work-around of setting "fb=0" means the script is skipping the "tell application...".  With feedback enabled, it hangs for much longer "to=10" seconds.  Seems to be 2 minutes for me.  With some logging, I see:

++ osascript -ss -e 'tell application "xcode" to display dialog "{...my depot file...} - opened for edit" with title "p4 edit Undo.cpp"  buttons {"OK"} default button 1 giving up after "10" '

+ OUTdlg='28:247: execution error: Xcode 7.2 got an error: AppleEvent timed out. (-1712)'


#11 rfdb

rfdb

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 19 February 2016 - 06:48 PM

One solution seems to be directly displaying the dialog, instead of telling Xcode to do so.
This works for me
osascript -e "display dialog (system attribute \"XC_RES\") buttons {\"OK\"} default button 1 giving up after (system attribute \"XC_TO\")"
where this doesn't
osascript -e "tell application \"xcode\" to display dialog (system attribute \"XC_RES\") buttons {\"OK\"} default button 1 giving up after (system attribute \"XC_TO\")"





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users