Mass uncommit, then what?
John Arbash Meinel
john at arbash-meinel.com
Wed Nov 29 21:25:13 GMT 2006
Bob Tanner wrote:
> I downloaded upstream code into laptop:upstream, did bzr commit, did a push
> to remote:upstream, went home.
> In desktop:my.branch (bzr branch of remote:upstream) I did a bzr merge, lots
> of conflicts (thousands!) worked through a bunch and bzr resolve'd them.
> Only to find upstream goofed and all files had goofy CRLF, CF in them.
> Did a bzr uncommit in laptop:upstream (nice feature!). Downloaded the fixed
> upstream, into laptop:upstream, bzr commit, bzr push which had issues about
> diverge, so I (mistakenly?) bzr push --overwrite the remote:upstream
> To make sure things are "right" I did
> unzip upstream.zip into upstream
> bzr branch remote:upstream zzz
> diff -uNr upstream zzz
> No code difference (just bzr related)
> Long background info, but the problem is I did the bzr merge in my
> desktop:my.branch when remote:upstream was full of "bad" files. So, my
> working directory has all the "bad" files plus a couple files I resolved
> plus all the changes I've made in desktop:my.branch.
> How can I merge the remote:upstream (good files) into desktop:my.branch, not
> loose my local changes?
> bzr merge says I have uncommited local change, which I do, but I don't want
> all of those changes, especially the "bad" CRLF files, only a few of the
> files I did edit.
> bzr commit few-file.cpp
> bzr commit few-other-file.cpp
> bzr merge
> Any help would be greatly appreciated.
I want to make sure I understand your layout correctly. It sounds like
you want to have an 'upstream' branch, which is synchronized between
your laptop, a remote server, and your desktop. If I understand
correctly, upstream is actually someone else's work. And you have a
branch on your desktop which follows it, but has other patches, etc.
Is it possible for you to meet on IRC, since it is a little easier to go
back and forth there. host: chat.freenode.net channel: #bzr
I'll do what I can here.
So it sounds like you tried to do an update on your laptop of upstream,
but somehow the wires got crossed and you got bad line endings. You
didn't realize at the time, so you committed and pushed to remote:upstream.
You merged this bogus revision into desktop:my.branch, and then realized
the problem after resolving some of the conflicts.
Then you went back to laptop:upstream, uncommitted the revision, made
sure it had the correct upstream code. Committed, and push --overwrite
it to remote:upstream.
So at this point you have a desktop:my.branch which merged the wrong
version of upstream, and has some conflict resolution which you are
interested in keeping.
You could do a few things, but I would recommend something like:
cp -ar my.branch saved
bzr merge remote:upstream
# for files you want to keep:
cp ../saved/file1 file1
cp ../saved/path/file2 path/file2
This should also include some files that are still conflicted, but which
you have fixed.
There isn't much use in keeping the merge with the bad branch, because
the revision isn't meant to be used.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061129/3abc72ea/attachment.pgp
More information about the bazaar