In a branch spec, I have the following view:
//depot/dev/t/a/g/... //depot/dev/t/r/g/...
-//depot/dev/t/a/g/p/o*/... //depot/dev/t/r/g/p/...
Perforce reports an "Incompatible wildcards" for the second rule there.
What I'd like to do is exclude all the directories beginning with "o".
What am I doing wrong, and how do I fix this?
I think you need to have matching wildcards on both sides of each mapping. Try:
//depot/dev/t/a/g/... //depot/dev/t/r/g/...
-//depot/dev/t/a/g/p/o*/... //depot/dev/t/r/g/p/o*/...
While not a direct answer to the question (answered above), I was stumped on the same message and found this post while trying to search for a solution.
In my case, it was because when copy-pasting the workspace mapping from another file, the ellipsis character was placed instead of the Perforce "..." wildcard. To fix this, I deleted the ellipsis and replaced it by typing in three periods.
Related
I have a comma below my footer on a Gatsby site and I cannot find its source. It is at the end of the wrapper div with id "___gatsby". I have searched all component files and a bunch of other files to no avail. Going through all previous Git versions to find the change would be very burdensome at this point. Perhaps someone has an idea, based on the DOM structure below, where to best search for the comma?
Thanks.
I found it.
It turns out that a rogue character in gatsby-browser.js, in this case a comma after a closing tag, will be added in this way to the end of the #___gatsby div. In this case I overlooked the comma even through search because the comma was at the end of a long line of code and so did not appear visually in the search results list.
Use the find & replace functionality (or even just find) of your IDE/text editor and use the following regular expression:
\s,|,\s,
Here you have a working example of that regex: https://regexr.com/6hogi
How GitHub guesses encoding of a text file?
I have two text files in my repository: README.ru.koi8-r and mpman-ru.tex,
both use encoding koi8-r. GitHub uses right encoding for the first one and uses wrong for the second one.
Maybe there is a trick to force right guess?
Postscript. I solved the problem by adding a long comment at the top of the file in koi8-r, but there should be a better way to do it.
In the GitHub documentation it is stated that you in fact should "determine encoding for every single file". Furthermore they say that "(...) encoding could be set in .gitattributes file." which is probably what you are looking for right now as this will be pushable to GitHub (documentation for gitattributes files on git-scm).
You set the encoding for a repository with
git config gui.encoding koi8-r
Please, open File 1 to access the problem. If I type it here some important characters that I believe to be what's causing the drama won't show on the post. Thank you!
I basically created a file that I can't get rid of.
Screen shoot of what I have done
Space, <, and > are all treated specially by your shell.
Because of that, you'll need to quote the name. Try this:
rm 'index.html <RET>'
In cases where you can't figure out how to quote/escape the filename appropriately, a convenient approach is:
rm -i index.html*
You will be prompted (because of the -i option) to delete each filename matching the specified glob pattern, one at a time. Simply answer y to the ones you want to delete.
Quoting the arguments correctly is safest (it avoids any possibility of accidentally deleting something you didn't mean to delete), so I recommend always doing so when you can; but if you've managed to generate a really garbled filename (Unix places very few constraints upon filenames) then this method can be very useful.
Are there any Perl methods or modules to get the SVN keyword of a given file without calling the system SVN installation?
Thanks!
If you do not involve SVN, then the file is just a text file. Whether or not it is version controlled is not a property of the file but is stored in the hidden .svn folder on the same level. That means, if you want to analyze the file without involving SVN, you have to treat it as a plain text file. However, expanded SVN keywords do follow a certain syntax (or SVN itself would be unable to find them after they have been expanded once).
In your case, any file that had the keyword substituted most likely has a line like
$Id: ActualIdHere $
and if the keyword has not yet been substituded, it will just be $Id$. And Perl is very able to extract data from a known syntax. Especially given that you should know what characters can make up an Id (hint: Avoid $ if any possible).
To answer your specific question: A regex like /^\$Id\: (.*) \$$/ should probably find the Id you are looking for and store it in $1. That is of course assuming there is nothing else in that line. But only you can know how and where you have what sort of keywords, so it is up to you to craft the regex or to provide more detailed information, if you struggle to.
you may try something like this, to get the svn id into a perl variable.
my ($SVN_ID) = ('$Id: ActualIdHere $' =~ /^\$Id\: (.*) \$$/);
print $SVN_ID;
But for SVN you also have to enable keyword substitution in SVN, see svn documentation
Note: the inserted id is the value at the time the file was last changed. The id may have changed later than that for other files.
My Localizable.strings file has somehow been corrupted and I don't know how to restore it.
If I open it as a Plain Text File it starts with weird characters that I can't copy here.
If I leave the file be the app builds. If I make any changes either the values aren't interpreted properly or I get an error at compile time.
Localizable.strings: Conversion of string failed. The string is empty.
Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 1
I suspect this is an encoding problem but I don't know how it happened (maybe SVN is to blame?) nor how to solve it. Any tips will be much more appreciated.
I have issues with the same file that sound very similar to your own. What happens for me is that Xcode doesn't know the correct file formating. I often get this when rearranging the project and I remove and re-add this file to the Xcode project. When I re-add the file, its encoding gets set to something like Western Roman which can't seem to render anything other than ASCII.
Here's what I do to fix the problem:
In Xcode select the Localizable.stings file in the Groups&Files panel.
Do a Get Info on that file.
On the info panel select the General tab.
In that tab go to the File Encoding and change its value.
The last step is where the trick lies as you now have to guess the right encoding. I find that for most European languages that "Unicode (UTF-8)" works. And for Asian languages I find that "Unicode (UTF-16/32)" are the ones to try.
I just had that error because I forgot a semicolon. Took me a while to figure it out. Seems like a really ambiguous compiler error but the fix was simple.
Make sure in File-Get Info, that UTF-16 is selected. If it's set to none or UTF-8 as encoding then you need to change it. If your characters have spaces between them then you choose to "re-interpret" the file as UTF-16. If there are weird characters in the file, then you need to remove them.
Execpt the UTF-8 problem, sometimes you still have to check the content in case if there are some syntax problems.
Use the following Regular Expression to verify your text line by line, if there's any line not matched, there must be a problem.
"(.+?)"="(.+?)";
You can use the plutil command line tool. Without options or with the -lint option, it checks the syntax of the file given as argument. It will tell you more precisely where the error is.
This happens to me when there is a missing quote or something not right with the file. MOst commonly, since my language files are done by another team member, he tends to forget a quote or something. Usually XCode shows an error on that line, sometimes it does'nt and just throws "Corrupted data" error.
Double check if all your strings are properly closed in quotes
Open the file in Xcode.
Right click it in Project Navigator.
Select Open as -> ASCII Property List