View Single Post
Old 03-29-2010, 11:20 AM   #21
chaley
Grand Sorcerer
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.
 
Posts: 12,480
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Starson17 View Post
To avoid having to hunt it up, and to make sure I get it right, can you give me the bazaar command line to merge your patch file into my testing code? I normally merge direct from the Kovid's main code into my own patched files, or just merge directly from complete copies of modified files with a compare and merge utility program.
What I do is:
1. keep a branch of calibre that I call calibre_base. This branch was created from launchpad using the command
bzr branch lp:calibre calibre_base
2. keep a branch of calibre_base that I call calibre. This branch was created using the command
bzr branch calibre_base calibre
I do all my development in this branch.
3. Before starting any development (and from time to time anyway), I merge changes from launchpad into my calibre_base baseline using the command
'bzr merge', run inside the calibre_base folder. I then cd to my calibre development branch and run 'bzr merge' again. With this pair of steps, I know that my development branch (calibre) and my comparison branch (calibre_base) are up to date.
4. During development, I frequently commit changes with the bzr commit command. That way I have a trace of what I did + when I did it, and I also have a version system useful for backing out of badly-conceived editing.

I mention all of this because the patch file was built by comparing calibre_base to calibre. If you don't have a baseline repository around, I am not sure it will work. In addition, this system can rapidly give me a diff that shows everything I have changed from the baseline. The GUI version of bzr is particularly good for this.

The above notwithstanding, you merge a patch file with the commands:
cd 'into a calibre repository that you are willing to trash'
bzr merge path-to-patch-file
I tested this by creating a new branch calibre_test from calibre_base, cd'ing into calibre_test, and running the merge. It worked fine.

Good luck!
(and comments/improvements would be welcome. )
chaley is offline   Reply With Quote