And here's my fourth, this time with the attachment. :(
> The following diff lets you use "file:FILENAME" where a datespec is
> needed (e.g., -D flag) -- it gets the date from the file's modtime. It
> also adds "date:" as a prefix in you case you already have a file named
> 11/01/00 :)
>
> It seems to me this makes merging in&out among branches easier and safer
> (more atomic) -- you don't have to worry about someone coming in and
> updating a file between your merges. Right?
>
> Here's how I'd use it to merge out from the main to my branch. Make
> sense?
> update -jHEAD:file:.last -jHEAD:file:now >.now && mv .now .last
>
> /r$
>
> PS: Apologies for the test-spam the other day; this is my third attempt
> to get this note out to the list.
Index: src/main.c
===================================================================
RCS file: /home2/cvsroot/ccvs/src/main.c,v
retrieving revision 1.152
diff -c -r1.152 main.c
*** src/main.c 2000/07/10 19:34:21 1.152
--- src/main.c 2000/07/11 13:26:31
***************
*** 1069,1075 ****
{
time_t unixtime;
! unixtime = get_date (rawdate, (struct timeb *) NULL);
if (unixtime == (time_t) - 1)
error (1, 0, "Can't parse date/time: %s", rawdate);
return date_from_time_t (unixtime);
--- 1069,1086 ----
{
time_t unixtime;
! if (strncmp(rawdate, "file:", 5) == 0)
! {
! struct stat sb;
! rawdate += 5;
! unixtime = stat(rawdate, &sb) < 0 ? (time_t)-1 : sb.st_mtime;
! }
! else
! {
! if (strncmp(rawdate, "date:", 5) == 0)
! rawdate += 5;
! unixtime = get_date (rawdate, (struct timeb *) NULL);
! }
if (unixtime == (time_t) - 1)
error (1, 0, "Can't parse date/time: %s", rawdate);
return date_from_time_t (unixtime);