unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: bzg@gnu.org, christopher@ch.ristopher.com, emacs-devel@gnu.org
Subject: Re: bzr commit raises a weird conflict
Date: Tue, 09 Apr 2013 18:31:10 +0300	[thread overview]
Message-ID: <831uajbu0x.fsf@gnu.org> (raw)
In-Reply-To: <20130409102803.GB10276@saturn>

> Date: Tue, 9 Apr 2013 12:28:04 +0200
> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
> Cc: Christopher Schmidt <christopher@ch.ristopher.com>
> 
> > "~$ bzr commit" complains about a conflict.

Bastien should have seen this conflict announced when you updated or
merged from upstream.  He probably didn't notice that, but he can look
that up in your ~/.bzr.log entry for the time of update/merge.

> > "~$ bzr conflicts" yields:
> >   Conflict: can't delete leim/ja-dic because it is not empty.  Not deleting.
> >
> > I first ran "~$ make maintainer-clean" before trying to commit,
> > because I did build Emacs from this directory.

maintainer-clean cannot resolve this, because the problem is not in
the file system.  The problem is in the history meta-data.  Deleting
files or directories manually, when such conflicts happen, doesn't
help, because bzr cannot detect when these conflicts are resolved; you
must tell it explicitly about the resolution, using the "bzr resolve"
command.  The documentation I mentioned in my other mail in this
thread says that bzr needs to be told when the conflict is resolved
(unlike with text conflicts, where it can detect resolution
automatically).

> That's because leim/ja-dic/ was removed recently, but if you are merging
> in an unclean checkout (with build output from previous builds), bzr
> notices that:
> 
>   (a) The directory should be removed as part of the merge
>   (b) The directory is not empty
> 
> So it takes the safer approach of aborting the merge with a conflict,
> instead of blindly removing the directory.
> 
> This is an artifact of the fact that bzr likes tracking directory
> changes too, as part of the branch history.  In this case it acts a bit
> silly, because there are *no* files tracked remaining after the
> directory is fully removed from a branch, so it should just go ahead and
> remove the directory from the branch, but leave the filesystem intact.

It is not silly.  "bzr up" merges the upstream with what you have, and
also leaves intact any unversioned files you happen to have. Bazaar
cannot know what is the unversioned file in the directory that was
deleted upstream.  It could just be a new file you intend to add to
version control, but just didn't yet "bzr add".  If bzr removes the
directory from the history metadata, that file would become an
orphan--you won't be able to add it, because its parent directory is
gone.  (That directory and its history could be recovered, of course,
but doing that is non-trivial, either.)  So bzr punts and leaves it to
you to resolve the snafu.

If this branch is never used to add new files, Bastien can prevent
this nuisance by setting the bzr.transform.orphan_policy option, see
the description in "bzr help conflict-types".

> Since there are no files left in the originally tracked directory,
> future merges or updates will not care about this path anyway.

"bzr update" preserves unversioned files as well, because that could
be work in progress that you don't want to lose.



      parent reply	other threads:[~2013-04-09 15:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09  7:50 bzr commit raises a weird conflict Bastien
2013-04-09  8:42 ` Christopher Schmidt
2013-04-09  9:37   ` Bastien
2013-04-09 15:13   ` Eli Zaretskii
2013-04-10  7:38     ` Christopher Schmidt
2013-04-10 15:31       ` Eli Zaretskii
2013-04-12  8:49         ` Bastien
2013-04-09 10:28 ` Giorgos Keramidas
2013-04-09 11:23   ` Bastien
2013-04-09 15:31   ` Eli Zaretskii [this message]

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=831uajbu0x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=bzg@gnu.org \
    --cc=christopher@ch.ristopher.com \
    --cc=emacs-devel@gnu.org \
    --cc=keramida@ceid.upatras.gr \
    /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).