Skip to contentSkip to conversation

BUG: git-p4: can't add files with special chars

DISCUSSION Luke Diamand 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I just noticed this today. You can't add a file from git to perforce that contains a p4 special character (@,#,% or *).

There is code to cope going the other way round (p4 file with special character in it) but if you create a file in git and then try to git-p4 submit, it fails.

I've just tried a quick and simple fix, and it turns out that it's not that easy as the special characters get expanded to %40, %2A and so-on. The % seems to get further expanded by python...

Luke

#1 lore raw

[email protected] wrote on Mon, 12 Dec 2011 20:48 +0000:

Quoted 10 lines

I just noticed this today. You can't add a file from git to perforce that contains a p4 special character (@,#,% or *).

There is code to cope going the other way round (p4 file with special character in it) but if you create a file in git and then try to git-p4 submit, it fails.

I've just tried a quick and simple fix, and it turns out that it's not that easy as the special characters get expanded to %40, %2A and so-on. The % seems to get further expanded by python...

Entertaining. Probably p4_add() and friends should stop using system. And add option "-f" when wildcards are detected. I wouldn't be surprised if this turned into a larger set of issues.

		-- Pete