* Re: Help me unstick my bzr, please.
2010-01-16 7:48 ` Eli Zaretskii
@ 2010-01-16 8:29 ` Stephen J. Turnbull
2010-01-16 8:41 ` Stephen J. Turnbull
` (3 subsequent siblings)
4 siblings, 0 replies; 23+ messages in thread
From: Stephen J. Turnbull @ 2010-01-16 8:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Giorgos Keramidas, acm, emacs-devel
Eli Zaretskii writes:
> Why not simply
>
> ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
>
> ? Then Alan could continue with the normal quickfixes workflow:
Because IIUC the situation correctly, Alan's work would show up as a
merge commit, not as a commit to a branch. IOW, in the logs (or a
graphical DAG viewer) it would look like he was resolving conflicts in
the merge of those commits, not committing new work.
For tiny changes this is a pretty pedantic distinction, and for humans
the log message would probably make what happened clear.
For larger changes, this could cause problems (ie, less accurate
localization of the responsible change) using tools like bisect; I'd
have to think about it.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 7:48 ` Eli Zaretskii
2010-01-16 8:29 ` Stephen J. Turnbull
@ 2010-01-16 8:41 ` Stephen J. Turnbull
2010-01-16 8:59 ` Eli Zaretskii
2010-01-16 9:02 ` Giorgos Keramidas
` (2 subsequent siblings)
4 siblings, 1 reply; 23+ messages in thread
From: Stephen J. Turnbull @ 2010-01-16 8:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Giorgos Keramidas, acm, emacs-devel
Eli Zaretskii writes:
> Why not simply
>
> ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
Because Alan's commit will be a merge commit, not a regular commit.
This probably won't confuse most humans, who will be looking at Alan's
commit message, not at the parentage of the commit, but it might cause
issues with DAG tracing tools like bisect.
It will also very likely cause Alan's commit to appear to be the
mainline, and all of the commits he has merged to be a feature branch,
in the logs and GUI DAG viewers. This would be disconcerting to
experienced bzr users.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 8:41 ` Stephen J. Turnbull
@ 2010-01-16 8:59 ` Eli Zaretskii
2010-01-17 6:04 ` Stephen J. Turnbull
0 siblings, 1 reply; 23+ messages in thread
From: Eli Zaretskii @ 2010-01-16 8:59 UTC (permalink / raw)
To: Stephen J. Turnbull; +Cc: keramida, acm, emacs-devel
> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Cc: Giorgos Keramidas <keramida@ceid.upatras.gr>,
> acm@muc.de,
> emacs-devel@gnu.org
> Date: Sat, 16 Jan 2010 17:41:10 +0900
>
> Eli Zaretskii writes:
>
> > Why not simply
> >
> > ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
>
> Because Alan's commit will be a merge commit, not a regular commit.
> This probably won't confuse most humans, who will be looking at Alan's
> commit message, not at the parentage of the commit, but it might cause
> issues with DAG tracing tools like bisect.
For such a small change, I doubt if this is significant.
> It will also very likely cause Alan's commit to appear to be the
> mainline, and all of the commits he has merged to be a feature branch,
> in the logs and GUI DAG viewers.
Sorry, I don't understand what you mean by ``appear to be mainline''
and by ``commits [...] to be a feature branch''. Can you elaborate?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 8:59 ` Eli Zaretskii
@ 2010-01-17 6:04 ` Stephen J. Turnbull
0 siblings, 0 replies; 23+ messages in thread
From: Stephen J. Turnbull @ 2010-01-17 6:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: keramida, acm, emacs-devel
Eli Zaretskii writes:
> Sorry, I don't understand what you mean by ``appear to be mainline''
> and by ``commits [...] to be a feature branch''. Can you elaborate?
I suspect the approach you propose will have the following appearance
in bzr log:
$ bzr log
2 acm made a small change to CC mode
1 rms made a small change to RMail
$ bzr log -n0
2 acm made a small change to CC mode
1.3 eli made a small change to the MSDOS Makefile.in
1.2 cyd released Emacs 23.2
1.1 dak added a node to Info
1 rms made a small change to RMail
$
Very likely to happen in acm's mirror branch, and I believe that this
would propagate to the main repository when he pushes. It is
*definitely possible* for this to happen. Whether or not it *will*
happen depends on exactly what the state of acm's branch is and how he
goes about fixing it up, merging to trunk, and pushing to Savannah.
If it happens and gets pushed, it is repairable, of course, but only
at the cost of rebasing a published branch.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 7:48 ` Eli Zaretskii
2010-01-16 8:29 ` Stephen J. Turnbull
2010-01-16 8:41 ` Stephen J. Turnbull
@ 2010-01-16 9:02 ` Giorgos Keramidas
2010-01-16 9:57 ` Eli Zaretskii
2010-01-16 9:16 ` Lennart Borgman
2010-01-16 19:36 ` Help me unstick my bzr, please Stefan Monnier
4 siblings, 1 reply; 23+ messages in thread
From: Giorgos Keramidas @ 2010-01-16 9:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: acm, emacs-devel
On Sat, 16 Jan 2010 09:48:51 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
>> Date: Sat, 16 Jan 2010 04:37:24 +0200
>> Cc: emacs-devel@gnu.org
>>
>> > When I execute bzr status, it gives me a list of ~55 allegedly modified
>> > files, finishing up with:
>> >
>> > pending merge tips: (use -v to see all merge revisions)
>> > Jan D. 2010-01-06 [merge] Fix slowdown and wrong font choosed by XSETTINGS...
>> >
>> > Would somebody please tell me what I might have done to make bzr think
>> > I've got 55 modified files? How might I recover from this?
>>
>> I think the easiest way to revert your local "quickfixes" branch to a
>> known & sane state is something like:
>>
>> 1. Keep a backup of the two files you modified.
>> 2. Wipe the local quickfixes branch.
>> 3. Re-create the quickfixes from trunk.
>> 4. Overwre the two files in the new quickfixes branch.
>> 5. Use "bzr diff" to inspect the changes.
>> 6. Commit them with "bzr commit".
>
> Why not simply
>
> ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
To be honest, because I don't know for sure what merge --force does
under the hood.
It sounds like it will solve the immediate problem of having a
quickfixes branch half-way through a merge, but it also seems it will
create a merge commit that includes both the pending merge changes *and*
the small fix in the same changes.
For a tiny change it will probably be easy to understand which part of
the changes is a merge and which other parts are new. For larger
changes I'm not sure if it will look ok in the DAG of the history,
especially if the quick and small fix is very localized and will be
pushed to the trunk in short order.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:02 ` Giorgos Keramidas
@ 2010-01-16 9:57 ` Eli Zaretskii
2010-01-16 10:04 ` Giorgos Keramidas
0 siblings, 1 reply; 23+ messages in thread
From: Eli Zaretskii @ 2010-01-16 9:57 UTC (permalink / raw)
To: Giorgos Keramidas; +Cc: acm, emacs-devel
> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
> Cc: acm@muc.de, emacs-devel@gnu.org
> Date: Sat, 16 Jan 2010 11:02:04 +0200
>
> > Why not simply
> >
> > ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
>
> To be honest, because I don't know for sure what merge --force does
> under the hood.
>
> It sounds like it will solve the immediate problem of having a
> quickfixes branch half-way through a merge, but it also seems it will
> create a merge commit that includes both the pending merge changes *and*
> the small fix in the same changes.
Except for "bzr bisect", who else will be bothered by this?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:57 ` Eli Zaretskii
@ 2010-01-16 10:04 ` Giorgos Keramidas
0 siblings, 0 replies; 23+ messages in thread
From: Giorgos Keramidas @ 2010-01-16 10:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: acm, emacs-devel
On Sat, 16 Jan 2010 11:57:03 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
>> Cc: acm@muc.de, emacs-devel@gnu.org
>> Date: Sat, 16 Jan 2010 11:02:04 +0200
>>
>> > Why not simply
>> >
>> > ~/emacs/emacs.bzr/quickfixes$ bzr merge --force
>>
>> To be honest, because I don't know for sure what merge --force does
>> under the hood.
>>
>> It sounds like it will solve the immediate problem of having a
>> quickfixes branch half-way through a merge, but it also seems it will
>> create a merge commit that includes both the pending merge changes *and*
>> the small fix in the same changes.
>
> Except for "bzr bisect", who else will be bothered by this?
It's conceivable that nobody will notice. Committing a merge that joins
two history 'heads' in the DAG separately and then a small diff on top
of that serves mostly as a very easy way to keep the diff of the quick
fix really-really small. This is a useful property, but it's not like
the world will end if we don't do it.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 7:48 ` Eli Zaretskii
` (2 preceding siblings ...)
2010-01-16 9:02 ` Giorgos Keramidas
@ 2010-01-16 9:16 ` Lennart Borgman
2010-01-16 9:53 ` Andreas Schwab
2010-01-16 9:54 ` Eli Zaretskii
2010-01-16 19:36 ` Help me unstick my bzr, please Stefan Monnier
4 siblings, 2 replies; 23+ messages in thread
From: Lennart Borgman @ 2010-01-16 9:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Giorgos Keramidas, acm, emacs-devel
On Sat, Jan 16, 2010 at 8:48 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>>
>> > When I execute bzr status, it gives me a list of ~55 allegedly modified
>> > files, finishing up with:
>> >
>> > pending merge tips: (use -v to see all merge revisions)
>> > Jan D. 2010-01-06 [merge] Fix slowdown and wrong font choosed by XSETTINGS...
>> >
>> > Would somebody please tell me what I might have done to make bzr think
>> > I've got 55 modified files? How might I recover from this?
>>
>> The "pending merge" message means that in the past (before you made the
>> quick fix to the two files) you did:
>>
>> bzr merge
>>
>> This pulled stuff from the local trunk branch, and merged it with your
>> local quickfixes branch. But you have to also run "bzr commit" to
>> complete the fix. You didn't at the time, so the quickfixes branch
>> remains in a "the merge has locally finished but it is uncommitted"
>> state.
>
> That's probably what happened.
I do not understand. Can someone please explain to me why a bazaar
user have to take care of this?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:16 ` Lennart Borgman
@ 2010-01-16 9:53 ` Andreas Schwab
2010-01-16 9:54 ` Eli Zaretskii
1 sibling, 0 replies; 23+ messages in thread
From: Andreas Schwab @ 2010-01-16 9:53 UTC (permalink / raw)
To: Lennart Borgman; +Cc: Giorgos Keramidas, acm, Eli Zaretskii, emacs-devel
Lennart Borgman <lennart.borgman@gmail.com> writes:
> I do not understand. Can someone please explain to me why a bazaar
> user have to take care of this?
Because Bazaar Is Not Git.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:16 ` Lennart Borgman
2010-01-16 9:53 ` Andreas Schwab
@ 2010-01-16 9:54 ` Eli Zaretskii
2010-01-16 9:59 ` Giorgos Keramidas
2010-01-16 10:02 ` Lennart Borgman
1 sibling, 2 replies; 23+ messages in thread
From: Eli Zaretskii @ 2010-01-16 9:54 UTC (permalink / raw)
To: Lennart Borgman; +Cc: keramida, acm, emacs-devel
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Sat, 16 Jan 2010 10:16:37 +0100
> Cc: Giorgos Keramidas <keramida@ceid.upatras.gr>, acm@muc.de, emacs-devel@gnu.org
>
> On Sat, Jan 16, 2010 at 8:48 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> >>
> >> > When I execute bzr status, it gives me a list of ~55 allegedly modified
> >> > files, finishing up with:
> >> >
> >> > pending merge tips: (use -v to see all merge revisions)
> >> > Jan D. 2010-01-06 [merge] Fix slowdown and wrong font choosed by XSETTINGS...
> >> >
> >> > Would somebody please tell me what I might have done to make bzr think
> >> > I've got 55 modified files? How might I recover from this?
> >>
> >> The "pending merge" message means that in the past (before you made the
> >> quick fix to the two files) you did:
> >>
> >> bzr merge
> >>
> >> This pulled stuff from the local trunk branch, and merged it with your
> >> local quickfixes branch. But you have to also run "bzr commit" to
> >> complete the fix. You didn't at the time, so the quickfixes branch
> >> remains in a "the merge has locally finished but it is uncommitted"
> >> state.
> >
> > That's probably what happened.
>
>
> I do not understand. Can someone please explain to me why a bazaar
> user have to take care of this?
It's in the workflow described on the wiki: the process of merging a
branch with the mainline involves two commands:
bzr merge
bzr commit
The first one merges the text of the files, but does not combine their
histories. The second command finishes the merging process by
updating the history so that it now includes both local commits and
whatever happened in the mainline since the last time you merged from
it.
Note that there could be conflicts reported by "bzr merge", in which
case you should resolve them manually, then use a 3rd command to tell
Bazaar that the conflicts were resolved:
bzr resolve file1 file2 file3 ...
where the named files are those where you resolved the conflicts.
This 3rd command should come between "bzr merge" (which reports the
conflicts in the first place) and "bzr commit".
These complications are the reason why IMO using a separate branch for
``quick fixes'' is not the best way. Doing such simple changes
directly in the trunk, or in a separate branch that is bound to the
remote repository, is much better. The latest version of
BzrForEmacsDevs page on the wiki suggest these latter 2 possibilities,
but Alan is using the previous suggestion, whereby the quickfixes
branch was a local branch with the trunk mirror its parent.
The workflow with a local branch whose parent is the trunk mirror is
IMO better suited to working on a non-trivial set of changes or a new
feature. That's because this kind of job is probably not finished in
one go, and you need to return to it in the course of several days or
even weeks. So you will want to be isolated from changes on the trunk
for a while. Also, separating feature development into a separate
branch will allow you to make simple unrelated changes on the trunk at
the same time, without having your local changes get in your way.
With such a significant development branch, the overhead of merging
from the trunk from time to time is justified. With simple changes,
it is not, IMO.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:54 ` Eli Zaretskii
@ 2010-01-16 9:59 ` Giorgos Keramidas
2010-01-16 10:02 ` Lennart Borgman
1 sibling, 0 replies; 23+ messages in thread
From: Giorgos Keramidas @ 2010-01-16 9:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: acm, Lennart Borgman, emacs-devel
On Sat, 16 Jan 2010 11:54:41 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> I do not understand. Can someone please explain to me why a bazaar
>> user have to take care of this?
>
> It's in the workflow described on the wiki: the process of merging a
> branch with the mainline involves two commands:
>
> bzr merge
> bzr commit
>
> The first one merges the text of the files, but does not combine their
> histories. The second command finishes the merging process by
> updating the history so that it now includes both local commits and
> whatever happened in the mainline since the last time you merged from
> it.
Exactly. This is not a 'problem' of bazaar, FWIW. I's just the way
things work in all DVCS when you have committed local changes in a
non-bound branch.
Thank you Eli for writing up a very detailed explanation :-)
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 9:54 ` Eli Zaretskii
2010-01-16 9:59 ` Giorgos Keramidas
@ 2010-01-16 10:02 ` Lennart Borgman
2010-01-16 11:17 ` Eli Zaretskii
1 sibling, 1 reply; 23+ messages in thread
From: Lennart Borgman @ 2010-01-16 10:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: keramida, acm, emacs-devel
On Sat, Jan 16, 2010 at 10:54 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> >
>> >> > Would somebody please tell me what I might have done to make bzr think
>> >> > I've got 55 modified files? How might I recover from this?
>> >>
>> >> The "pending merge" message means that in the past (before you made the
>> >> quick fix to the two files) you did:
>> >>
>> >> bzr merge
>> >>
>> >> This pulled stuff from the local trunk branch, and merged it with your
>> >> local quickfixes branch. But you have to also run "bzr commit" to
>> >> complete the fix. You didn't at the time, so the quickfixes branch
>> >> remains in a "the merge has locally finished but it is uncommitted"
>> >> state.
>> >
>> > That's probably what happened.
>>
>>
>> I do not understand. Can someone please explain to me why a bazaar
>> user have to take care of this?
>
> It's in the workflow described on the wiki: the process of merging a
> branch with the mainline involves two commands:
>
> bzr merge
> bzr commit
>
> The first one merges the text of the files, but does not combine their
> histories. The second command finishes the merging process by
> updating the history so that it now includes both local commits and
> whatever happened in the mainline since the last time you merged from
> it.
Thanks Eli, but what worries me is that it looks like one could take a
completely wrong path here after "bzr merge". I might be
misunderstanding something but it looks to me like Alan's quick fix
branch got into a bad state just because he did not do "bzr commit"
immediately.
Is that really true??? If so why does not bazaar protect against this?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 10:02 ` Lennart Borgman
@ 2010-01-16 11:17 ` Eli Zaretskii
2010-01-17 6:23 ` Simple unsticking with 'bzr shelve' [was: Help me unstick ...] Stephen J. Turnbull
0 siblings, 1 reply; 23+ messages in thread
From: Eli Zaretskii @ 2010-01-16 11:17 UTC (permalink / raw)
To: Lennart Borgman; +Cc: keramida, acm, emacs-devel
> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Sat, 16 Jan 2010 11:02:50 +0100
> Cc: keramida@ceid.upatras.gr, acm@muc.de, emacs-devel@gnu.org
>
> > bzr merge
> > bzr commit
> >
> > The first one merges the text of the files, but does not combine their
> > histories. The second command finishes the merging process by
> > updating the history so that it now includes both local commits and
> > whatever happened in the mainline since the last time you merged from
> > it.
>
>
> Thanks Eli, but what worries me is that it looks like one could take a
> completely wrong path here after "bzr merge". I might be
> misunderstanding something but it looks to me like Alan's quick fix
> branch got into a bad state just because he did not do "bzr commit"
> immediately.
I think "bad state" is an exaggeration. E.g., Giorgos just posted one
simple way out of this predicament; there are many others.
And yes, if you work in a branch, you need to grow genes to do a
"bzr commit" immediately after "bzr merge". Note that a similar
trouble could happen to you if you "cvs up" with uncommitted changes
in the sandbox, and some of the updates conflict with your local
changes.
> Is that really true??? If so why does not bazaar protect against this?
It's really easy to get out of this "bad state". No more complicated
than with CVS.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Simple unsticking with 'bzr shelve' [was: Help me unstick ...]
2010-01-16 11:17 ` Eli Zaretskii
@ 2010-01-17 6:23 ` Stephen J. Turnbull
0 siblings, 0 replies; 23+ messages in thread
From: Stephen J. Turnbull @ 2010-01-17 6:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: keramida, acm, Lennart Borgman, emacs-devel
Eli Zaretskii writes:
> > Is that really true??? If so why does not bazaar protect against this?
>
> It's really easy to get out of this "bad state". No more complicated
> than with CVS.
The biggest problem with the bad state is that it is not obvious what
to do about it. Documentation is needed.
Actually (sorry for not remembering this earlier because it is
TOOWTDI) ...
Just use "bzr shelve". Suppose the files Alan changed are cc-foo.el
and cc-bar.el, and nothing in the 55 files in the merge touched them.
$ bzr shelve cc-foo.el cc-bar.el
$ bzr resolve --all
$ bzr update # may not be needed but shouldn't hurt
should DTRT, and now Alan can do "bzr log -n0" and "bzr status" to
check for sanity (yes, Alan, you *can* trust your intuition here), and
if things look OK,
$ bzr unshelve
$ bzr commit -m "Killer feature added to CC Mode!"
and push as appropriate for his branch layout.
See "bzr help shelve" for details and caveats on use of the shelf.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Help me unstick my bzr, please.
2010-01-16 7:48 ` Eli Zaretskii
` (3 preceding siblings ...)
2010-01-16 9:16 ` Lennart Borgman
@ 2010-01-16 19:36 ` Stefan Monnier
4 siblings, 0 replies; 23+ messages in thread
From: Stefan Monnier @ 2010-01-16 19:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Giorgos Keramidas, acm, emacs-devel
>> 6. Commit them with "bzr commit".
> Why not simply
> $ bzr merge --force
Other than the issues already mentioned, there's also the fact that
Bazaar developpers discourage its use and are not very interested in
making it work right. So, among other things, this will tend to remerge
things that were already merged and then create spurious conflicts.
It may get confused in other ways as well, I just know that the few
times I tried to use it, I quickly got sufficiently annoyed that
I consider it basically unusable.
Stefan
^ permalink raw reply [flat|nested] 23+ messages in thread