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

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 05-06-2011, 01:11 PM   #1
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
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.
meme is offline   Reply With Quote
Old 05-06-2011, 01:19 PM   #2
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: 39,822
Karma: 17764952
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
kovidgoyal is offline   Reply With Quote
Advert
Old 05-06-2011, 01:24 PM   #3
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,258
Karma: 1579358
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite, iPad Pro
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.
kiwidude is offline   Reply With Quote
Old 05-06-2011, 01:31 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 26,683
Karma: 41845871
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by meme View Post
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.
At the bottom of the User Logon screen (username selected) you can set Interface to "classic", then enter your PW
theducks is online now   Reply With Quote
Old 05-06-2011, 01:53 PM   #5
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 9,973
Karma: 3559293
Join Date: Jan 2010
Location: UK
Device: Reader
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:
  1. pull changes from launchpad to 'base'
  2. merge base into 'dev'
  3. make changes, do work, etc
  4. commit changes in dev. Often more than one commit.
  5. check if new changes are in base. If so, repeat steps 1 and 2 to ensure that there are no change conflicts.
  6. push changes from dev to my repository on launchpad. Kovid reviews and merges from there.
I have both base and dev so I can run from either to help debug, have rapid access to the change logs and diffs, and rarely to add print statements in the trunk code to help see what is going on. In the latter case, I revert the branch before pulling from launchpad.
chaley is offline   Reply With Quote
Advert
Old 05-06-2011, 02:05 PM   #6
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
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?
meme is offline   Reply With Quote
Old 05-06-2011, 02:10 PM   #7
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 9,973
Karma: 3559293
Join Date: Jan 2010
Location: UK
Device: Reader
Quote:
Originally Posted by meme View Post
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?
If you are working with a copy of trunk (the latest source) and are *not* making changes in that source tree, then use bzr pull. You might need to use bzr pull --overwrite to force the branch to be in sync with what is on launchpad.

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.
chaley is offline   Reply With Quote
Old 05-06-2011, 02:14 PM   #8
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,258
Karma: 1579358
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite, iPad Pro
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?
kiwidude is offline   Reply With Quote
Old 05-06-2011, 02:14 PM   #9
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1054509
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.
user_none is offline   Reply With Quote
Old 05-06-2011, 02:19 PM   #10
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
chaley's Avatar
 
Posts: 9,973
Karma: 3559293
Join Date: Jan 2010
Location: UK
Device: Reader
Quote:
Originally Posted by kiwidude View Post
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?
Yes. The attached screen capture shows what I see when looking at the log using the GUI. This one is from the trunk release, and shows branches as parallel lines. I have opened the line that shows my changes, as merged by Kovid. Clicking on one of the file names listed on the right will show the diff.

The 'commit' command takes arbitrary text.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.png
Views:	284
Size:	68.5 KB
ID:	70991  
chaley 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
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


All times are GMT -4. The time now is 04:14 PM.


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