Accurev - why file status is incorrect? - accurev

I have modified few files locally by windows copy command but when I saw the status of modified files in AccuRev it is still shown as backed. Eventhough the file is modified then why it show the status as backed.
Any clue?
Thanks,
Sanjiv

You copied a file into your workspace that has an older timestamp than the workspace scan threshold time.
If you turn off "Timestamp Optimization" and click refresh, the file will appear as modified.
Or if you run the command "accurev touch " and then hit refresh, the file will appear as modified.

Related

Bamboo plan using previous version of repo file.

I updated a resource file for a build, pushed the changes, verified they are updated in stash and ran my bamboo plan. The log shows that the contents of the file are the same as before the push. I checked the artifacts and see the correct version of the file there. I have not changed anything in Miscellaneous Tab (should I clean working directory after each build?).
Any suggestions would be welcome.

How to update workspace with a defunct element in stream in Accurev

I am facing a problem while updating my workspace. One user has defuncted a file and promoted that. Now when I am trying to update my workspace, error occured, it says: "Element would be stranded .----------\abc.txt
Some elements would be stranded as a result of an update.
You will need to resolve this prior to trying update again.
Display the File Browser Incoming Changes mode to see what
might be causing elements to become stranded.
Update failed."
How to resolve it.
Select the file abc.txt -> right click -> Revert To Basis version.
Once you have purged this file, you can update your workspace.
A file or directory becomes (stranded) when the parent directory has been defuncted. So in your case you're working on the file abc.txt and someone else has defuncted the directory, or parent directory where this file resides.
To resolve this you will either have to accurev mv abc.txt ../someplace/where/the/directory/exists or undefunct the directory where abc.txt resides.

Restoring a workspace at accurev

I've foolishly deleted the content of a workspace I've worked on.
I wanted to reset it and thought I'll be able to re download it again from accurev, apparently it is more complicated than that...
So I'm pretty much stuck, I have an empty directory as a workspace, any way to fix that?
I can see the stream I want to re download in the GUI.
I've already opened a workspace for it in the past so I can see I'm connected to it.
Any way to reset this workspace?
Thanks.
Via the command line, from the top of your workspace you can run "accurev pop -O -R ." << don't forget the dot. This will repopulate your workspace with all the files in the backing stream. The files brought into your workspace will be from the time that you ran an AccuRev update. The -O is for Over Write and the -R is Recursive
Via the GUI, select the top most directory, right click and select Populate. In the pop-up dialog box select Overwrite and Recursive.
Any files that you had modified, but not kept will not be restored.
Any file that are active in your workspace WILL be over written.
You might want to run an AccuRev update after the re-populate command.

UserInterfaceState.xcuserstate not getting committed while using git in Xcode

when I'm trying to commit my code project it shows a file called 'UserInterfaceState.xcuserstate' which has to be committed. once i commit it and try to push my project to git ,the Xcode gives me a popup message saying that 'The working copy "app" has uncommitted changes.' and when I try to commit again I get the same file 'UserInterfaceState.xcuserstate' to be committed again. Can anybody help me with this?
UserInterfaceState.xcuserstate is where Xcode saves your GUI states, such as window positions, open tabs, expanded nodes in the project inspector etc.
Simply resizing the Xcode window will cause this file to change and be flagged as modified by your source control system. You can make your SCM system ignore specific files that are not important to the project itself.
You want Git to ignore the file, you can add it to the .gitignore file, but you have to remove the tracking. To stop tracking a file that is currently tracked, use git rm –cached.
git rm --cached ProjectFolder.xcodeproj/project.xcworkspace/xcuserdata/myUserName.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
Afterwards the .gitignore will take effect of UserInterfaceState.xcuserstate
Now onwards you wont get a popup message saying that 'The working copy "app" has uncommitted changes.'

Xcode: "The document could not be saved. You don’t have permission."

I'm getting this error when trying to save a file in Xcode 4:
"The document could not be saved. You don’t have permission. To view or change permissions, select the item in the Finder and choose File > Get Info."
Naturally, saving the file in TextMate works fine. Permissions: -rw-r--r--
Nothing changed from when it worked the last time.
Files are not locked, I tried rebooting, disk space is ok, files are on a local drive, error was googled. Any ideas?
Thanks.
Update: Also tried copying the files or renaming them. Directories are not locked. By the way, when I edited project configuration in Xcode it saves fine, I only met with the issue saving .m/.h files. I guess that copying the actual text in the files would work but I'm trying to find a bit less hardcore solution (bash script wouldn't be the issue but there could be other problems). It's not the simplest project either (~70 files, edited config).
Update 2: Found possible duplicate, doesn't really resolve the problem Unable to unlock file for editing in Xcode 4?
Update 3: Checked out earlier commit and when opening Xcode it said the project is locked. Checked out the same commit again and the error does not appear again (all files exc. DS_Store are tracked). What.
Update 4: I created a new user and set chmod -R 777 to the project directory. Editing now works fine. However I can't get it to work under my main account (I have all my preferences here.)
Rebooting fixed the error in my case.
Fixed by changing account name by following this guide. This essentialy creates a new account but with your old Home directory and within the process of transferring it fixes some file permissions.
(From above link:)
For Mac OS X v10.5 or later (do this twice if you want to keep your original username)
:
Enable the root user.
Log in as root.
Navigate to the /Users folder.
Select the Home folder with the short name you want to change, and rename it just like you would rename any folder. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
Choose Log Out from the Apple menu.
Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
Disable the root user.
Xcode 6 update: still seeing this problem.
Seems like an Xcode bug, because opening the file by clicking the error in the Issue navigator causes this problem, but if I open the file using the cmd+shift+O shortcut I am able to edit and save it. So for me the workaround is to not open the file by selecting the error and to open it using the Project navigator or Open quickly shortcut.
I upgraded to Lion and downloaded the new Xcode and found the same problem and found nothing to help, losing about three days trying to fix it. Then I realized that the Xcode 4, which is saved in the Applications folder, doesn't overwrite Xcode 3, which is in the Developer folder. When I was opening Xcode, I was opening version 3, not 4.
Make sure you're opening the right version.
open up the terminal and set
chmod 777
to the desired file or set
chmod -R 777
to the desired directory.
it should solve your problem
I just ran into this issue also. I was not able to fix it not by changing the permissions of the individual project file or folder. However, I was able to fix it by going into 'get info' on my user's home folder, reselecting the 'Read & Write' permissions for my user, and then clicking the gear->'apply to enclosed items'. Took it a while but then everything worked as expected. Hope it helps someone else.
This maybe helpful If you use CocoaPods: https://stackoverflow.com/a/38885499/3395008
I'm running Xcode 7.3 and CocoaPods 1.0.0. and this happens when trying to modify a file from a pod added as a development pod (i.e. from a local directory).
I just pod update again, when pod finished, Xcode will show an alert "The document has previously unsaved changes.", then click "Re-Save". that fix my issue.
I Had the same problem with actual swiftUI.
Solved the Problem easy:
Copy and paste the content from .swift-file to a word-document
Delete the swift-file
Close Xcode and reboot Hardware
New .swift-file in XCode and paste code from word-document
cmd+B ... cmd+r
I used to encounter the same problem several times, last time it was on Xcode 12.4
It seems like a bug for me, because it tells that some private file is modified despite I don't have any permissions to do so even if I want. Force quitting and relaunching the Xcode always helped before.