Package: mercurial Version: 0.9.5-2 Severity: normal >From #mercurial on irc.freenode.net (I am twb):
twb> I found a bug. Follow my logic: twb> twb> 1. I run hg ci. twb> 2. it starts up an editor to add a commit message twb> 3. WITHOUT closing that editor, I make additional edits to the twb> file being committed, then close the editor. twb> twb> Now, hg ci has not committed these extra changes, but twb> subsequent hg ci and hg st ignore them, because the twb> original hg ci has decided that it has checked in all twb> changes up to the time it FINISHED running twb> I did `touch *' and suddenly hg st reported a whole bunch twb> of changes that would have been LOST COMPLETELY if I had twb> not been a paranoid bastard pmezard> did you add the file in same commit ? pmezard> or just modified it ? twb> I just modified it. pmezard> ok twb> I may have used hg record rather than hg ci initially, but I twb> don't think so. It looks to me (without examining the code) like hg ci is doing 1. collecting changes; 2. using $EDITOR to get a commit message; and 3. note the mtime of each file in .hg somewhere. hg st then only examines files with newer mtimes than hg ci noted. Because changes were made between steps (1) and (3), hg decides they do not exist until the mtime is changed (by more edits of by touch(1)). It tells the user that there are no uncommitted changes. Since (1) and (3) are very quick, but (2) waits for the user and could thus take minutes or hours, I suggest that the order of (2) and (3) be reversed. This would mean that this race condition has a much narrower window in which to occur. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (990, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.22-3-amd64 (SMP w/1 CPU core) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages mercurial depends on: ii libc6 2.6.1-6 GNU C Library: Shared libraries ii python 2.4.4-6 An interactive high-level object-o ii python-support 0.7.5 automated rebuilding support for p ii python2.5 2.5.1-5 An interactive high-level object-o Versions of packages mercurial recommends: ii meld 1.1.5.1-2 graphical tool to diff and merge f ii rcs 5.7-21 The GNU Revision Control System ii tk8.4 [wish] 8.4.16-2 Tk toolkit for Tcl and X11, v8.4 - -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

