Obtain revno difference between the last branch revno and the working copy's revno

Joao Pedrosa joaopedrosa at gmail.com
Mon Jun 15 07:32:56 BST 2009


Hi,

Nevermind. I found it and am using it like this:

if (wt.branch.last_revision() != wt.last_revision()):
    st.append("needs_updating")

It does what I need it to now.

Cheers.


On Mon, Jun 15, 2009 at 1:19 AM, Joao Pedrosa <joaopedrosa at gmail.com> wrote:

> Hi,
>
> When working with Bazaar I try and manage lots of simultaneous branches,
> sometimes
> doing operations in a number of them at the same time just to save the
> trouble to repeat
> the operation on each one that needs it. So I can for example commit,
> revert, pull and push
> in batches. ;-)
>
> But when I "update" in batches, I have not found a way to do it only when
> it's needed to
> save the unneeded processing of calling it when it's not really needed, but
> just because
> it is to work in batch I cannot tell which branch needs it or not and work
> from there.
>
> I tried reading two of the bzrlib files, workingtree.py and branch.py, but
> I have not found
> what I wanted. I already make use of Branch.revno for checking the
> differences so
> I can push and pull more efficiently, and it seems as if it's the only
> revno available
> from what I can tell and it comes from calls to last_revision_info.
>
> I once overheard folks saying perhaps on #bzr that there are two revisions,
> the branch's
> and the workingtree's or working copy. As far as I can tell, there is no
> way to retrieve
> the latter's unless it matches the branch's. ;-)
>
> Am I doomed? Having upgraded the format of my branches to "--2a", just for
> testing it
> on this desktop computer I checked the time it takes to run update on most
> of the branches
> and it took over 3 minutes on this quite fast machine. If there was a way
> to run
> update only when it was needed, I could save said minutes and more, as I
> often run
> upgrade on the server as well when I push changes to it and want to make
> use of them
> for running web sites and so on.
>
> I am more worried about scaling this operation so I could grow the number
> of branches
> without having to fear further.
>
> Cheers and thanks,
> Joao
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090615/885f93d7/attachment.htm 


More information about the bazaar mailing list