On Thu, 8 Aug 2013 11:01:36 -0700
Matt Wilkie <[email protected]> wrote:

> I'm in a bzr tangle again, sorry folks!
> 
> I have a small fix to add to the trunk, just 3 lines, and another larger
> more tentative experiment. I've have both changes in my local working copy
> of "trunk". I locally committed just the safe change, and left the other
> one out. I then went to push the safe change but was told I couldn't
> because the branches had diverged (someone else pushed something in the
> meantime).
> 
> I then merged the upstream changes while ignoring uncommitted changes. I

Probably wasn't what you wanted to do at that point.  You should have
pulled a fresh copy of the trunk in a separate directory (very fast if
all your branches are under the same shared repo. parent dir.).  Then
merge your committed changes from your branch into the trunk, and push.

> expected it would bring in EKR's new revisions and merge them with my local
> safe committed changes, while leaving my still experimental things out of
> it, but that's not what happened. Everything is now all together committed
> locally - safe change, experimental one, upstream merge - with a bland log
> message "merge EKR's updates" that doesn't reveal the true nature of the
> change.

what happens if you type `bzr stat`?  A message about a pending merge
perhaps?  I don't think everything is committed, just merged... but
that may still be messing up your modified working files.

> I didn't create a branch for my experiment cause, well, the last time I did
> that things got all messed up in a different way (couldn't keep it sync
> with trunk without munging history; fixed thanks to Terry!). Well, this
> isn't any better. Lesson learned.
> 
> What's the best thing to do now? create a new local check-out from trunk in
> a new folder, and then manually diff and merge the safe stuff from the
> tangled working copy?

I'm not 100% sure what's safe to do at this point, so first,

zip -r c:\inemergencybreakglass.zip mybranch

i.e. backup your work somewhere out of the way.

I think if you pull a fresh trunk and merge your branch into it you'll
get just your committed safe changes, which you'll then want to commit
again.  So say your in your branch, called mattsbranch:

cd ..
bzr pull lp:leo-editor clean_trunk
cd clean_trunk
bzr merge ../mattsbranch
bzr commit -m'merged my safe xxzzyy changes'
# verify with bzr qlog that just your safe changes are committed
bzr push --remember :parent

at this point I'm not sure what's the smallest effort to get your
experimental changes isolated again.  I'd try

bzr merge --uncommitted ../mattsbranch

then if the only changes (bzr qdiff) are your experimental stuff,
you're good.  If not, maybe bzr revert and then manually copy in the
experimental stuff - hoping it's not too extensive.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to