emacs-devel
[Top][All Lists]
Advanced

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

Re: Bzr help


From: Tassilo Horn
Subject: Re: Bzr help
Date: Fri, 20 Dec 2013 19:47:01 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> I've done "bzr pull" and "bzr merge" followed by a "bzr commit".
>
> That was a mistake: "bzr pull" in a diverged branch doesn't do what
> you think it does (bzr is not git).  The first line of "bzr help pull"
> says:
>
>   Purpose: Turn this branch into a mirror of another branch.
>
> which is not what you want.
>
> What you want is "bzr merge" from the remote branch, followed by "bzr
> commit".  _Then_ you should be able to push.  IOW, omit the "bzr pull"
> from the sequence of the commands, and you should be fine.

Ok, I see.

> Having said that, I really don't recommend working from an unbound
> branch, it will make things harder for you, due to subtle differences
> in semantics of name-sake commands to which you are used to with git.

Guessed correctly, though I usually just "git pull --rebase".

> Instead, use a bound branch, and the workflow described in
> http://www.emacswiki.org/emacs/BzrForEmacsDevs.

Yes, I'll do so.

> That way, you will have recipes for commands that DTRT.  You can use
> local branches (described on that page as well), if you prefer that,
> and merge onto the bound branch immediately prior to committing
> (pushing) upstream.

Yes, that seems to be the best solution for how I'm used to work.

> Btw, is this the first time you did some local commits and tried to
> push?  If not, how did your workflow look until now?

No, not the first time.  I usually just edit, then review/commit with
`vc-dir', and then "bzr push" in a console.  Up to now, I was just lucky
that nobody pushed in between.

>> How do I get back into a good, pushable state, preferably without
>> losing my commit 115645 (or at least the changes)?  (I haven't tried
>> pushing in fear of being able to screw things up.)
>
> I think "bzr uncommit" in your branch will be able to remove all the
> mistaken commits you've made, either one by one or all of them at once
> (see "bzr help uncommit").  Then start over, this time correctly.  To
> avoid losing your changes, save them first with "bzr diff -c REVNO",
> and then you will be able to reapply them.

I simply uncommitting my 3 top-most commits which left me in a state
where the original change I wanted to do was the only change in my
working copy.  So I could just commit them again and push.

Thanks for the help, Eli!
Tassilo



reply via email to

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