Re: [PATCH] [RFD] Add repoid identifier to commit
- From
Sean <seanlkml@sympatico.ca>
- Date
- May 12, 2005, 18:18 UTC
- Message-ID
- <1234.10.10.10.24.1115921886.squirrel@linux1>
- In-Reply-To
- <7vvf5ogxdu.fsf@assigned-by-dhcp.cox.net>
On Thu, May 12, 2005 1:35 pm, Junio C Hamano said:
Show 6 quoted lines
> If that is not needed, then you can record in an auxiliary file > that is local to each tree the timestamp of when merge happened > in that tree along with set of foreign commit objects, and teach > rev-tree or rev-list to read from that auxiliary file and use > that timestamp for foreign commit objects instead of commit time > recorded in them when sorting by time is needed.
The time is already recorded. Ie. the commit object is a separate file with a modification time which can be used as a "local commit timestamp". If you want to protect those time stamps by also recording them in a separate file, that's a bonus I guess but shouldn't really be needed.
You can descend the history tree based on the parent position as described by Jon Seymour. That is, Cogito lists the "local" parent first, so you descend that branch marking off visited nodes, then descend the other branches reporting unvisited nodes only. Afterward return and list any unreported nodes in the first branch.
Of course, the problem with that is a fast forward node, where you can't just blindly pick the first parent listed because it may belong to another repository. So the answer is to do away with fast forward nodes, or give up on using the ordering of the parents to mean anything. In which case you have to pick the parent with the oldest local commit time as the first node to descend.
So it seems, that rather than a repository identifier, we need each repository to record the time of each local commit. Either in a separate file or just using the object file timestamps directly.
Sean