Why does the git client open local repositories in the /run/ folder? - linux

I have a repository in a folder /var/www/. Through the git client, I select this folder as "open an existing repository", but the repository opens as if it is located in the /run/ directory.
This did not happen on the old computer. And now I have a number of problems. For example, auto-updating of the state of files after their modification does not work. It also fails to use Stash. There are also other problems.
UPDATE and a solution: I found out that this problem appeared due to the fact that I installed the flatpack version of Sublime Merge on
a new computer. When I reinstalled it as a regular package, everything
works as it should.
I'm not sure if the problem is exactly in the changed repository path, but this is my main suspicion.
I'm using Linux Mint 21.1. Test this with git-clients Sublime Merge and Gittyup. Sublime Merge shows the path to repositories as /run/user/1000/doc/c9e48011/<repo_name>.
Gittyup as /run/flatpak/doc/c9e48011/<repo_name>.
On the path from Sublime Merge, there really is a folder with all the files from my repository. And the path that Gittyup shows is inaccessible because the /run/flatpak/ folder doesn't actually exist.
Why is this happening and how to fix it?

Related

Moved local git folder and now its asking to stage most of my project files?

I reinstalled my OS (KDE neon) and I thought why not backup my project git folder, before I reinstalled I made sure I commited any code and everything in my git project folder was up-to-date.
So after reinstalling, I moved my project back onto my PC from my backup drive and ran git-status and it wants to stage nearly all of my project?
What do I do? I don't want to commit all these files again when I have not editing any of them? Its nearly 800 files it wants to stage?
You could reset your project using:
git reset --hard branch_name
This would lose any unstaged files.
Or you could stash the changes:
git stash save 'msg'
This works like the previous one, but instead it saves the unstaged files in a separate "memory" (in case you need them later on).
Now, I may assume that the reason you got that situation in the first place is maybe when you restored your data back from the drive, the OS changed some properties on those files, stuff like creation/modification dates, permissions...etc. While the content of the files has not changed but the properties are. Still, git sees them as modified files.

sharing source between Linux eclipse and MS Visual Studio

I have a linux eclipse project checked into our company svn. Works great.
The project is intended to be cross compiled on Windows.
Untill now, I have simply moved the source files between OSes. However, I thought I'd like to let svn do this for me. Should be simple enough, just checkout the eclipse linux src into the VS project dir, right? Wrong!
The correct source was checked out of svn and it worked fine. But when I tried to check it back in i kept getting "Commit not completed filename remains in conflict" errors. I hadn't even changed anything!
Did a little checking. Turns out the linux src directory is pretty much just the source and headers. On the MSVS side the project directory contains the source and headers but also contains a bunch of files that are used by VS with names like projname.vcproj etc. etc.
So, I did a checkout into a scratch dirextory, .\fred. Checked .\fred back in. No problems. Added a new file to .fred, xxx.xxx. Check in reported:
svn: E200009: Commit failed (details follow):
svn: E200009: 'C:\Projects\fred\xxx.xxx' is not under version control
Makes me wonder about those uncommitted Visual Studio files.
So, are those files my problem? Are they breaking the commit operation?
As an alternate solution I am thinking of adding the VS files to the src dir in svn. If linux/eclipse checks them out I can tell eclipse to ignore them (I think it'll just ignore them for me). Any thoughts or recommendations for this approach?
(BTW, i still had fresh source on the linux side so any thing that got clobbered could be safely restored.)
So here is one solution I have working for the moment. I am not sure how totally stable it is.
Caveat: The project i am using already existed as a MSVS project.
In the MSVS solution dir, rename the source dir (MSVS likes the source dir name to match the solution dir name, so this means the source dir may not be named src) to something uninvolved in the solution, like temp.
SVN checkout the src (eclipse like to call source dirs src).
cd into the source dir. Issue the command:
svn changelist msvs *.cpp *.h
Add *.c if needed. "msvs" is the changelist name. It can be whatever you want ti to be.
This will created a changelist for the checked out directory.
Now, copy the remaining files from the temp directory into your source dir.
When you need to do a checkin, cd into the source dir and issue this command:
svn ci --changelist msvs
Note. You have to be in the src dir for this to work.

How do restore an existing repository using TortoiseSVN?

After my OS crashed, I've installed a fresh version (Windows 7 Pro x64).
I want to commit my project changes, so I need to restore my local repository to do this. Of course I have the all files located in my folder where was the repository before the OS crash, but of course TortoiseSVN doesn't know that there was a repository. How can I do it (I believe it is possible to restore that repository)?
If you still have your repository folder, intact with all the .svn subfolders, all you should need is installing TortoiseSVN itself after the OS reinstall. TortoiseSVN does not rely on anything outside the file system to identify working folders, so you should be able to just check in.
I think you're mixing up "repository" and "working-copy" here.
Assuming you have a local repository created on your harddrive:
To find your repository you could do a fresh checkout of your local repository and specify the location starting with "file://". If you have an old working-copy, but the repository is not at its old location, you can relocate it with the TortoiseSVN command "relocate".
An old working-copy should just show up. Chances are that it doesn't show up, because you installed a new version of TortoiseSVN (1.7.x) which uses a newer working-copy-format that is different from the older format. You need to select your working-copy directory and select "upgrade working-copy" so you can work with it.
Simply checkout a new project and copy the .svn folder into existing project.

Tortoise SVN: deleted folders reappear after being removed with the Repo Browser

Windows XP SP3; TortoiseSVN 1.6.16, Build 21511 - 32 Bit, which is the current version at the moment.
We're using Eclipse Helios for some Android development. When one of the projects was first checked in using TortoiseSVN, the bin and gen folders were included. I'm trying to delete them from SVN.
I went to the Repo Browser and deleted the bin and gen folders from the project. The Repo Browser log shows two "Deleted" entries for revision 40583. I then went to my working copy and did an SVN Update. It deleted the folders, as expected. The File Explorer shows a green icon for the project.
Next, I ran Eclipse and did Project/Clean. The bin and gen folders were created. The gen folder shows the purple question mark icon as an unversioned folder, as expected. The bin folder, however shows a red exclamation point icon, and it and all of its child folders all contain a .svn version control subfolder. If I exit Eclipse and do a TortoiseSVN Cleanup, the bin folder temporarily shows a green icon and then immediately switches back to the red exclamation point icon.
What's going on?
You should install a SVN client in eclipse, and don't use TortoiseSVN altogether on the same directory as eclipse is working on. This is the root cause of your problem, and it will come again and again.
So the proper use is:
Install a SVN client like subversive or subclipse inside eclipse.
Depending on the client you choose, checkout the project from your subversion repository using the menu entries of the client you have installed.
After having checked-out the project, check the properties of the root folder of the project. They should define that the bin folder (or target if you are using Maven) should be ignored.
If you have to add that property, ensure to commit it, so others will not have the same problem.

subversion/ tortoisesvn- changing the directory of a repository

I have a project in a directory projects/projectA. it has a corresponding subversion repository. I'm using Tortoisesvn as the front end.
I'm trying to move the project to projects/projectA_old and cannot find a way to do it. looks like renaming from tortoise works only on directories inside the project and not the project directory itself.
Thanks
Just rename the directory from the operating system - its name is not significant to SVN.

Resources