05-06-2011, 01:11 PM | #1 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Right way to download/merge latest source
I can download and run from the latest Calibre source ok, but what is the right way to run bzr to download any updates that were made since I last downloaded the source? I often get 'has uncommitted changes' or if I force it I get different versions of files with comments that make the source unusable until I replace the file, although I've often just deleted and re-downloaded the entire lot again which isn't right.
This is on Ubuntu 10.10. Oh wait, its now 11.04 - who knows if it'll even work at all now. After being unable to reboot my system because the upgrade froze at the end and my hard disk disappeared I did finally get it up and running. Of course, finding where everything has gone in Unity is like relearning a new OS. Arghh. |
05-06-2011, 01:19 PM | #2 |
creator of calibre
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If there are changes in your local checkout you have to commit them first. Once you do that, just run
bzr merge |
Advert | |
|
05-06-2011, 01:24 PM | #3 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Or if you have temporary changes in calibre code that you don't want to commit (like debugging code in Calibre), I do this:
bzr shelve --all bzr merge bzr unshelve Or if you have changes that you know you don't want to keep, just revert them. |
05-06-2011, 01:31 PM | #4 | |
Well trained by Cats
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
05-06-2011, 01:53 PM | #5 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I keep 2 sources locally. One is a copy of trunk called 'base', obtained with bzr pull. The other is my development branch (in fact I have 3). I use the bzr gui, which does these basic things very well and very easily.
All my branches use a shared repository. This makes pulls, pushes, and merging much faster. Workflow:
|
Advert | |
|
05-06-2011, 02:05 PM | #6 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Hmmm, I'll have to test all this again. I had done an initial bzr branch lp:calibre and then a few days later I did a bzr merge and even though I hadn't edited anything it would still stay I had uncomitted changes, etc. and list lots of files I've never touched. I get them even now.
Maybe bzr merge isn't what I want. Is there a way to force pulling down the latest source and overwriting/adding/removing the necessary files to make sure I have the current source, without deleting/re-downloading? |
05-06-2011, 02:10 PM | #7 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Do not use pull on a branch you are making changes in. There you must use merge. That is why I merge from my copy of trunk to my development tree/repo. |
|
05-06-2011, 02:14 PM | #8 |
Calibre Plugins Developer
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
oooh - that is good to know. As like meme I don't ever commit Calibre changes - our branches are purely for developing plugins and whenever I do submit changes to Calibre code I just send Kovid a patch file.
Using that approach, does it mean the revision log contains the "real" revision messages, rather than the stupid 40 character or whatever abbreviations we are restricted to using bzr merge? |
05-06-2011, 02:14 PM | #9 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Usinf merge works however you still hve to commit the changes you just merged.
You can use bzr status to see the state of your branch. |
05-06-2011, 02:19 PM | #10 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The 'commit' command takes arbitrary text. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
latest download - MSE detects security threat | cybmole | Sigil | 5 | 02-21-2011 11:19 AM |
How to merge Calibre updates to source code? | kiwidude | Calibre | 5 | 11-16-2010 01:30 PM |
Merge feature request (different merge) | Tarran | Calibre | 1 | 05-24-2010 10:57 AM |
Error Building on Ubuntu from latest Bazaar Source | RoninTech | Calibre | 5 | 04-09-2010 10:01 PM |
Cannot download 2.0.2 and 2.0.1 source code | rfog | Kindle Developer's Corner | 6 | 05-22-2009 09:34 AM |