revision = metadata.revno_to_rcs(ctx.start)
with backend.lifter(arg):
backend.checkout(arg, revision)
- # Changes the access and modification times
- # Later, src status will see this. Alas,
- # there's a tiny race window here.
- os.utime(backend.master(arg), None)
+ # We change access and modification times of
+ # both history and workfile to avoid a race
+ # condition if src status is donw within a second.
+ st = os.stat(backend.master(arg))
+ os.utime(backend.master(arg), (st.st_atime, st.st_mtime))
+ os.utime(arg, (st.st_atime-1, st.st_mtime-1))
if not quiet and len(args) > 1:
announce("%s <- %d" % (arg, ctx.start))
with backend.lifter(arg):
set_method(name, revision, metadata, arg)
if not quiet and len(args) > 1:
- # FIXME: Misleading message when creating a branch.
- #announce("%s %s = %s in " % (legend, name, revno, arg))
+ announce("%s %s = %s in " % (legend, name, revno, arg))
pass
def tag_method(*args):
src $TESTOPTS status testfile16 | grep "^U" >/dev/null
check "U status check after first commit"
-sleep 2 # ensures the timestamp changes
echo "Add a second line" >>testfile16
src $TESTOPTS status testfile16 | grep "^M" >/dev/null
check "M status check after modification"