Differences between revisions 2 and 9 (spanning 7 versions)
Revision 2 as of 2011-08-11 17:24:56
Size: 3874
Editor: 68-116-18-77
Comment:
Revision 9 as of 2020-04-08 17:18:25
Size: 5208
Editor: NathanDurnan
Comment: Updating links after moving to SourceForce since BitBucket is dropping Mercurial support. Also updated requirements section to latest version.
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from TimestampMod Extension
Line 4: Line 5:
TimeStampMod is an extension for Mercurial DVCS that incorporates automatic
saving and restoring of the modification times of files under version control.
Automatically Saves and Restores file timestamps for all files in the repository.
Line 15: Line 15:
Repository: ''https://bitbucket.org/nedmech/timestampmod'' Repository: http://hg.code.sf.net/p/timestampmod/code
Line 17: Line 17:
Web page: ''https://bitbucket.org/nedmech/timestampmod/overview'' Web page: ''https://sourceforge.net/projects/timestampmod/''
Line 21: Line 21:
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 TimestampExtension by Friedrich
Kastner-Masilko <face@snoopie.at> hosted at https://bitbucket.org/face/timestamp.
[[TimestampModExtension|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 TimestampExtension by Friedrich Kastner-Masilko <face@snoopie.at> hosted at https://osdn.net/projects/mercurialextensions/scm/hg/timestamp/.
Line 26: Line 23:
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.
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.
Line 37: Line 25:
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.
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.
Line 46: Line 32:
Note that only Mercurial is required for the use of this extension. However,
there are some peculiarities in the code specific to use with TortoiseHg. It
may also be worth noting that this extension was developed and tested only on
Windows XP SP3, so functionality under other operating systems my not be
one-hundred-percent reliable.
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:

 * TortoiseHg 5.0
 * Mercurial 5.0
 * Python 2.7

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.
Line 53: Line 45:
Configure your .hgrc (or mercurial.ini file for TortoiseHg) to enable the
extension by adding following lines:
NOTE: Full up-to-date instructions can be found on the Web page: ''https://sourceforge.net/projects/timestampmod/''

Configure your .hgrc (or mercurial.ini file for TortoiseHg) to enable the extension by adding following lines:
Line 61: Line 54:
Nothing further is required to make the extension work. It will set up it's own
hooks that will trigger during committing and updating actions automatically.
There are built-in manual commands that can be executed from the command line
as follows:
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:/path/to/TimestampMod.py:Hook_Post_Merge
post-resolve.TimestampMod = python:/path/to/TimestampMod.py:Hook_Post_Resolve
post-revert.TimestampMod = python:/path/to/TimestampMod.py:Hook_Post_Revert
}}}

Nothing further is required to make the extension work. It will set up it's own hooks that will trigger during committing and updating actions automatically.

== Command Usage ==
To see a complete list of the built-in manual commands that can be executed from the command line, enter the following command:
{{{
hg timestamp_mod --help
 - or -
hg timestamp_mod -h
}}}
The commands to manually save and restore timestamps for all files in the repository are as follows:
Line 69: Line 77:
These commands respectively Save and Restore timestamps for all files in the
repository.
To view the list of all timestamps recorded in the repository, use the timestamp_mod command without any arguments:
{{{
hg timestamp_mod
}}}

TimestampMod Extension

Automatically Saves and Restores file timestamps for all files in the repository.

1. Status

This extension is not distributed with Mercurial.

Author: Nathan Durnan

Repository: http://hg.code.sf.net/p/timestampmod/code

Web page: https://sourceforge.net/projects/timestampmod/

2. Overview

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 TimestampExtension by Friedrich Kastner-Masilko <face@snoopie.at> 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.

3. Requirements

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.

4. Configuration

NOTE: Full up-to-date instructions can be found on the Web page: https://sourceforge.net/projects/timestampmod/

Configure your .hgrc (or mercurial.ini file for TortoiseHg) to enable the extension by adding following lines:

[extensions]
TimestampMod = /path/to/TimestampMod.py

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:/path/to/TimestampMod.py:Hook_Post_Merge
post-resolve.TimestampMod = python:/path/to/TimestampMod.py:Hook_Post_Resolve
post-revert.TimestampMod = python:/path/to/TimestampMod.py:Hook_Post_Revert

Nothing further is required to make the extension work. It will set up it's own hooks that will trigger during committing and updating actions automatically.

5. Command Usage

To see a complete list of the built-in manual commands that can be executed from the command line, enter the following command:

hg timestamp_mod --help
 - or - 
hg timestamp_mod -h

The commands to manually save and restore timestamps for all files in the repository are as follows:

hg timestamp_mod -s
hg timestamp_mod -r

To view the list of all timestamps recorded in the repository, use the timestamp_mod command without any arguments:

hg timestamp_mod

6. See also

Alternatives to this timestamp extension include:

  • Friedrich Kastner-Masilko's original TimestampExtension. It requires manual creation of the tracking file and manual additions to the tracking file for each file to be tracked. However, this does allow for only specific file timestamps to be tracked instead of all files in the entire repository.)

  • Esben Skovenborg's timestamp hook. It manages timestamps for all files in the repository automatically, but instead of the file modification time, file timestamps are restored to the timestamp associated with the last Revision involving each file in the repository. This is similar to the alternate behavior that Subversion incorporates.

Other options may also be available, but are unknown at the time this wiki was created.


CategoryExtensionsByOthers

TimestampModExtension (last edited 2020-04-08 17:18:25 by NathanDurnan)