Using bzr with LaTeX

John Arbash Meinel john at arbash-meinel.com
Fri Dec 15 15:51:32 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ramon Diaz-Uriarte wrote:
> On 12/15/06, John Arbash Meinel <john at arbash-meinel.com> wrote:

...

>> > [One side comment: I find "bzr viz" extremely useful; it is part of
>> > bzrtools. Easy to see what changed where and when].
>>
>> I tend to just do 'bzr revert -r 5 mypaper.tex'
>>
>> And then if I want to see the difference between 2 versions:
>>
>> bzr vimdiff -r 5 mypaper.tex # Diff from current back to revision 5
>> bzr vimdiff -r 5..6 mypaper.tex # Difference between revision 6 and 5
>>
> 
> 
> Aha, I can see how this is a lot nicer than my approach a lot of the time.
> However, is there something inherently wrong with
> bzr cat -r 5 mypaper.tex > mypaper.revision5.tex?
> 
> I am asking because I've found the above less prone to mistakes if I
> am working when I might need to interrupt my work suddenly and for a
> while. For instance, while commuting or if my daughter wakes up from
> her nap; with the cat to something, I can do that as often as I want,
> and I do not need to remember what I did (or move up and see if I
> reverted my version) so it is inocuous.
> 
> So, can I get into trouble from the above, or is it just that it is
> not as efficient?

There is nothing wrong with creating a new file, and it actually might
be more efficient (revert has to do more hoops to make sure it doesn't
mess anything up, like creating a backup file if necessary, etc.)

Personally, though, I like to keep my trees clean. In
~/.bazaar/bazaar.conf I alias "commit = commit --strict"

I also do that because I find myself creating a new test file or
something that I want versioned, and I forget to add it. '--strict'
prevents me from committing without adding or ignoring everything.

Another possibility if you do this fairly often, is to use a naming
convention, which makes it clear that the file can be deleted.

Many people will run screaming, but I did adopt Arch's convention for
using a "," on the beginning of a filename to indicate it is a temporary
file. So I would have:
foo/,test.txt

Then it is fairly easy to scan and see what files I can remove because I
have forgotten what they are good for. And I can add ",*" to my
~/.bazaar/ignore file, which ignores files beginning with a comma from
all of my projects.


...

>> bzr diff --using meld -r 5 mypaper.tex
>>
> 
> (Also, you can do something similar with kdiff3.)
> 
> 
>> My second favorite diff program is probably meld.
>>
> 
> You mean, after emacs' ediff :-) (Just kidding; I use emacs for
> editing, but for merging, etc, I often use kdiff3).
> 
> 
> R.

Some people really like ediff, I've never gotten over the emacs hurdle.
I've gotten *really* good at Vim. And having '.' to repeat the last
command is extremely powerful.

I think kdiff3 and meld are pretty similar. Just one doesn't require
loading the kde libraries and dcop engine. I have it installed, I just
don't use it often. :)

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFgsSEJdeBCYSNAAMRApxGAKCb1jcTC1wVty0APu34ciBm1GT5LACgi9jQ
UA6kaTM3yiLPCz4Dz+7hKDg=
=DsMm
-----END PGP SIGNATURE-----




More information about the bazaar mailing list