From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Bzr question about moving and renaming files Date: Thu, 20 Jun 2013 22:17:18 +0200 Message-ID: <87ppvgh701.fsf@rosalinde.fritz.box> References: <87wqpohln3.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371759453 1764 80.91.229.3 (20 Jun 2013 20:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 20:17:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 20 22:17:34 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UplIR-0001oA-Pr for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 22:17:31 +0200 Original-Received: from localhost ([::1]:46478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UplIR-0007Xv-C6 for ged-emacs-devel@m.gmane.org; Thu, 20 Jun 2013 16:17:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UplIK-0007Qt-MP for emacs-devel@gnu.org; Thu, 20 Jun 2013 16:17:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UplIH-0007Ne-Ln for emacs-devel@gnu.org; Thu, 20 Jun 2013 16:17:24 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:53987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UplIH-0007NH-Bw for emacs-devel@gnu.org; Thu, 20 Jun 2013 16:17:21 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.31]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MRQfu-1Uj4Fk2GLY-00SjBR for ; Thu, 20 Jun 2013 22:17:20 +0200 Original-Received: (qmail invoked by alias); 20 Jun 2013 20:17:20 -0000 Original-Received: from i59F54BAE.versanet.de (EHLO rosalinde.fritz.box) [89.245.75.174] by mail.gmx.net (mp031) with SMTP; 20 Jun 2013 22:17:20 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18odT0Fbx8ocR8Ql1NQvRyxVvUid0cDZKZQldnkVE 2NLP/g6KGoNFVz In-Reply-To: (Glenn Morris's message of "Thu, 20 Jun 2013 11:26:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160779 Archived-At: On Thu, 20 Jun 2013 11:26:35 -0400 Glenn Morris wrote: > Stephen Berman wrote: > >> I did a test run in my local branch, and had to use two commits: >> first, rename calendar/todo-mode.el to obsolete/otodo-mode.el, commit >> this, and then add the new version as calendar/todo-mode.el and commit >> that. I had tried adding the new version before committing the rename, >> but vc-rename-file errored with "Please update files before moving >> them". > > I am sure you would get a more authoritative answer to bzr questions on > the bzr mailing list, but it works fine for me to use one commit: > > mkdir /tmp/foo > cd /tmp/foo > bzr init > touch foo > bzr add foo > bzr commit -m "c1" > bzr mv foo bar > touch foo > bzr add foo > bzr commit -m "c2" The subject line should probably have said "VC question...", because that's what I was using (with the bzr backend) and that's where the problems seem to be. I'm not able to reproduce the error I reported above; perhaps I did something wrong before to get that. But I still can't rename a file and before committing that add another file with the same name as the one before the renaming. Here's what I did: 1. I reproduced your steps through the first `touch foo', then with emacs -Q called vc-dir on /tmp/foo, which showed file foo unregistered. 2. I typed `i' to register it, successfully, then `v' to get a log buffer, entered a message and typed `C-c C-c' to commit the change. 3. Then `M-x vc-rename-file foo RET bar', which also succeeded, but didn't commit this. 4. Then back to the shell and again `touch foo', then back to vc-dir, which shows: edited bar (renamed from foo) unregistered foo 5. Now when I type `i' on foo, it fails with "vc-register: This file is already registered". Only after typing `v' on file bar and committing the rename can I successfully type `i' on the new foo to register it. Is this a known limitation of VC or a bug? Steve Berman