{"thread":{"id":"32066","subject":"Test failures in contrib/remote-helpers","startedAt":"2012-11-11T10:32:48Z","lastAt":"2012-11-13T05:29:32Z","messageCount":6,"participants":["Ramkumar Ramachandra","Felipe Contreras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"202808","messageId":"CALkWK0mU5O3Rqznkx-qn8VLFEgsMzOba1i8onSvf8X3FBeTs6g@mail.gmail.com","threadId":"32066","inReplyTo":null,"subject":"Test failures in contrib/remote-helpers","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-11T10:32:48Z","receivedAt":"2012-11-11T10:32:48Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nI'm experiencing test failures in contrib/remote-helpers.\n\n>From the first test in test-bzr.sh:\n\nTraceback (most recent call last):\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-bzr\",\nline 672, in <module>\n    sys.exit(main(sys.argv))\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-bzr\",\nline 651, in main\n    repo = get_repo(url, alias)\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-bzr\",\nline 608, in get_repo\n    origin = bzrlib.controldir.ControlDir.open(url)\nAttributeError: type object 'ControlDir' has no attribute 'open'\n\n>From the first test in test-hg.sh:\n\nTraceback (most recent call last):\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 785, in <module>\n    sys.exit(main(sys.argv))\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 773, in main\n    do_import(parser)\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 500, in do_import\n    export_head(repo)\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 397, in export_head\n    export_ref(repo, g_head[0], 'bookmarks', g_head[1])\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 297, in export_ref\n    revs = repo.revs('%u:%u' % (tip, head))\nAttributeError: 'localrepository' object has no attribute 'revs'\nfatal: stream ends early\nfast-import: dumping crash report to\n/home/likewise-open/ANT/ramkum/src/git/t/trash\ndirectory.test-hg/gitrepo/.git/fast_import_crash_24346\nfatal: Error while running fast-import\n\n>From the first test in test-hg-bidi.sh:\n\nTraceback (most recent call last):\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 785, in <module>\n    sys.exit(main(sys.argv))\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 773, in main\n    do_import(parser)\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 500, in do_import\n    export_head(repo)\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 397, in export_head\n    export_ref(repo, g_head[0], 'bookmarks', g_head[1])\n  File \"/home/likewise-open/ANT/ramkum/src/git/contrib/remote-helpers/git-remote-hg\",\nline 297, in export_ref\n    revs = repo.revs('%u:%u' % (tip, head))\nAttributeError: 'localrepository' object has no attribute 'revs'\nfatal: stream ends early\nfast-import: dumping crash report to\n/home/likewise-open/ANT/ramkum/src/git/t/trash\ndirectory.test-hg-bidi/tmp/gitrepo2/.git/fast_import_crash_25121\nfatal: Error while running fast-import\n\nI can't `import hggit` (I don't know how hg-git is distributed), so I\ndidn't run test-hg-hg-git.sh.\n\nI'm currently investigating.\n\nRam\n"},{"id":"202817","messageId":"CAMP44s1TLyKoHVouwgCFqi-vwA6rUBYJZXTA7JDFX6bfyQ7_tw@mail.gmail.com","threadId":"32066","inReplyTo":"CALkWK0mU5O3Rqznkx-qn8VLFEgsMzOba1i8onSvf8X3FBeTs6g@mail.gmail.com","subject":"Re: Test failures in contrib/remote-helpers","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-11T12:00:51Z","receivedAt":"2012-11-11T12:00:51Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nOn Sun, Nov 11, 2012 at 11:32 AM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> I'm experiencing test failures in contrib/remote-helpers.\n\nWhich are your versions of hg, and bzr?\n\n-- \nFelipe Contreras\n"},{"id":"202824","messageId":"CALkWK0k9trxx8NC1GWw-yYzBKhFchrvg2JLeBtyoAkokmv9A0w@mail.gmail.com","threadId":"32066","inReplyTo":"CAMP44s1TLyKoHVouwgCFqi-vwA6rUBYJZXTA7JDFX6bfyQ7_tw@mail.gmail.com","subject":"Re: Test failures in contrib/remote-helpers","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-11T12:48:40Z","receivedAt":"2012-11-11T12:48:40Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Felipe Contreras wrote:\n> On Sun, Nov 11, 2012 at 11:32 AM, Ramkumar Ramachandra\n> <artagnon@gmail.com> wrote:\n>> I'm experiencing test failures in contrib/remote-helpers.\n>\n> Which are your versions of hg, and bzr?\n\nMercurial Distributed SCM (version 1.9.1)\nBazaar (bzr) 2.4.1\n\nRam\n"},{"id":"202916","messageId":"CAMP44s14J_D_pZuRL4zrc1iphxf7tnFuA4Vpx7d1JTDUts84uw@mail.gmail.com","threadId":"32066","inReplyTo":"CALkWK0k9trxx8NC1GWw-yYzBKhFchrvg2JLeBtyoAkokmv9A0w@mail.gmail.com","subject":"Re: Test failures in contrib/remote-helpers","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-11T19:50:35Z","receivedAt":"2012-11-11T19:50:35Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Nov 11, 2012 at 1:48 PM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> Felipe Contreras wrote:\n>> On Sun, Nov 11, 2012 at 11:32 AM, Ramkumar Ramachandra\n>> <artagnon@gmail.com> wrote:\n>>> I'm experiencing test failures in contrib/remote-helpers.\n>>\n>> Which are your versions of hg, and bzr?\n>\n> Mercurial Distributed SCM (version 1.9.1)\n\nI can reproduce the issue, this fixes it for versions up to 1.8:\n\n--- a/contrib/remote-helpers/git-remote-hg\n+++ b/contrib/remote-helpers/git-remote-hg\n@@ -294,7 +294,7 @@ def export_ref(repo, name, kind, head):\n     if tip and tip == head.rev():\n         # nothing to do\n         return\n-    revs = repo.revs('%u:%u' % (tip, head))\n+    revs = xrange(tip, head.rev() + 1)\n     count = 0\n\n     revs = [rev for rev in revs if not marks.is_marked(rev)]\n\nI don't think it makes sense to aim anything lower.\n\n-- \nFelipe Contreras\n"},{"id":"203026","messageId":"CAMP44s1E7qKCPTH1MMuOwJkW8opmD+Q6bzD6j1-KM039g-Uq2g@mail.gmail.com","threadId":"32066","inReplyTo":"CALkWK0k9trxx8NC1GWw-yYzBKhFchrvg2JLeBtyoAkokmv9A0w@mail.gmail.com","subject":"Re: Test failures in contrib/remote-helpers","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2012-11-13T00:35:29Z","receivedAt":"2012-11-13T00:35:29Z","isPatch":false,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Sun, Nov 11, 2012 at 1:48 PM, Ramkumar Ramachandra\n<artagnon@gmail.com> wrote:\n> Felipe Contreras wrote:\n>> On Sun, Nov 11, 2012 at 11:32 AM, Ramkumar Ramachandra\n>> <artagnon@gmail.com> wrote:\n>>> I'm experiencing test failures in contrib/remote-helpers.\n>>\n>> Which are your versions of hg, and bzr?\n>\n> Mercurial Distributed SCM (version 1.9.1)\n> Bazaar (bzr) 2.4.1\n\nAnd here's the one for bzr:\n\n--- a/contrib/remote-helpers/git-remote-bzr\n+++ b/contrib/remote-helpers/git-remote-bzr\n@@ -646,12 +646,12 @@ def get_repo(url, alias):\n     global dirname, peer\n\n     clone_path = os.path.join(dirname, 'clone')\n-    origin = bzrlib.controldir.ControlDir.open(url)\n+    origin = bzrlib.bzrdir.BzrDir.open(url)\n     remote_branch = origin.open_branch()\n\n     if os.path.exists(clone_path):\n         # pull\n-        d = bzrlib.controldir.ControlDir.open(clone_path)\n+        d = bzrlib.bzrdir.BzrDir.open(clone_path)\n         branch = d.open_branch()\n         result = branch.pull(remote_branch, [], None, False)\n     else:\n\nI have other fixes to run up to 2.0.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"203049","messageId":"CALkWK0=+HGzLpFNPn_mo2_zt+pqYs230ZK4x3SweiFcXCD5zHQ@mail.gmail.com","threadId":"32066","inReplyTo":"CAMP44s1E7qKCPTH1MMuOwJkW8opmD+Q6bzD6j1-KM039g-Uq2g@mail.gmail.com","subject":"Re: Test failures in contrib/remote-helpers","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2012-11-13T05:29:32Z","receivedAt":"2012-11-13T05:29:32Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Felipe Contreras wrote:\n> And here's the one for bzr:\n>\n> --- a/contrib/remote-helpers/git-remote-bzr\n> +++ b/contrib/remote-helpers/git-remote-bzr\n> @@ -646,12 +646,12 @@ def get_repo(url, alias):\n>      global dirname, peer\n>\n>      clone_path = os.path.join(dirname, 'clone')\n> -    origin = bzrlib.controldir.ControlDir.open(url)\n> +    origin = bzrlib.bzrdir.BzrDir.open(url)\n>      remote_branch = origin.open_branch()\n>\n>      if os.path.exists(clone_path):\n>          # pull\n> -        d = bzrlib.controldir.ControlDir.open(clone_path)\n> +        d = bzrlib.bzrdir.BzrDir.open(clone_path)\n>          branch = d.open_branch()\n>          result = branch.pull(remote_branch, [], None, False)\n>      else:\n>\n> I have other fixes to run up to 2.0.\n\nWorks for me.  All four tests pass now.\nReported-by: Ramkumar Ramachandra <artagnon@gmail.com>\nTested-by: Ramkumar Ramachandra <artagnon@gmail.com>\n\nRam\n"}]}