hg import does not import all revisions in tip.

Bug #822818 reported by Aaron Bentley
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Hg Plugin
Triaged
Medium
Unassigned
Launchpad itself
Won't Fix
High
Unassigned

Bug Description

I have created a request for an externa (Google code)l mercurial repository (default branch) import. It seemed to work, according to the log all changeset are retrieved (see http://launchpadlibrarian.net/76727591/maarten-bezemer-ganttproject-imported.log). But, in the end only the first 3 revision are available in the bazaar branch (https://code.launchpad.net/~veger/ganttproject/import). Subsequent imports 'think' everything is up-to-date and do nothing additional.

We do use (a lot) branches in the external repository, but I read that the default branch should be imported completely.

When I look at the avilable branches (only relevant onces shown):
$ hg heads
changeset: 611:30e76f027936
tag: tip
user: Maarten Bezemer
date: Sat Aug 06 20:04:21 2011 +0200
summary: Copied code formatter/style/template/etc from ganttproject project to other projects as well

changeset: 2:25bf1f28b048
user: Dmitry Barashev
date: Wed Jun 16 04:25:59 2010 +0400
summary: test branch

The 2nd branch is imported (changeset 2:25bf1f28b048) instead of the tip (changeset: 611:30e76f027936).

So, am I doing something wrong here, do I need to specicify somehow that the default (tip) branch needs to be imported?

Tags: bzr-hg
Aaron Bentley (abentley)
Changed in launchpad:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Maarten Bezemer (veger) wrote :

It looks like our repository contains 2 heads in the default branch (although the commit message of changeset 2 might be a bit distracting). Unfortunately the Bazaar HG Plugin (randomly?) picks the wrong one.

A solution would be to select the tip head if there are multiple heads within the default branch (or simply select the head with the highest revision number).
Another solution (although more a feature request) would be to let the user choose which branch/head should be imported.

For now, I think I'll just remove/close the unwanted head in order to be able to continue working on my project.

Revision history for this message
Maarten Bezemer (veger) wrote :

Closing the unwanted head with 'hg commit --close-branch' did not workaround the problem. The closed branch/head is still imported even after trowing away the old bzr import repository and creating a new one (with a new import request).

Is this (wrongly importing a closed branch/head) or is due to this report and does it get solved automatically when this bug gets fixed.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 822818] Re: hg import does not import all revisions in tip.

Hoi Maarten,

On 10/08/11 01:53, Maarten Bezemer wrote:
> Closing the unwanted head with 'hg commit --close-branch' did not
> workaround the problem. The closed branch/head is still imported even
> after trowing away the old bzr import repository and creating a new one
> (with a new import request).
>
> Is this (wrongly importing a closed branch/head) or is due to this
> report and does it get solved automatically when this bug gets fixed
Creating a new import shouldn't really make a difference.

This seems like a bug somewhere. Is it possible to close the default
branch with "hg commit --close-branch" ?

bzr-hg just imports the first revision on the default branch at the
moment, as returned by repo.branchmap(). Can that return closed branches?

Cheers,

Jelmer

Revision history for this message
Maarten Bezemer (veger) wrote :

> Is it possible to close the default branch with "hg commit --close-branch" ?
Well we had multiple heads in the default branch. I closed one of them (the one which was imported) in Google Code it is hidden from the menu with the available branches, so I guess it was possible.

Whether repo.branchmap() can return closed branches or not: I do not know, I guess that is the job of the person fixing this problem... ;)

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

Any estimation how long it will take to fix?
Depending on the estimation, I'll manually import the branch for now (unless it is estimated soon).

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I have no idea at this point, sorry.

bzr-hg is not quite as mature as bzr-git or bzr-svn are, so there are a couple of high priority bugs that will need to be fixed before I get to this one.

Revision history for this message
Maarten Bezemer (veger) wrote :

Ok, thanks you for your answer. I'll do manual import for now.

Jelmer Vernooij (jelmer)
tags: added: bzr-hg
Curtis Hovey (sinzui)
Changed in launchpad:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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