Artifactory Exclude Pattern for specific non-word character - artifactory

Background
We're using Artifactory as a repository for Helm Charts among other things. For our specific Helm repo I would like to prevent any packages being uploaded with an underscore in the filename, as that causes issues further down the line. It's possible more characters will have to be excluded later, but I'm focusing on _ for now as that is what currently causes issues for us.
What I've tried
Artifactory offers an Exclude Pattern option to exclude files which contain a certain pattern. I have tried entering many variations of *_* as an Exclude Pattern in order to exclude all files containing an underscore anywhere in the filename. Unfortunately, this doesn't seem to work, since the test files I upload with an underscore still upload fine and are still shown in the repository. When, however, I enter *t* as an Exclude Pattern, all files with a t in the name disappear. This tells me the Excluding in itself works fine, just not with the underscore.
The Question
Is there any way to use the Exclude Pattern (or any other option in Artifactory) to prevent files from being uploaded with an underscore in the name?

**/*_* works. I'm not entirely sure why that works when *_* doesn't, but it does.

Related

Merge conflict -strange characters appearing

I am working on an ASP.Net MVC5 project and using vimdiff as my mergetool.
I am getting a merge conflict on a .csproj. This is not unexpected as files get added in different branches all of the time, however it seems that the process of merging is adding some junk data?
This is the state of the csproj on local, base and remote:
And this is the apparent merge conflict:
As far as git is concerned the whole file is now a conflict...
<<<<<< HEAD
WHOLE CS PROJ FILE WITH CHARACTERS AT START
======
WHOLE CS PROJ FILE WITHOUT CHARACTERS AT START
>>>>>> develop
This obviously makes performing a proper merge kind of difficult.
I cannot see these characters in either branch before I try the merge.
Any ideas?
This is an UTF-8 BOM, indicating that the file is encoded as UTF-8. It is only recognised at the start of a file, and since <<<<<< HEAD has been inserted before it, it is no longer at the start of the file, and has been made visible by a tool that does not detect / no longer detects the file as UTF-8.
Ensure that all tools you use to modify the file agree on whether the BOM should be there. If they all agree, then it should never cause a conflict. If some add the BOM when it isn't present, and others remove the BOM when it is present, conflicts are unavoidable.
You just remove the lines you would not see in your source. git add the file(s) and make a commit, so you resolved a conflict.

Capture many .png files over HTTP that are named as .htm?

I want to download a large number of .png files that have .htm file extensions. I've tried a some WinPcap-based utilities, but none of them pick up the files I need. The utilities I have tried are called York, EtherWatch and Pikachu2. I've also tried using a Firefox extension called Save Images - which was too buggy to be useful - and I've tried looking in the browser cache. This last approach works, but it has a problem...
...I need at least the last 30 characters of the file names to be maintained so that I know which image is which.
Does anyone know how I can get this done?
you can use downthemall to download all the images, and rename the file extension programmatically

Highslide and image filenames containing ampersand

I have a number of image files with filenames that include special characters - notably ampersand. In order to get Highslide to handle such file names, my code uses the .NET Uri.EscapeUriString or EscapeDataString utilities to escape such characters. As well as e.g. converting spaces to %20, etc., the second of these utilities converts an ampersand to %26 while the first leaves it as &. In both cases, I can copy and paste the generated url from a View Source window to a browser address box and see the image. So I have to assume that for some reason Highslide either cannot handle such characters or does some form of additional conversion which causes the final url to be invalid.
I suspect that there is a similar issue with filenames containing single apostrophes, but am still investigating that.
Is there a recognised way of dealing with this issue or do I have to rename all my image files (ugh!)?
Jon
Ampersands are a reserved keyword and I'd suggest that you'll have far more problems leaving them in than fixing this issue now.
To fix in batch, check out:
renaming files in cmd using wildcards

Merge translation files (.ts) with existing .ts files using QT Utilities (lconvert)

Here's my problem: We've got .ts files for nine different languages for our product. We've added about 100 new strings that need to be translated, but some are for our next release, and some are for the release after that. We've run into problems with translators missing strings or translating strings ahead of time. We want to be able to send them smaller .ts file containing only the strings we want translated now, and then merge that .ts file into the larger .ts file containing the rest of the translation.
Our translators are required to use QT Linguist (previously we let them edit the raw XML with less than stellar results).
One solution would be to use contexts, but our dev team is not very keen on that idea. Another would be to merge the .ts files by hand, but that seems like a recipe for cut & paste errors.
Is there a method with lupdate & the project file to add or merge secondary .ts files? I've read through the forums in QT-land w/o finding the answer, but the switches in lupdate allude to being able to point to other translation files. Specifically the -pro switch which says:
-pro <filename>
Name of a .pro file. Useful for files with .pro file syntax but
different file suffix. Projects are recursed into and merged.
Example1: we have a German .ts file, we want to add 20 strings from a separate German translation file such that the primary translation file contains all the strings including the 20 new ones.
Example2: we have a German .ts file, we want to add 20 strings from a separate German translation file such that the secondary translation file will be merged with the primary during lupdate so that the resultant .qm file contains all the strings including the 20 new ones.
Has anyone done either of these (and either would work) and can you give me some insight?
The answer doesn't use lupdate, it lies in another utility called lconvert. It's quite easy to create a secondary file that only contains the strings you're interested in (and delete those same strings from the primary file), then run:
lconvert -i primary.ts secondary.ts -o complete.ts
This will take all the strings from the two input files and put them together into the output file. Using this method I was able to create a zero difference file (other than time stamp) of the original file that I'd split the two primary & secondary files from.
This question didn't get a lot of attention, but maybe someone will have this same problem and this will help.
thanks for this tip. It seems to work properly for my case :
I tried to extract updated and new strings from my project, which is currently under translation in an older version/release that I do not already have translated strings.
The problem was to send the new/updated strings only to translators.
I passed older strings in status resolved, adding new string using Lupdate, make a research using OxygenXML Editor with an XPath "/TS/context/message[not(translation/#type)]" to delete older strings, and clean it from useless blanks and carriage returns.
I tried a merge using lconvert with your solution, in order to merge translated strings : older and newer. It pass correctly lrelease and are displayed properly.

How to determine a text block of a file in one version come from which file in the previous version?

The problem is described below:
Suppose I have a list of files in one version(say A,B,C,D). In the next version I have the following files(A,E,F,G). There are some similarities in their contents. The files in the later version comes from the previous version by file name renaming, content addition, deletion or partial modification or without any change( for example A is not changed).
I take a block of text from a file(E, 2nd version) and check which files(in the 1st version) contain this text block. I found that B,C and D contain the text fragment. I want to determine from which file(B or c or d) this text block actually comes from.(I assume that E is a file whose name change in the second version).
Since the contents may be changed, added or deleted in the later version, so in order to determine similarity I use LCS algorithm. But I cannot map the file with its previous version.
I think one possible approach might be to use the location information of the match text blocks. But this heuristics not always work. Is there any research or algorithm exist to find so. Any direction will be helpful. Thanks in advance.
I think it may be helpful to take a look at Subversion, and its capability to track file renaming between versions. http://svnbook.red-bean.com/
It's tried and tested, because it's used by so many developers. Renaming has to occur by using subversion tools though, but there are many (command line, file explorer integration for different OS, GUIs, IDEs, you name it). It also covers moving files between directories, and merging several lines of changes (branches).

Resources