Commits

Anonymous committed 7dcb6ef Merge

Merge with BBI#42 - Subrepo Commit Error

Comments (0)

Files changed (2)

 "Tests/BBI40_LINUX_TEST.bat": {"timestamp": 1363121154.72},
 "Tests/BBI40_LINUX_TEST.sh": {"timestamp": 1363218017.41},
 "Tests/BBI42_CommitSubrepos.bat": {"timestamp": 1382377562.63},
-"Tests/BBI42_CommitSubrepos.sh": {"timestamp": 1382377995.33},
+"Tests/BBI42_CommitSubrepos.sh": {"timestamp": 1383755553.22},
 "TimeStampMod.png": {"timestamp": 1305052883.0},
 "TimestampMod.py": {"timestamp": 1382378741.71},
 "TimeStampMod.xmind": {"timestamp": 1306451621.66},

Tests/BBI42_CommitSubrepos.sh

-#!/bin/sh
-#::------------------------------------------------------------------------------
-#:: Tests for BitBucket Issue #42 - Error on commit subrepos.
-#:: Committing all changes done in some subrepos with option --subrepos fails 
-#:: with error 'NoneType' object has no attribute 'files'
-#::------------------------------------------------------------------------------
-#:: This test-script creates a temporary test repository, 
-#:: adds three (3) subrepositories to the test repository,
-#:: creates and addes files to each subrepository,
-#:: and commits changes through all the subrepositories.
-#::------------------------------------------------------------------------------
-#@echo off
-
-curdir=`pwd`
-casenumber=bbi42
-
-initialize_repodir(){
-	testpath=/tmp/hgtimestamp_tests/test${casenumber}/
-	rm -rf ${testpath}
-	mkdir -p ${testpath}
-	cd ${testpath}
-	if [ "`pwd`" != "${testpath}" ]; then
-		return 2>&- || exit
-	fi
-
-	return 0
-}
-
-echo
-echo Initializing Test Repository...
-initialize_repodir
-hg init
-echo Create file \(Main\\abc.txt\)
-mkdir Main
-echo "abc" > "Main\abc.txt"
-hg add "Main\abc.txt"
-echo hg commit -m \"add Main\\abc.txt\"
-hg commit -m "add Main\abc.txt"
-echo
-echo ============================================
-echo Test \#1 - Add new Subrepositories.
-echo \\/\\/\\/\\/
-echo Initializing Subrepo #1...
-hg init Subrepo1
-echo Subrepo1 = > .hgsub
-echo Initializing Subrepo #2...
-hg init Subrepo2
-echo Subrepo2 = >> .hgsub
-echo Initializing Subrepo #3...
-hg init Subrepo3
-echo Subrepo3 = >> .hgsub
-hg add .hgsub
-echo
-echo hg commit --message "adding Subrepositories"
-hg commit --message "adding Subrepositories"
-echo
-echo /\\/\\/\\/\\
-echo CHECK: no error message should be displayed.
-echo ____________________________________________
-echo 'hit enter' && `read garbage`
-echo
-echo ============================================
-echo Test \#2 - Commit empty Subrepositories.
-echo \\/\\/\\/\\/
-echo hg commit --verbose --message \"committing subrepos\" --subrepos Subrepo1 Subrepo2 Subrepo3
-hg commit --verbose --message "committing subrepos" --subrepos Subrepo1 Subrepo2 Subrepo3
-echo
-echo /\\/\\/\\/\\
-echo CHECK: no error message should be displayed.
-echo ____________________________________________
-echo 'hit enter' && `read garbage`
-echo
-echo ============================================
-echo Test \#3 - Create files in Subrepositories and commit everything.
-echo \\/\\/\\/\\/
-echo Create file \(sub1.txt\)
-echo "sub1" > "Subrepo1\sub1.txt"
-hg add "Subrepo1\sub1.txt"
-echo Create file \(sub2.txt\)
-echo "sub2" > "Subrepo2\sub2.txt"
-hg add "Subrepo2\sub2.txt"
-echo Create file \(sub3.txt\)
-echo "sub3" > "Subrepo3\sub3.txt"
-hg add "Subrepo3\sub3.txt"
-echo
-echo hg commit --verbose --message \"committing subrepos\" --subrepos Subrepo1 Subrepo2 Subrepo3
-hg commit --verbose --message "committing subrepos" --subrepos Subrepo1 Subrepo2 Subrepo3
-echo
-echo /\\/\\/\\/\\
-echo CHECK: no error message should be displayed.
-echo ____________________________________________
-echo 'hit enter' && `read garbage`
+#!/bin/sh
+#::------------------------------------------------------------------------------
+#:: Tests for BitBucket Issue #42 - Error on commit subrepos.
+#:: Committing all changes done in some subrepos with option --subrepos fails 
+#:: with error 'NoneType' object has no attribute 'files'
+#::------------------------------------------------------------------------------
+#:: This test-script creates a temporary test repository, 
+#:: adds three (3) subrepositories to the test repository,
+#:: creates and addes files to each subrepository,
+#:: and commits changes through all the subrepositories.
+#::------------------------------------------------------------------------------
+#@echo off
+
+curdir=`pwd`
+casenumber=bbi42
+
+initialize_repodir(){
+	testpath=/tmp/hgtimestamp_tests/test${casenumber}/
+	rm -rf ${testpath}
+	mkdir -p ${testpath}
+	cd ${testpath}
+	if [ "`pwd`" != "${testpath}" ]; then
+		return 2>&- || exit
+	fi
+
+	return 0
+}
+
+echo
+echo Initializing Test Repository...
+initialize_repodir
+hg init
+echo Create file \(Main\\abc.txt\)
+mkdir Main
+echo "abc" > "Main\abc.txt"
+hg add "Main\abc.txt"
+echo hg commit -m \"add Main\\abc.txt\"
+hg commit -m "add Main\abc.txt"
+echo
+echo ============================================
+echo Test \#1 - Add new Subrepositories.
+echo \\/\\/\\/\\/
+echo Initializing Subrepo #1...
+hg init Subrepo1
+echo Subrepo1 = > .hgsub
+echo Initializing Subrepo #2...
+hg init Subrepo2
+echo Subrepo2 = >> .hgsub
+echo Initializing Subrepo #3...
+hg init Subrepo3
+echo Subrepo3 = >> .hgsub
+hg add .hgsub
+echo
+echo hg commit --message "adding Subrepositories"
+hg commit --message "adding Subrepositories"
+echo
+echo /\\/\\/\\/\\
+echo CHECK: no error message should be displayed.
+echo ____________________________________________
+echo 'hit enter' && `read garbage`
+echo
+echo ============================================
+echo Test \#2 - Commit empty Subrepositories.
+echo \\/\\/\\/\\/
+echo hg commit --verbose --message \"committing subrepos\" --subrepos Subrepo1 Subrepo2 Subrepo3
+hg commit --verbose --message "committing subrepos" --subrepos Subrepo1 Subrepo2 Subrepo3
+echo
+echo /\\/\\/\\/\\
+echo CHECK: no error message should be displayed.
+echo ____________________________________________
+echo 'hit enter' && `read garbage`
+echo
+echo ============================================
+echo Test \#3 - Create files in Subrepositories and commit everything.
+echo \\/\\/\\/\\/
+echo Create file \(sub1.txt\)
+echo "sub1" > "Subrepo1\sub1.txt"
+hg add "Subrepo1\sub1.txt"
+echo Create file \(sub2.txt\)
+echo "sub2" > "Subrepo2\sub2.txt"
+hg add "Subrepo2\sub2.txt"
+echo Create file \(sub3.txt\)
+echo "sub3" > "Subrepo3\sub3.txt"
+hg add "Subrepo3\sub3.txt"
+echo
+echo hg commit --verbose --message \"committing subrepos\" --subrepos Subrepo1 Subrepo2 Subrepo3
+hg commit --verbose --message "committing subrepos" --subrepos Subrepo1 Subrepo2 Subrepo3
+echo
+echo /\\/\\/\\/\\
+echo CHECK: no error message should be displayed.
+echo ____________________________________________
+echo 'hit enter' && `read garbage`