Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-16-2010, 08:03 AM   #1
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
How to merge Calibre updates to source code?

Hi all,

Apologies for being a newbie to using Bazaar but here's the scenario.

I grabbed the latest Calibre source code a week or so ago and made a few tweaks/changes to it. BTW if Kovid answers this, forget my actions done on the interface thread to submit that patch, as I have "started again" with a fresh working directory from the latest revision at the time just using bzr merge lp:Calibre in a fresh directory.

Now I want to know what my best approach is when it comes time to get the latest source code version to pickup all the other fixes/changes in Calibre?

All my changes are uncommitted. I would like to merge the latest trunk into my work area, retaining/merging my changes. Could anyone please recommend an approach?

I tried "bzr merge --force" but that just says "nothing to do". Do I have to commit my changes and then do a merge or is it a different command line I should use? Any "best practice" recommendations?

Many thanks for your help.
kiwidude is offline   Reply With Quote
Old 11-16-2010, 10:37 AM   #2
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by kiwidude View Post
Apologies for being a newbie to using Bazaar but here's the scenario.
For a long time I just made my changes to the branch from the main trunk, committed my changes, then merged from the trunk. Sometimes I'd have to resolve a conflict manually.

Now I keep 1) a clean local copy of the trunk and 2) a branch made from the clean local copy (where I make my changes). When I want to update, I first do a merge in the clean copy (from the trunk), then commit that merge, then merge from the local copy into my modified local branch, then commit that merge. This lets me run from my modified source or from the trunk source.

You have to commit changes before the merge. It's all done with a batch file.

Last edited by Starson17; 11-16-2010 at 11:33 AM.
Starson17 is offline   Reply With Quote
 
Advertisement
Old 11-16-2010, 11:14 AM   #3
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
I just keep a single local branch. If I have local uncommitted changes I just commit them before merging. You could alternatively try using the 'shelve' command before merging, but I never bothered with this aside from testing it to see that it worked as expected.
ldolse is offline   Reply With Quote
Old 11-16-2010, 11:32 AM   #4
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by ldolse View Post
I just keep a single local branch.
I did this for a long time, too. The reason I changed was that when I saw odd behavior I wasn't sure if it was a problem in my code or in the trunk. I could always disable running from my source and run from the last release (assuming it was up to date), but the trunk isn't always the same as the last binary release, so the problem can be in the trunk. When trunk changes and my changes are mixed together, it was impossible to tell if it was my code.
Starson17 is offline   Reply With Quote
Old 11-16-2010, 11:49 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,437
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The way to keep uncommitted changes and still merge from trunk is to use

bzr shelve
bzr merge lp:calibre
bzr unshelve

Note that shelve is provided by the bzrtools plugin to bzr, which you may not have installed.
kovidgoyal is offline   Reply With Quote
Old 11-16-2010, 02:30 PM   #6
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Thanks very much everyone for your responses. A couple of different approaches to experiment which is great. Shelving sounds just the ticket - having two branches had crossed my mind but I guess if I can unshelve onto different revisions it should be no big deal to revert to another version of the code if the latest trunk is unstable at the time.
kiwidude is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Merge Records code - E-reader users and developers? Starson17 Calibre 29 03-28-2010 05:01 PM
Let's create a source code repository for DR 800 related code? jraf iRex 3 03-11-2010 01:26 PM
Regarding Calibre source code compiling shivas Introduce Yourself 4 12-23-2009 10:52 AM
Source code available AlfonsVH HanLin eBook 3 01-03-2009 03:30 PM
source code?? joblack iRex 1 11-01-2006 01:16 PM


All times are GMT -4. The time now is 10:17 AM.


MobileRead.com is a privately owned, operated and funded community.