1. Nathan Durnan
  2. TimeStampMod

Commits

Nathan Durnan  committed 771575d Merge

Merge with development

  • Participants
  • Parent commits b88ab7c, f5fdff7
  • Branches default

Comments (0)

Files changed (5)

File .hgtimestamp

View file
  • Ignore whitespace
 {
-"Version": "0.2.7",
+"Version": "0.2.8",
 "FileData":{
 ".hgignore": {"timestamp": 1336516662.38},
 ".hgtags": {"timestamp": 1363218117.24},
-"README.md": {"timestamp": 1363201331.4},
+"README.md": {"timestamp": 1382378314.08},
 "Tests/BBI36_CheckTimestampFileExists_Test.bat": {"timestamp": 1363119528.84},
 "Tests/BBI36_CheckTimestampFileExists_Test.sh": {"timestamp": 1363218017.39},
 "Tests/BBI37_SaveOnlyCommittedTimestamps_Test.bat": {"timestamp": 1363121220.92},
 "Tests/BBI38_EmptyUpdate_Test.sh": {"timestamp": 1363218017.4},
 "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},
 "TimeStampMod.png": {"timestamp": 1305052883.0},
-"TimestampMod.py": {"timestamp": 1363200179.76},
+"TimestampMod.py": {"timestamp": 1382378741.71},
 "TimeStampMod.xmind": {"timestamp": 1306451621.66},
 "TimestampMod_LastRecord": {"timestamp": 0}
 }

File README.md

View file
  • Ignore whitespace
 TimestampMod
 ============
-About (version 0.2.7 beta)
+About (version 0.2.8 beta)
 --------------------------
 TimestampMod is an extension for Mercurial DVCS that incorporates automatic saving and restoring of the modification times of files under version control.  This extension is based on an original timestamp extension by [Friedrich Kastner-Masilko](mailto:face@snoopie.at) hosted at [https://bitbucket.org/face/timestamp][ts].
 
 --------------
 These release notes will not cover every version, just tip of the repository and previous major release points.
 
-### __0.2.7 (beta)__ - _March 13, 2013_
+### __0.2.8 (beta)__ - _October 21, 2013_
 This is a bug-fix release.  
 **ALL USERS OF v0.2.x ARE URGED TO UPDATE TO THIS VERSION!**
 
 + __Fixed__ - Issues fixed with this version:
+    * Committing with `--subrepos` option resulted in error message "'NoneType' object has no attribute 'files'"
+    _(fixed in TimestampMod v0.2.8)_
     * The timestamp file was the only file committed when using `commit` without file specification or patters.  It appeared to only affect Linux users.  The internal `match` list was being incorrectly populated - it should have remained empty.
+    _(fixed in TimestampMod v0.2.7)_
 
 ### __0.2.6 (beta)__ - _July 11, 2012_
 This is a bug-fix release.  

File Tests/BBI42_CommitSubrepos.bat

View file
  • Ignore whitespace
+::------------------------------------------------------------------------------
+:: 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
+echo.
+echo Initializing Test Repository...
+if exist testrepo rmdir /S /Q testrepo
+mkdir testrepo
+cd testrepo
+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 ____________________________________________
+pause
+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 ____________________________________________
+pause
+echo.
+echo.
+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 ____________________________________________
+pause
+cd..

File Tests/BBI42_CommitSubrepos.sh

View file
  • Ignore whitespace
+#!/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`

File TimestampMod.py

View file
  • Ignore whitespace
 # end help text
 #=============================================================================
 # TimestampMod.py - Automatically save and restore file modification times 
-File_Version = '0.2.7'  # Version number definition
+File_Version = '0.2.8'  # Version number definition
 # --> !!BETA RELEASE!!! <--
 # Copyright 2011-2013 Nathan Durnan <nedmech@gmail.com>
 #
 #	recorded and restored during commit, update, revert, etc. operations.
 #
 # Development information:
-#	Mercurial Version:  1.8.3 - 2.5.2 (from TortoiseHg package)
+#	Mercurial Version:  1.8.3 - 2.7.2 (from TortoiseHg package)
 #	Python Version:     2.6.6 - 2.7.3 (from TortoiseHg package)
-#	TortoiseHg Version: 2.0.4 - 2.7.1
+#	TortoiseHg Version: 2.0.4 - 2.9.2
 #=============================================================================
 
 #=============================================================================
 		elif (File_TimestampRecords not in match.files()):
 			#Record file must get added to list if any match is specified.
 			match.files().append(File_TimestampRecords)
+			repo.ui.debug('Match Files: ', str(match.files()), '\n')
 		# end of check match conditions
-		repo.ui.debug('Match Files: ', str(match.files()), '\n')
 	#end of check for merge-commit.
 	repo.ui.note('TimestampMod|Wrap_Commit finished!\n______\n')
 	return repo.timestamp_origcommit(