schacon / hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg
GNU General Public License v2.0
620 stars 71 forks source link

After hg 2.5 installed, getting bookmark-related error. #258

Closed chdiza closed 10 years ago

chdiza commented 11 years ago

I now get "creating bookmarks failed, do you have bookmarks enabled?" as a response to any "hg pull --update" issued in a repo that was cloned from an online git repo. This didn't happen with hg 2.4.x or earlier. It only happens for git-derived repos, which is why I report it here to hg-git.

This is Mac OSX 10.8.2 with hg-git 3.4 installed, Python 2.7.3.

eternicode commented 11 years ago

Having the same problem here.

hg version 2.5.1 via apt-get, hg-git 0.3.4 via pip. Ubuntu 12.04, Python 2.7.3.

Fresh-cloning a project I've been working on:

$ hg clone git+ssh://git@github.com/eternicode/bootstrap-datepicker.git bsdp
["git-upload-pack '/eternicode/bootstrap-datepicker.git'"]
importing git objects into hg
creating bookmarks failed, do you have bookmarks enabled?
updating to branch default
52 files updated, 0 files merged, 0 files removed, 0 files unresolved

Running hg book in the resulting clone says "no bookmarks set".

Downgrading to hg 2.4.2 with pip is a usable workaround for me for the time being.

todolson commented 11 years ago

We see the same problem with hg 2.5.2, Python 2.7.3, FreeBSD 8.3-RELEASE-p5:

$ hg pull pulling from git://vufind.git.sourceforge.net/gitroot/vufind/vufind exporting hg objects to git importing git objects into hg creating bookmarks failed, do you have bookmarks enabled? (run 'hg heads .' to see heads, 'hg merge' to merge)

The hg pull seems to leave the existing bookmarks in place but not update them.

The message is from an AttributeError thrown inside of update_hg_bookmarks in git_handler.py, lines 1127-1181. There's one getattr() on a bookmarks object at the beginning of the method and another getattr() at the end of the method. The second getattr() is wrapped in a conditional with comments about hg 2.5.

That's a far as I'll be able to take this, though.

durin42 commented 11 years ago

Are you running the current release (0.4.0)?

On Wed, Mar 27, 2013 at 11:45 AM, Tod Olson notifications@github.comwrote:

We see the same problem with hg 2.5.2, Python 2.7.3, FreeBSD 8.3-RELEASE-p5:

$ hg pull pulling from git://vufind.git.sourceforge.net/gitroot/vufind/vufind exporting hg objects to git importing git objects into hg creating bookmarks failed, do you have bookmarks enabled? (run 'hg heads .' to see heads, 'hg merge' to merge)

The hg pull seems to leave the existing bookmarks in place but not update them.

The message is from an AttributeError thrown inside of update_hg_bookmarksin git_handler.py, lines 1127-1181. There's one getattr() on a bookmarks object at the beginning of the method and another getattr() at the end of the method. The second getattr() is wrapped in a conditional with comments about hg 2.5.

That's a far as I'll be able to take this, though.

— Reply to this email directly or view it on GitHubhttps://github.com/schacon/hg-git/issues/258#issuecomment-15531265 .

todolson commented 11 years ago

No, looks like we're not:

pkg_info | grep hg-git
py27-hg-git-0.3.4   Mercurial extension to pull from or push to a Git repository

I'll ask our sysadmin to upgrade. Thanks!

andredias commented 10 years ago

Please, see https://bitbucket.org/durin42/hg-git/issue/54/with-option-branch_bookmark_suffix-set