pull -r $rev doesn't limit revisions converted

Bug #544701 reported by Michael Hudson-Doyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Hg Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

Demo:

mwh@grond:tmp$ sh ~/hgrepro.sh
+ rm -rf /home/mwh/tmp/hgrepro
+ mkdir -p /home/mwh/tmp/hgrepro
+ cd /home/mwh/tmp/hgrepro
+ hg init source
+ cd source
+ echo a
+ hg add
adding file
+ hg ci -m a -u user
+ echo b
+ hg ci -m b -u user
+ cd ..
+ bzr init target
Created a standalone tree (format: 2a)
+ cd target
+ bzr pull -r 1 ../source
+N file
All changes applied successfully.
Now on revision 2.
+ bzr log
------------------------------------------------------------
revno: 2
hg commit: c9768ecc0761cea271e03c522e2b1e64a8abfef4
committer: user
timestamp: Tue 2010-03-23 13:40:16 +1300
message:
  b
------------------------------------------------------------
revno: 1
hg commit: 4ec524d45d5931dc891cdcaace040bece321328a
committer: user
timestamp: Tue 2010-03-23 13:40:16 +1300
message:
  a

Jelmer said "I guess when we ask for a branch containing a revision we shouldn't assume that the tip of that branch is our revision"

Related branches

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 544701] [NEW] pull -r $rev doesn't limit revisions converted

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

Michael Hudson wrote:
> Public bug reported:
>
> Demo:

Is this because you are trying to use incremental pull to get around
other issues? (bzr pull -r 100; bzr pull -r 200; etc)?

Certainly AIUI, I believe Jelmer has issues with some sources not
providing lookup ability. For example 'bzr-git', the git protocol
doesn't let you inspect the info, just pull the whole thing and inspect
it locally. (you can't walk the graph to determine what '-r -10' is.)

I don't know if bzr-hg suffers from the same problem. I don't know the
hg protocol that well.

(To say that, bzr-git and bzr-hg may always have to do a full fetch,
they may not have to do a full conversion.)

John
=:->

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

iEYEARECAAYFAkuo1p0ACgkQJdeBCYSNAAMtDwCg0934Qt5h1AfGXwi7kGpqXcSW
oJkAoK9dCssAg/DVN7rT+vce0XxHiPcd
=ZEjX
-----END PGP SIGNATURE-----

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On 24/03/10 03:56, John A Meinel wrote:
> Michael Hudson wrote:
>> Public bug reported:
>>
>> Demo:
>
> Is this because you are trying to use incremental pull to get around
> other issues?

That's what we're doing for git and svn now -- and the issues are
roughly: performance, memory leaks and resource utilization.

> (bzr pull -r 100; bzr pull -r 200; etc)?

But not quite like that :)

> Certainly AIUI, I believe Jelmer has issues with some sources not
> providing lookup ability. For example 'bzr-git', the git protocol
> doesn't let you inspect the info, just pull the whole thing and inspect
> it locally. (you can't walk the graph to determine what '-r -10' is.)
>
> I don't know if bzr-hg suffers from the same problem. I don't know the
> hg protocol that well.

That's not really the problem, I think. I think Jelmer thinks that we
always convert full branches (in the mercurial sense) even if the
revision requested is in the middle of a branch.

> (To say that, bzr-git and bzr-hg may always have to do a full fetch,
> they may not have to do a full conversion.)

Well, even if bzr-hg decides to convert all the revisions it receives
(which IMHO it shouldn't) it shouldn't set the branch tip to the wrong
thing!

Revision history for this message
John A Meinel (jameinel) wrote :

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

Michael Hudson wrote:
> On 24/03/10 03:56, John A Meinel wrote:
>> Michael Hudson wrote:
>>> Public bug reported:
>>>
>>> Demo:
>> Is this because you are trying to use incremental pull to get around
>> other issues?
>
> That's what we're doing for git and svn now -- and the issues are
> roughly: performance, memory leaks and resource utilization.
>
>> (bzr pull -r 100; bzr pull -r 200; etc)?
>
> But not quite like that :)
>
>> Certainly AIUI, I believe Jelmer has issues with some sources not
>> providing lookup ability. For example 'bzr-git', the git protocol
>> doesn't let you inspect the info, just pull the whole thing and inspect
>> it locally. (you can't walk the graph to determine what '-r -10' is.)
>>
>> I don't know if bzr-hg suffers from the same problem. I don't know the
>> hg protocol that well.
>
> That's not really the problem, I think. I think Jelmer thinks that we
> always convert full branches (in the mercurial sense) even if the
> revision requested is in the middle of a branch.
>
>> (To say that, bzr-git and bzr-hg may always have to do a full fetch,
>> they may not have to do a full conversion.)
>
> Well, even if bzr-hg decides to convert all the revisions it receives
> (which IMHO it shouldn't) it shouldn't set the branch tip to the wrong
> thing!
>

oh absolutely, I was mostly pointing out that 'bzr pull -r X' may not be
as efficient as you would like, because of limitations of the remote side.

John
=:->

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

iEYEARECAAYFAkupVuMACgkQJdeBCYSNAAOBwQCg1OLlm3rk27dscKwJit7yfaLV
Z6wAoMvBdofmpNtt9EXixfgbAlrb2a8x
=bvV8
-----END PGP SIGNATURE-----

Jelmer Vernooij (jelmer)
Changed in bzr-hg:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

the branch tip is now set correctly. We still fetch too much data from Mercurial but that's a different (and nontrivial) problem.

Changed in bzr-hg:
status: Triaged → Fix Committed
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr-hg:
milestone: none → 0.2
Jelmer Vernooij (jelmer)
Changed in bzr-hg:
milestone: 0.2 → 0.1.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.