Re: [PATCH 2/9] remote-hg: remove extra check
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Apr 25, 2013, 19:22 UTC
- Message-ID
- <CAMP44s3oNZiNTotaWqf3=FtDh+Jzc3i2-Ox5=E8pKLYqWY=X-A@mail.gmail.com>
- In-Reply-To
- <CALkWK0mrMkLBRSKk3GwjYvh+tCtXU=efeuaZC4nKGTZosVyHrQ@mail.gmail.com>
On Thu, Apr 25, 2013 at 1:23 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 18 quoted lines
> Felipe Contreras wrote: >> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg >> index 5481331..0b7c81f 100755 >> --- a/contrib/remote-helpers/git-remote-hg >> +++ b/contrib/remote-helpers/git-remote-hg >> @@ -332,10 +332,6 @@ def export_ref(repo, name, kind, head): >> ename = '%s/%s' % (kind, name) >> tip = marks.get_tip(ename) >> >> - # mercurial takes too much time checking this >> - if tip and tip == head.rev(): >> - # nothing to do >> - return >> revs = xrange(tip, head.rev() + 1) > > I'm surprised these four lines were even there in a previous revision. > Again, you changed the meaning: if xrange() returns an empty range, > you must return, by extension.
I'm not going to go back in history, but we were not always using xrange, but the mercurial API helper, which was dead slow, and in the end did basically an xrange().
-- Felipe Contreras