unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Bzr question about moving and renaming files
Date: Thu, 20 Jun 2013 22:17:18 +0200	[thread overview]
Message-ID: <87ppvgh701.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <miy5a4hkgk.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 20 Jun 2013 11:26:35 -0400")

On Thu, 20 Jun 2013 11:26:35 -0400 Glenn Morris <rgm@gnu.org> 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



  reply	other threads:[~2013-06-20 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 15:01 Bzr question about moving and renaming files Stephen Berman
2013-06-20 15:26 ` Glenn Morris
2013-06-20 20:17   ` Stephen Berman [this message]
2013-06-20 20:51     ` Stefan Monnier
2013-06-20 21:07       ` Stephen Berman
2013-06-20 16:57 ` Eli Zaretskii
2013-06-20 20:17   ` Stephen Berman
2013-06-20 20:55     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppvgh701.fsf@rosalinde.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).