I am updating files in CVS. I put files that I needed to update in my unix folder.
Using cvs add, cvs commit - I was able to add new files to directory.
I was also able to update some from 1.1 to 1.2 using cvs update.
However I am unable to update the version for one file, getting this error:
cvs update filename.scr
cvs server: move away filename.scr; it is in the way
Any ideas how to solve this?
Do exactly what it says - remove filename.scr. CVS update won't overwrite the existing non-controlled copy of filename.scr.
in the cvs hidden sub folder check if the folder of that file is on the list of entries, if so you have to add it
To be specific, this means there's a file in the repository, and a matching file in your tree, but the file CVS/Entries doesn't mention it. That can fail either for the CVS/Entries file at the same level as the file it's complaining about, or if you do a recursive update, it can fail due to the directory not being listed in CVS/Entries at a higher level.
This happens often to me, and I don't know why; a perfectly good checkout starts to get these errors. If it is a missing directory, the easiest fix is to directly edit CVS/Entries, e.g. to add
D/Foo////
to Bar/CVS/Entries so that CVS knows it already owns Bar/Foo.
If it's missing a file, it's hard to regenerate the CVS/Entries line, so it's easiest to do as it says and delete the file.
Related
I have created a media type that accepts XML files and saves them to a custom publicly accessible location on the server.
Ideally I would like the file to be overwritten when the exact same file is uploaded. This does not happen, instead it creates a new file and adds a number on the end. I have "Create new Revision" turned off.
To get around this issue I thought I could just delete the file via the CMS. The uploaded file has status of "Permanent" and is used 0 places. I know the cron job cleans up files for you, but when I run the cron the file in question is still there. I figure it's because the file is set to permanent, but I don't see a way to flip this to temporary.
Any help is much appeciated.
There is a setting nested away in the file system settings, which lets you configure it to remove (or not removed) orphaned files. If drush isn't removing them despite having no usages recorded, I'd check this option isn't ticked.
The temporary and permanent status are used for storing temporary files during the upload/save process, so I wouldn't tinker with those too much.
If you fancy making the form yourself using the form API, then you can save the file programmatically using the FILE_EXISTS_REPLACE parameter.
https://api.drupal.org/api/drupal/core%21modules%21file%21file.module/function/file_save_data/8.5.x
Previously, I had WordPress' wp-config.php committed; since then, I've now ignored this file in .gitignore, which is fine.
Unfortunately - now when pulling to live, it provides this error:
M .htaccess
U wp-config.php
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Before this issue happened, I had an issue with pulling where it said I had uncommitted changes with these files - so I let it overwrite them, then I uploaded the actual files manually via FTP, which caused this new error.
I want to keep the files in their current state on the live server, but get around this error now and in the future.
What is the process of being able to pull the latest changes with this?
UPDATE - I'm adding an answer to a question posed in comments, and clarifying a related point
First let's clear up a little confusion: This error has nothing to do with putting the file in .gitignore. In fact, since the file is present in the index, .gitignore has no effect whatsoever on the file.
Before this issue happened, I had an issue with pulling where it said I had uncommitted changes with these files - so I let it overwrite them
You may need to be more clear about what commands you issued and what output you saw, because this is where your trouble is coming from.
When you say you "let it overwrite them", what does that mean? git resists overwriting local changes (especially uncommitted changes)...
I'm guessing what really happened is that git tried to merge changes from the remote repo into your local changes for those files, but had merge conflicts on wp-config.php.
And most likely it's still in a merging state, which you'll have to resolve before you can move on. If you say git status it will likely tell you that you're merging, with some changes "to be committed" (likely including the .htaccess file) and some "unmerged paths" (likely including the .php file).
If you have the .php file looking the way you want it in the work tree, then you can say git add wp-config.php and then git commit which should cause the merge to complete. (More generally, you have to get the file looking how you want it in the index, and do this in a way that tells git the conflict is resolved; and then you can commit to get out of the merging state.)
Now in comments you ask about whether this will put the file "back" into git. And that comes down to what it means to "have the .php file looking the way you want it".
If you never want git to provide the .php file (even during a fresh clone), then you need to remove it from the index and subsequent commit.
You could (at least temporarily) remove the file from the working tree and then do a git add (as noted above). Or, if you don't want to affect your working tree version, you can
git rm --cached wp-config.php
directly making the index look "how you want it". At this point it becomes possible for your .gitignore entry to help you avoid accidentally reintroducing the file.
If what you mean is that the file should be there, but only a default version should be in the repo (not taking any changes that might be made in the working tree), git won't do that. You'll have to get where you're going a different way. For example you could put the file in the repo as wp-config.php.default and ignore the wp-config.php path. After cloning the repo you would then copy the default file, and any local changes would be made only to the ignored copy.
While I have found the updated hash files to be added to WordPress, I have had a terrible time locating anything that gives specific direction as to where this file goes and exactly how to add it. Should it be added via a single file created with notepad, or should it be placed in a folder? I apologize if this sounds elementary, but this is a completely new adventure for me.
I found that the hash values for the files are provided but the file itself has to be created with the name of the file it says it is missing. Once that is created, move the file into the plugin itself and rerun the scan.
Every time I make a change to one of the WordPress theme files for my site there will be a lot of deleted cache files that automatically follow. Should I commit these changes using Git also or just ignore them? If the latter, what is the proper code I would use for this?
Thank you.
Well, I dont use wordpress, but if you are looking to ignore them you should have a file called .gitignore, and you are going to want to add those files (or if they are all in a folder, the folder) to the .gitignore file. https://github.com/DragonToothSoftware/SLang/blob/lexer-mod/.gitignore here is what mine looks like. It eliminates all of the cmake cache files
You should use a .gitignore file to exclude these files. They are auto-generated, so no need to keep them in repository
I use Git and GitHub to push changes I make on my local web development environment to my GitHub account and from there I pull these updates to my live production site. I am working with WordPress, so what I have done is .gitignore the wp-config.php file as my productions site has its own unique wp-config.php file with its own respective database credentials. As I am git ignoring this file, when I pull to my production site it gives me the following error:
error: Your local changes to the following files would be overwritten by merge:
wp-config.php
Please, commit your changes or stash them before you can merge.
Aborting
How do I prevent this wp-config.php file from being overwritten (more specifically deleted) when I do a git pull?
This is your machine specific config file. For such case its better to use build tool. For you its better to create your custom configuration on a special file my-config.php and include it in wp-config.php. Also ignore my-config.php in .gitignore. Now you'll never see any problem like this.
What you will see is my-config.php file not found error. And write it about in your README.
I do this whole thing with configure, make even the project is in php
If this was not a config file, and you are sure about the changes you can commit first and then execute pull. Other option is stash which is already told in the error message.
Your changes won't be overwritten. That's what the error message is telling you. The pull failed because git doesn't want to overwrite your changes.
To allow the pull to take place and keep your changes, do git stash before pulling. This will save a copy of your changes and allow you to pull without any issue. Then git stash pop after pulling will restore your changes. Note that you may experience a merge conflict if the changes you are pulling to wp-config.php touch the same part of the file as your local changes.
The other side doesn't have the ignore file in effect yet. Once it's there, you won't have this message. Also it's still tracked. So in addition to changing the .ignore file on both sides, you also need to delete it on both sides and from then on it will not get in the way.
Also take a look at octopress if you are going to be using git as part of your blogging routine.