git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/6] git-p4: handle utf16 filetype properly

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2011, 18:08 UTC
Message-ID
<7vaa90reqm.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20111016144435.GE22144@arf.padd.com>
Pete Wyckoff <pw@padd.com> writes:
Show 31 quoted lines
> +build_smush() {
> +	cat >k_smush.py <<-\EOF &&
> +	import re, sys
> +	sys.stdout.write(re.sub(r'(?i)\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$]*\$', r'$\1$', sys.stdin.read()))
> +	EOF
> +	cat >ko_smush.py <<-\EOF
> +	import re, sys
> +	sys.stdout.write(re.sub(r'(?i)\$(Id|Header):[^$]*\$', r'$\1$', sys.stdin.read()))
> +	EOF
> +}
> +
> +test_expect_success 'keyword file test' '
> +	build_smush &&
> +	test_when_finished rm -f k_smush.py ko_smush.py &&
> +	test_when_finished cleanup_git &&
> +	"$GITP4" clone --dest="$git" //depot@all &&
> +	(
> +		cd "$git" &&
> +
> +		# text, ensure unexpanded
> +		python "$TRASH_DIRECTORY/k_smush.py" <"$cli/k-text-k" >cli-k-text-k-smush &&
> +		test_cmp cli-k-text-k-smush k-text-k &&
> +		python "$TRASH_DIRECTORY/ko_smush.py" <"$cli/k-text-ko" >cli-k-text-ko-smush &&
> +		test_cmp cli-k-text-ko-smush k-text-ko &&
> +
> +		# utf16, even though p4 expands keywords, git-p4 does not
> +		# try to undo that
> +		test_cmp "$cli/k-utf16-k" k-utf16-k &&
> +		test_cmp "$cli/k-utf16-ko" k-utf16-ko
> +	)
> +'
Shouldn't this pay attention to PYTHON_PATH in any way?
Previous: Pete WyckoffNext: Pete Wyckoff
Message 7 of 12 in “git-p4 tests, filetypes, shell metacharacters”
  1. 0/6 git-p4 tests, filetypes, shell metacharactersPete Wyckoff, Oct 16, 2011
  2. 1/6 git-p4 tests: refactor and cleanupPete Wyckoff, Oct 16, 2011
  3. Pete WyckoffOct 16, 2011
  4. 2/6 git-p4: handle utf16 filetype properlyPete Wyckoff, Oct 16, 2011
  5. Stefano LattariniOct 16, 2011
  6. Pete WyckoffOct 16, 2011
  7. Junio C HamanoOct 16, 2011
  8. Pete WyckoffOct 16, 2011
  9. 3/6 git-p4: recognize all p4 filetypesPete Wyckoff, Oct 16, 2011
  10. 4/6 git-p4: stop ignoring apple filetypePete Wyckoff, Oct 16, 2011
  11. 5/6 git-p4: keyword flattening fixesPete Wyckoff, Oct 16, 2011
  12. 6/6 git-p4: handle files with shell metacharactersPete Wyckoff, Oct 16, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.