![]() |
#1 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,721
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
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. |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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 10:33 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
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.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,198
Karma: 27110894
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. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,721
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
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.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Merge Records code - E-reader users and developers? | Starson17 | Calibre | 29 | 03-28-2010 04:01 PM |
Let's create a source code repository for DR 800 related code? | jraf | iRex | 3 | 03-11-2010 12:26 PM |
Regarding Calibre source code compiling | shivas | Introduce Yourself | 4 | 12-23-2009 09:52 AM |
Source code available | AlfonsVH | HanLin eBook | 3 | 01-03-2009 02:30 PM |
source code?? | joblack | iRex | 1 | 11-01-2006 12:16 PM |