hi,
I noted the following strange behaviour. I use a loop over a number of
revisions in a `hg' repo like this
8<-----------------------------------
for revnum in $revnums; do
hg up $revnum
log=$(hg log --style compact -r $revnum)
msg=${log##*$'\n'+( )}
set $log
date="$3 $4:01"
# ----------- think .. -------------
#
# here's something to think about: without this short `sleep'
# fossil does sometimes not notice that changes have occurred
#
sleep 0.1
#
# possible explanation: `fossil' looks at mtime and
# does this with a too low time resolution.???
# ----------- think .. -------------
extras=$(fossil extras)
print extras: $extras
[[ -z $extras ]] || fossil add $extras
if (( revnum >= 208 )); then
breakpoint
fi
changes=$(fossil changes)
print changes: $changes
[[ -z $changes ]] || fossil ci --date-override "$date" -m "$revnum:$msg"
done
8<-----------------------------------
in order to convert those revisions (affecting only a small subset of the
files tracked in the `hg' repo)
to a `fossil' repo. problem: in a small fraction ( ~ 1/100 ) of iterations
`fossil changes' returns nothing despite
the fact that the corresponding file definitely has changed on disk except
when a quite long (0.1 second) sleep is introduced in the loop (not
necessarily between the `hg up' and `fossil changes'). (NOTE: it's in fact
a 0.1 second sleep since this is ksh...).
how can this be? the `hg up' completes and (obviously and actually)
modifies the file system (in the fossil checkout directory). this
action is completed (file system, more specifically, one of the files
tracked by `fossil' _is_ modified) but `fossil changes' happily reports
nothing (no changes) and consequently nothing is checked into the `fossil'
repo, effectively simply skipping the affected checkin and then including
the cumulative changes in the next checkin during the following iteration.
I guess the problem might be related to `fossil' checking `mtime' with a
too low time resolution. is this possible? it is of course irrelevant for
interactive use but not so for scripts like this one.
j.
ps: all happening on the local disk and with macosx and fossil 1.26
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users