File | Date | Author | Commit |
---|---|---|---|
Tests | 2021-10-25 |
![]() |
[d6b5b8] Updating documentation. |
.hgignore | 2021-10-12 |
![]() |
[d02bf0] TestSuite: fixed invalid directory separators i... |
.hgtags | 2024-07-08 |
![]() |
[1e7fb1] Added tag Beta for changeset 83e78d3ed357 |
.hgtimestamp | 2024-07-08 |
![]() |
[1e7fb1] Added tag Beta for changeset 83e78d3ed357 |
README.md | 2024-07-08 |
![]() |
[83d95a] Moving Beta tag to Version 0.3.5 changeset 83e7... |
TimeStampMod.png | 2011-05-10 |
![]() |
[eb1638] Add image file for BitBucket project. |
TimestampMod.py | 2024-07-06 |
![]() |
[0263ff] Fix: Mercurial 6.4 error: calling 'set_tracked'... |
IMPORTANT! Due to BitBucket dropping support for Mercurial, this project has moved to https://sourceforge.net/projects/timestampmod/.
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 hosted at https://osdn.net/projects/mercurialextensions/scm/hg/timestamp/.
The intent of this extension is to ease the transition from manual file system based version control into the Mercurial DVCS world. Typically, manual file system based version control methods rely on copying and synchronizing files centered around file modification timestamp information. Under any modern VCS, this timestamp information is regarded as unimportant since the VCS manages all of the revision tracking between revision records. This means that the default behavior of most VCS is to set the file modification time to the time that the file was updated by the VCS instead of the original modification time. This is a behavior that can be confusing and lead to mistrust of the VCS by new users who are not yet familiar with VCS concepts.
Incorporating automatic timestamp saving and restoring into an extension allows Mercurial to add an extra level of comfort to those users who are more familiar with manually managing their version control via traditional file management.
This extension was developed for use with the following:
Note that only Mercurial is required for the use of this extension. However, there are some configuration requirements that are specific to either command line Mercurial or TortoiseHg.
Also note that forward development of this extension is not guaranteed to remain backward-compatible with older Mercurial/Python/TortoiseHg versions. Some changes in Mercurial and TortoiseHg may break the backwards-compatibility of this extension.
Latest known compatible versions:
It may also be worth noting that this extension was originally developed and tested on Windows XP SP3 (32-bit), Windows 7 Professional (64-bit), and , Windows 10 Professional (64-bit). It has been confirmed to work on Linux Ubuntu 12.04. Functionality under other operating systems my not be one-hundred-percent reliable. Some major work has been contributed to make this extension run correctly with Python 3 and OSX, however future development or changes to Mercurial are not guaranteed to remain compatible.
Download the TimestampMod.py file and saving it on your computer. A typical location for the file would be in an "Extensions" under the TortoiseHg program data folder (usually "C:\ProgramData\TortoiseHg\"). Note that this folder may need to be added manually. The extension may be located in any folder, just keep track of where it is located for setting up the path to it later.
Edit the appropriate configuration file:
Add an entry into the extensions section of the configuration file similar to the following:
[extensions]
TimestampMod = C:\ProgramData\TortoiseHg\Extensions\TimestampMod.py
Adjust the path as needed to match your installation.
If using TortoiseHg, some of the hooks will need to be manually configured. Add entries into the hooks section of the configuration file (mercurial.ini) similar to the following:
[hooks]
post-merge.TimestampMod = python:C:\ProgramData\TortoiseHg\Extensions\TimestampMod.py:Hook_Post_Merge
post-resolve.TimestampMod = python:C:\ProgramData\TortoiseHg\Extensions\TimestampMod.py:Hook_Post_Resolve
post-revert.TimestampMod = python:C:\ProgramData\TortoiseHg\Extensions\TimestampMod.py:Hook_Post_Revert
Adjust the paths as needed to match your installation.
NOTE: This section may be out of date for the current versions of resources.
When this extension is used with the command line Mercurial package (installed separately from TortoiseHg), an additional Python package must be referenced. The Python package that is distributed with the command line Mercurial installation (as of version 2.1.2) is missing some of the library elements needed by this extension. The package that is distributed with TortoiseHg (version 2.0.5+) is sufficient, or a full Python package may be installed.
Download and install at least Python 2.6.6 from:
http://python.org/download/releases/2.6.6/
After installing TortoiseHg or Python, the extension must be informed of the Python library path so it can access the required library components. Add a paths
section and entry to the configuration file (mercurial.ini or hgrc) similar to the following:
[paths]
PythonLibPath = C:\Python26\lib
or
[paths]
PythonLibPath = C:\Program Files\TortoiseHg\library.zip
Adjust the path as needed to match your installation.
Open any command prompt and issue the following command to check of the extension is properly installed:
hg help timestamp_mod
If the installation was installed correctly, the output should be similar to the following:
C:\>hg help timestamp_mod
hg timestamp_mod [-s | -r]
C:\ProgramData\TortoiseHg\Extensions\TimestampMod.py
(Version 0.3.5)
Save or restore file modification times.
options:
-s --save save modification times
-r --restore restore modification times
use "hg -v help timestamp_mod" to show more info
C:\>
Nothing further is required to make the extension work. It will automatically save and restore timestamps for all files tracked in the repository during commit and update actions.
These release notes will not cover every version, just tip of the repository and previous major release points.
This is a compatibility/bug-fix release.
ALL USERS OF v0.3.x ARE URGED TO UPDATE TO THIS VERSION!
This is a compatibility/bug-fix release.
ALL USERS OF v0.3.x ARE URGED TO UPDATE TO THIS VERSION!
This is a compatibility/bug-fix release.
This is a compatibility/bug-fix release.
This is a bug-fix release.
This is a compatibility / bug-fix release.
missing attribute 'norepo'
AttributeError: 'function' object has no attribute 'norepo'
This is a bug-fix release.
repo.parents() is deprecated
'mergestate' object has no attribute '\_state'
This is a bug-fix release.
--subrepos
option resulted in error message "'NoneType' object has no attribute 'files'"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.This is a bug-fix release.
hg revert
was used with a folder name. The extension was attempting to treat the folder name as a reverted file, but could not find the timestamp data for it. The extension now distinguishes between reverting files and reverting folders and applies timestamps to the files within a reverted folder.qrefresh
was calling commit with match.files() as set() instead of list(). The TimestampMod extension now coerces the match.files() object to a list to avoid this issue.This is a feature change beta release. The format of the timestamp file (.hgtimestamp) has changed with this release in order to be more forward-compatible.
This is a stable beta release that addresses several previous issues.
It is nearly ready to move from beta to production!
This is an initial beta release. Undiscovered issues are expected.
Every attempt is made to keep this extension up-to-date and in working order,but there are occasional problems that arise in the development process. These issues will be noted here, and possible work-around recommendations provided if at all possible.
Because the timestamp record file is modified on every commit, there are nearly always merge conflicts with the timestamp file. Most of the time, these are trivial and can be resolved with a simple "Tool Resolve" option. Manually resolving the differences is not too difficult either. Just keep in mind that a larger timestamp number means a newer timestamp. The timestamps are stored as Unix Epoch values, so they may be manually decoded/encoded if needed as well. This issue can affect any commands that involve merging such as graft or import (when dealing with patches). No further work will be done on this issue. After spending much time imagining how this could be automated, it was decided that it is best left to the user to determine the most appropriate timestamps to keep when merging the timestamp file.
As of Version 0.3.4 of this extension, filenames are treated internally as binary data instead of strings to align with how Mercurial treats them internally and allow for Python3 compatibility and better handing of non-ASCII filenames.
If you are not familiar with installing extensions for Mercurial/TortoiseHg, it is strongly recommended to review the UsingExtensions wiki page from Mercurial. The wiki documents the basic use of extensions, as well as provides links to additional extensions that you may find useful.
Project statistics for this extension are tracked using the Ohloh public open-source software directory. Please reference the following for this extension and its dependencies: