record: do not include files into changes count
This turns the prompt sequence from something like:
$ examine changes to foo?
$ record change 1/4 to foo?
$ record change 2/4 to foo?
$ examine changes to bar?
$ record change 4/4 to bar?
into:
$ examine changes to foo?
$ record change 1/3 to foo?
$ record change 2/3 to foo?
$ examine change to bar?
$ record change 3/3 to bar?
import os
from mercurial import hg, ui
u = ui.ui()
repo = hg.repository(u, 'test1', create=1)
os.chdir('test1')
# create 'foo' with fixed time stamp
f = open('foo', 'w')
f.write('foo\n')
f.close()
os.utime('foo', (1000, 1000))
# add+commit 'foo'
repo[None].add(['foo'])
repo.commit(text='commit1', date="0 0")
print "workingfilectx.date =", repo[None]['foo'].date()