emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: log format for vc-bzr


From: Juanma Barranquero
Subject: Re: log format for vc-bzr
Date: Fri, 8 Jan 2010 11:28:08 +0100

On Fri, Jan 8, 2010 at 10:00, Eli Zaretskii <address@hidden> wrote:

> As usual, the Bazaar documentation doesn't say anything about this
> option that can be grokked by Bazaar non-experts.
>
>    --forget-merges
>      Remove pending merge marker, without changing any files.
>
> What is a ``pending merge marker''?

After doing a merge to a branch, bzr status shows the pending merges:

  C:\emacs\trunk> bzr status
  modified:
    myfile.el
  pending merge tips: (use -v to see all merge revisions)
    Juanma Barranquero 2010-01-02 myfile.el: New file.

That means that the next commit will store the changes as a merge:
"[merge]" will appear in the commit description, and you will be able
to use log -n0 to see the history of the merge.

> And how removing it resolves the
> problem at hand?

"bzr revert --pending-merges" removes the info about the local changes
being a merge. The working copy remains as it is (i.e, it includes all
the changes from the merge), but Bazaar "forgets" that they came from
a merge operation. The next commit will be a normal, non-merge commit.

> And if this is the magic wand to leave personal
> commit comments out of the public repository, then shouldn't we add
> this to the recommended workflow on the wiki?

IIUC what Óscar was saying, he meant that --pending-merges can be used
to sanitize a branch, by selectively copying and squashing commits
from one branch into another before merging the changes back into the
trunk. That's not necessarily an easily automated process.

At some point, people has to try and learn, we cannot give everything
as recipes, because there's no one single good way to do it all. With
--pending-merges you can leave personal commit comments out, or
depending of the developer's habits, *all* the branch development
comments out. Imagine that the unicode-2 branch were merged with

   bzr merge ../unicode-2
   bzr revert --pending-merges
   bzr commit -m "Merge unicode-2 branch."

That's much less useful that the normal merge / commit, where the
history of the branch is accessible. So encouraging people to use
--pending-merges as a recipe is much worse than encouraging them to
just read the docs, try things and ask when they do not understand
something.

All this in my VHO, of course.

    Juanma




reply via email to

[Prev in Thread] Current Thread [Next in Thread]