Code Monkey home page Code Monkey logo

Comments (8)

mnauw avatar mnauw commented on June 8, 2024

Have you tried this with the latest version, since that one does not reproduce the above error on a casual attempt (might also depend on the Mercurial version > 3.7)? It looks a lot like 822c6e4 addresses this.

from git-remote-hg.

ariesXf avatar ariesXf commented on June 8, 2024

My apologies for commenting on an old issue, however I am experiencing the same issue when attempting to clone as well. I'm using the homebrew version on macOS, which I believe points to this repo's HEAD if I'm not mistaken.

...
remote:
requesting all changes
adding changesets
adding manifests
adding file changes
added 39 changesets with 110 changes to 30 files
adding remote bookmark master
adding remote bookmark remote/master
Traceback (most recent call last):
  File "/usr/local/bin/git-remote-hg", line 1343, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/git-remote-hg", line 1307, in main
    repo = get_repo(url, alias)
  File "/usr/local/bin/git-remote-hg", line 440, in get_repo
    updatebookmarks(repo, peer)
  File "/usr/local/bin/git-remote-hg", line 379, in updatebookmarks
    bookmarks.write(repo)
AttributeError: 'module' object has no attribute 'write'

from git-remote-hg.

sooheon avatar sooheon commented on June 8, 2024

I'm getting the same as @peterdimou, with the exact same traceback.

from git-remote-hg.

mnauw avatar mnauw commented on June 8, 2024

The traceback shown above refers to bookmarks.write(repo) on line 379. However, git-remote-hg in HEAD (which is 822c6e4 at this time) does not have such on line 379. That line, however, does have exactly that content in HEAD^ (tagged v0.3). So, it looks like homebrew is pointing to that revision, not HEAD, where the HEAD commit is highly likely one that addresses this very issue.

from git-remote-hg.

craiga avatar craiga commented on June 8, 2024

I'm getting the same issue, and can verify that Homebrew is installing version 0.3.

Any chance of getting a new release of this so it can be updated in Homebrew? I don't think it's unreasonable to expect that the following should work:

$ brew install git-remote-hg
$ git clone hg::https://bitbucket.org/morphus_imaia/django-otp
Cloning into 'django-otp'...
requesting all changes
adding changesets
adding manifests
adding file changes
added 100 changesets with 892 changes to 321 files
adding remote bookmark stable/0.1.x
adding remote bookmark stable/0.2.x
adding remote bookmark stable/0.3.x
Traceback (most recent call last):
  File "/usr/local/bin/git-remote-hg", line 1343, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/git-remote-hg", line 1307, in main
    repo = get_repo(url, alias)
  File "/usr/local/bin/git-remote-hg", line 440, in get_repo
    updatebookmarks(repo, peer)
  File "/usr/local/bin/git-remote-hg", line 379, in updatebookmarks
    bookmarks.write(repo)
AttributeError: 'module' object has no attribute 'write'

from git-remote-hg.

mnauw avatar mnauw commented on June 8, 2024

Note that this issue is fixed (as well as other issues with recent Mercurial) in the latest version of this fork, though it is another matter for downstream to pick that up (see also issue #69).

from git-remote-hg.

apjanke avatar apjanke commented on June 8, 2024

I'm getting a similar issue with bookmarks even when using the latest version from HEAD instead of v0.3.

$ git clone hg::https://www.octave.org/hg/octave
Cloning into 'octave'...
real URL is https://hg.savannah.gnu.org/hgweb/octave
requesting all changes
adding changesets
adding manifests
adding file changes
added 25590 changesets with 170203 changes to 13870 files (+1 heads)
adding remote bookmark @
new changesets 22412e3a4641:c21edcb90cbf
Traceback (most recent call last):
  File "/usr/local/bin/git-remote-hg", line 1356, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/git-remote-hg", line 1320, in main
    repo = get_repo(url, alias)
  File "/usr/local/bin/git-remote-hg", line 453, in get_repo
    updatebookmarks(repo, peer)
  File "/usr/local/bin/git-remote-hg", line 374, in updatebookmarks
    localmarks[k] = hgbin(v)
  File "/usr/local/lib/python2.7/site-packages/mercurial/bookmarks.py", line 106, in __setitem__
    raise error.ProgrammingError("use 'bookmarks.applychanges' instead")
mercurial.error.ProgrammingError: use 'bookmarks.applychanges' instead
[~/local/repos]
$ hg --version                                                                                 ✘ 128
Mercurial Distributed SCM (version 4.6.2)

Any chance of getting this fixed, and a new release tagged?

from git-remote-hg.

felipec avatar felipec commented on June 8, 2024

Any chance of getting this fixed, and a new release tagged?

Yes, I finally got around to doing it. This should be fixed in v0.4.

The relevant commit is aaef56a.

from git-remote-hg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.