Auto-refresh proposal

Qi Yang qi.yang137 at gmail.com
Mon Feb 15 14:48:44 CST 2010


Hi,

Given "auto-status" proposal is set (
http://selenic.com/pipermail/mercurial-devel/2010-February/018892.html). I'd
like to propose to directly call bfrefresh when doing commit in bfiles and
make "bfrefresh" command private.

The benifit of doing so include the following:

1.       No worries about inconsistency between standin and bfile

   - Standin and bfiles will be synchronized when commit. The only time when
   they are out of sync would be: a. when "hg up -r <revision#>" is called or
   b. when standin file is manually changed by user.
   - In scenario a. we can either enable “auto-update” or give a warning
   message to user when “hg up” is called and “auto-update” is not enabled.
   - In scenario b. we can detect if the standin file is modified by compare
   the mtime(standin) and the latest commit time.

2.        Easier to detect when standin is modified by user

   - There has been a lot of discussion about how to detect this problem (
   http://selenic.com/pipermail/mercurial-devel/2010-February/018539.html)
   if we this proposal is possible, we could simplify this problem and solve it
   as solution in scenario b.

3.       No need for .hg/bfiles/pending

   - Since the standin file will only be update when commit is called,
   there’s no need for the “pending” standin files to exist.



More information about the Mercurial-devel mailing list