reset file modification time when go back in time?
dhruva
dhruvakm at gmail.com
Tue Nov 6 23:33:55 CST 2007
Hi,
On 11/6/07, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> Not really. Before that happens, we need to understand that we the term
> 'timestamp' in everything you have written so far refers to at least two
> different things:
>
> * The commit time recorded as part of a changeset
>
> * The modification time of a file in the workspace area
>
> Which one of the two are you interested in, and what is it in the
> current behavior that you would like to change?
I am interested in the first (commit time recorded in the changeset).
I feel this could be implemented as an extension as follows:
1. On getting a changeset into the repo (either from a
clone/pull/import or a local commit), update a PYTHON persistent
dictionary with the changeset ID and the current epoch time
2. On applying the change set (update), get the timestamp for that
changeset ID from the dictionary, find the raw files from the
changeset and apply the time stamp after extracting the file
(something like modifying the stat buffer)
3. If the dictionary does not have an entry for the changeset ID,
create it in step #2. This will take care if the dictionary file was
deleted or corrupted.
The advantage of an extension approach is that will not affect the
current/default behavior.
I would like to provide another workflow where this would be a useful feature.
1. I use CVS access to get the Emacs source to my local machine
2. I maintain 2 Emacs CVS branches as 2 branches in mercurial
3. A third branch is where I do my local changes and build. I keep
merging the CVS head to my private branch in mercurial
4. On a regular basis, I change to the hg branch corresponding to CVS
HEAD and do a commit and I DO NOT build that branch
5. I switch to my local hacks hg branch and do a branch merge from the
hg branch with CVS HEAD. When I build, instead of only those modified
files getting built, all the sources gets built as I have switched to
HEAD and back.
-dky
--
Dhruva Krishnamurthy
Contents reflect my personal views only!
More information about the Mercurial
mailing list