From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chet Wood Newsgroups: gmane.emacs.bugs Subject: SCCS version control cannot cope when latest delta is of type 'removed' Date: Thu, 26 Oct 2006 17:32:08 -0700 (PDT) Message-ID: <200610270032.k9R0W8Xc018443@windhorse.sfbay.sun.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1161937924 11028 80.91.229.2 (27 Oct 2006 08:32:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 27 Oct 2006 08:32:04 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 27 10:32:01 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GdN8A-0004Ao-5D for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Oct 2006 10:31:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GdN89-0002Bj-M2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Oct 2006 04:31:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GdFdt-0007RK-BZ for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2006 20:32:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GdFdr-0007R8-Sd for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2006 20:32:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GdFdr-0007R5-MN for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2006 20:32:11 -0400 Original-Received: from [192.18.98.31] (helo=brmea-mail-1.sun.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GdFdr-00038o-G3 for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2006 20:32:11 -0400 Original-Received: from sfbaymail1sca.SFBay.Sun.COM ([129.145.154.35]) by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id k9R0W9mQ017320 for ; Thu, 26 Oct 2006 18:32:09 -0600 (MDT) Original-Received: from windhorse.sfbay.sun.com (windhorse.SFBay.Sun.COM [129.144.67.56]) by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id k9R0W94j004283; Thu, 26 Oct 2006 17:32:09 -0700 (PDT) Original-Received: from windhorse.sfbay.sun.com (localhost [127.0.0.1]) by windhorse.sfbay.sun.com (8.12.10+Sun/8.12.10) with ESMTP id k9R0W8pE018446; Thu, 26 Oct 2006 17:32:09 -0700 (PDT) Original-Received: (from cwood@localhost) by windhorse.sfbay.sun.com (8.12.10+Sun/8.12.10/Submit) id k9R0W8Xc018443; Thu, 26 Oct 2006 17:32:08 -0700 (PDT) Original-To: bug-gnu-emacs@gnu.org X-Mailman-Approved-At: Fri, 27 Oct 2006 04:31:56 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15396 Archived-At: This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.4.1 (sparc-sun-solaris2.8, X toolkit) of 2005-12-14 on pkg-build configured using `configure --prefix=/pkg/gnu --x-includes=/usr/openwin/include:/usr/dt/include --x-libraries=/usr/openwin/lib:/usr/dt/lib --with-x --with-x-toolkit=athena --without-toolkit-scroll-bars --with-xpm --with-tiff --with-jpeg --with-gif --with-png' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: In the shell using regular sccs commands, or in emacs using C-x C-q, check out an sccs-versioned file that has had its latest delta removed. Then, in another emacs session, VC commands, such as vc-directory or vc-next-action, fail. When vc-sccs-workfile-version(file) searches for the latest version number in the sccs file, it searches for "^Ad D". However, there can be another type of delta, namely "^Ad R". In this case, the delta does not really exist-- it was removed, leaving this delta entry as a "bread crumb" in the sccs file. The search is limited to the first delta entry, so it fails and the function returns nil, and as a result, a blank version number is passed to vcdiff and it fails. I tried changing the search to accept [D|R] but it then returns the removed delta number, which does not really exist, and other errors ensue. (This scenario happens sometimes when the Sun CodeManager configuration management tool is used. It apparently inserts its own bookkeeping comments by adding and removing a delta. It seems to happen when a new file is added to the workspace, then the workspace is putback to another workspace.) Suggested Fix: The search should skip the top delta in the sccs file if it is of type "removed", and return the version number of the next delta. But IMHO it would be more robust to run the command "sccs prt filename" to obtain the version, rather than relying on the internal file format, assuming this works on all platforms. A workaround is to make a change to the checked-out file (like adding a blank line to the end or any other change) and check it back in outside of emacs, creating a real latest delta. Then it can be checked out again, and should work fine. Thanks. Chet Wood Sun Microsystems Recent input: C-x C-b C-x o C-n C-n o C-p C-p C-p C-p C-p C-SPC C-n C-n C-n C-n C-n w C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-n C-SPC C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-x C-x C-x C-x C-x C-x C-x C-x w M-x e m a c s - r e p SPC r e p o r SPC b SPC u SPC SPC SPC SPC Recent messages: vc-sccs-workfile-version Reading directory /home/cwood/tmp/p/...done Buffer includes 3 directories Getting version information... Running vcdiff on /home/cwood/tmp/p/SCCS/s.x_10.h... vc-do-command: Running vcdiff...FAILED (status 2) Reading directory /home/cwood/tmp/p/...done Mark set [2 times] Saved text from ";; Codemgr inserts and deletes a delta i" Loading emacsbug...done