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

Re: [PATCHv3] git-p4: add initial support for RCS keywords

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 14, 2012, 22:58 UTC
Message-ID
<7vvcn93tvr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1329258835-17223-2-git-send-email-luke@diamand.org>

It seems that this seems to have been further refactored by introducing a couple of new helper functions. I'll replae what was queued in 'pu' with this, with the following minor fix-ups.

Thanks.
 t/t9810-git-p4-rcs.sh |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t9810-git-p4-rcs.sh b/t/t9810-git-p4-rcs.sh
index 77eebd2..3013bab 100755
--- a/t/t9810-git-p4-rcs.sh
+++ b/t/t9810-git-p4-rcs.sh
@@ -201,7 +201,7 @@ test_expect_success 'cleanup after failure 2' '
 	)
 '
 
-create_kw_file() {
+create_kw_file () {
 	cat <<\EOF >"$1"
 /* A file
 	Id: $Id$
@@ -226,7 +226,7 @@ test_expect_success 'add kwfile' '
 	)
 '
 
-p4_append_to_file() {
+p4_append_to_file () {
 	f=$1 &&
 	p4 edit -t ktext "$f" &&
 	echo "/* $(date) */" >>"$f" &&
@@ -248,7 +248,7 @@ test_expect_success 'cope with rcs keyword expansion damage' '
 		old_lines=$(wc -l <kwfile1.c) &&
 		perl -n -i -e "print unless m/Revision:/" kwfile1.c &&
 		new_lines=$(wc -l <kwfile1.c) &&
-		expr $new_lines == $old_lines - 1 &&
+		test $new_lines = $(($old_lines - 1)) &&
 
 		git add kwfile1.c &&
 		git commit -m "Zap an RCS kw line" &&
@@ -278,12 +278,12 @@ test_expect_success 'cope with rcs keyword file deletion' '
 		p4 add -t ktext kwdelfile.c &&
 		p4 submit -d "Add file to be deleted" &&
 		cat kwdelfile.c &&
-		grep -q 1 kwdelfile.c
+		grep 1 kwdelfile.c
 	) &&
 	"$GITP4" clone --dest="$git" //depot &&
 	(
 		cd "$git" &&
-		grep -q Revision kwdelfile.c &&
+		grep Revision kwdelfile.c &&
 		git rm -f kwdelfile.c &&
 		git commit -m "Delete a file containing RCS keywords" &&
 		git config git-p4.skipSubmitEdit true &&
Previous: Luke DiamandNext: Pete Wyckoff
Message 3 of 7 in “[PATCHv3] git-p4: RCS keyword handling”
  1. Luke DiamandFeb 14, 2012
  2. [PATCHv3] git-p4: add initial support for RCS keywordsLuke Diamand, Feb 14, 2012
  3. Junio C HamanoFeb 14, 2012
  4. Pete WyckoffFeb 21, 2012
  5. Eric ScoutenFeb 21, 2012
  6. Junio C HamanoFeb 21, 2012
  7. Eric ScoutenFeb 21, 2012

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.