Error when cloning git repository with subrepository

88 views
Skip to first unread message

gidyn

unread,
May 7, 2012, 2:12:12 AM5/7/12
to hg-...@googlegroups.com
I get the following error when trying to clone a git repository with a subrepository:

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.2.1)
** Extensions loaded: children, color, convert, fetch, graphlog, hgk, mq, progress, rebase, largefiles, purge, histedit, collapse
Traceback (most recent call last):
  File "hg", line 42, in <module>
  File "mercurial\dispatch.pyo", line 27, in run
  File "mercurial\dispatch.pyo", line 64, in dispatch
  File "mercurial\dispatch.pyo", line 87, in _runcatch
  File "mercurial\dispatch.pyo", line 685, in _dispatch
  File "mercurial\dispatch.pyo", line 467, in runcommand
  File "mercurial\extensions.pyo", line 184, in wrap
  File "hgext\color.pyo", line 362, in colorcmd
  File "mercurial\dispatch.pyo", line 775, in _runcommand
  File "mercurial\dispatch.pyo", line 746, in checkargs
  File "mercurial\dispatch.pyo", line 682, in <lambda>
  File "mercurial\util.pyo", line 463, in check
  File "mercurial\commands.pyo", line 1167, in clone
  File "mercurial\hg.pyo", line 400, in clone
  File "mercurial\extensions.pyo", line 184, in wrap
  File "hgext\largefiles\overrides.pyo", line 626, in hgupdate
  File "mercurial\hg.pyo", line 416, in update
  File "mercurial\merge.pyo", line 596, in update
  File "mercurial\merge.pyo", line 391, in applyupdates
  File "mercurial\subrepo.pyo", line 175, in submerge
  File "mercurial\subrepo.pyo", line 504, in get
  File "mercurial\subrepo.pyo", line 494, in _get
  File "mercurial\hg.pyo", line 254, in clone
AttributeError: 'lfileswirerepository' object has no attribute 'url'

The main repository and subrepository are both on GitHub.

Keshav Kini

unread,
May 7, 2012, 4:25:05 AM5/7/12
to hg-...@googlegroups.com
Does it work when you turn off the largefiles extension?

-Keshav

Keshav Kini

unread,
May 7, 2012, 4:25:41 AM5/7/12
to hg-...@googlegroups.com

gidyn

unread,
May 7, 2012, 4:36:29 AM5/7/12
to hg-...@googlegroups.com
On Monday, 7 May 2012 11:25:05 UTC+3, Keshav Kini wrote:
Does it work when you turn off the largefiles extension?

-Keshav

No, but the stack trace is different:


** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.2.1)
** Extensions loaded: children, color, convert, fetch, graphlog, hgk, mq, progress, rebase, purge, histedit, collapse

Traceback (most recent call last):
  File "hg", line 42, in <module>
  File "mercurial\dispatch.pyo", line 27, in run
  File "mercurial\dispatch.pyo", line 64, in dispatch
  File "mercurial\dispatch.pyo", line 87, in _runcatch
  File "mercurial\dispatch.pyo", line 685, in _dispatch
  File "mercurial\dispatch.pyo", line 467, in runcommand
  File "mercurial\extensions.pyo", line 184, in wrap
  File "hgext\color.pyo", line 362, in colorcmd
  File "mercurial\dispatch.pyo", line 775, in _runcommand
  File "mercurial\dispatch.pyo", line 746, in checkargs
  File "mercurial\dispatch.pyo", line 682, in <lambda>
  File "mercurial\util.pyo", line 463, in check
  File "mercurial\commands.pyo", line 1167, in clone
  File "mercurial\hg.pyo", line 400, in clone
  File "mercurial\hg.pyo", line 416, in update
  File "mercurial\merge.pyo", line 596, in update
  File "mercurial\merge.pyo", line 391, in applyupdates
  File "mercurial\subrepo.pyo", line 175, in submerge
  File "mercurial\subrepo.pyo", line 504, in get
  File "mercurial\subrepo.pyo", line 494, in _get
  File "mercurial\hg.pyo", line 254, in clone
AttributeError: 'gitrepo' object has no attribute 'url'

Keshav Kini

unread,
May 7, 2012, 4:40:12 AM5/7/12
to hg-...@googlegroups.com
Hmm. I notice that "hggit" is not in your list of loaded extensions... any idea why?

-Keshav

Keshav Kini

unread,
May 7, 2012, 4:40:54 AM5/7/12
to hg-...@googlegroups.com

Keshav Kini

unread,
May 7, 2012, 4:42:05 AM5/7/12
to hg-...@googlegroups.com
Ugh, sorry for these double posts. The new Google Groups UI is
spazzing out again... better just stick to using my email client :/

-Keshav
> --
> You received this message because you are subscribed to the Google Groups
> "hg-git" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hg-git/-/qTcjJtrJpigJ.
>
> To post to this group, send email to hg-...@googlegroups.com.
> To unsubscribe from this group, send email to
> hg-git+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hg-git?hl=en.

Augie Fackler

unread,
May 7, 2012, 9:10:10 AM5/7/12
to hg-...@googlegroups.com

On May 7, 2012, at 11:15 AM, gidyn wrote:
> There was an error in mercurial.ini. Corrected exception report:
>
> ** unknown exception encountered, please report by visiting
> ** http://mercurial.selenic.com/wiki/BugTracker
> ** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit
> (AMD64)]
> ** Mercurial Distributed SCM (version 2.2.1)
> ** Extensions loaded: children, color, convert, fetch, graphlog, hgk, mq,
> progress, rebase, purge, collapse, histedit, hg-git
> Traceback (most recent call last):
> File "hg", line 42, in <module>
> File "mercurial\dispatch.pyo", line 27, in run
> File "mercurial\dispatch.pyo", line 64, in dispatch
> File "mercurial\dispatch.pyo", line 87, in _runcatch
> File "mercurial\dispatch.pyo", line 685, in _dispatch
> File "mercurial\dispatch.pyo", line 467, in runcommand
> File "mercurial\extensions.pyo", line 184, in wrap
> File "hgext\color.pyo", line 362, in colorcmd
> File "mercurial\dispatch.pyo", line 775, in _runcommand
> File "mercurial\dispatch.pyo", line 746, in checkargs
> File "mercurial\dispatch.pyo", line 682, in <lambda>
> File "mercurial\util.pyo", line 463, in check
> File "mercurial\commands.pyo", line 1167, in clone
> File "mercurial\hg.pyo", line 400, in clone
> File "mercurial\hg.pyo", line 416, in update
> File "mercurial\merge.pyo", line 596, in update
> File "mercurial\merge.pyo", line 391, in applyupdates
> File "mercurial\subrepo.pyo", line 175, in submerge
> File "mercurial\subrepo.pyo", line 504, in get
> File "mercurial\subrepo.pyo", line 494, in _get
> File "mercurial\hg.pyo", line 254, in clone
> AttributeError: 'gitrepo' object has no attribute 'url'

Does the problem with subrepos go away when you don't use hg-git?

>
> --
> You received this message because you are subscribed to the Google Groups "hg-git" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/hg-git/-/3oFBGNWf6NQJ.

gidyn

unread,
May 7, 2012, 9:24:42 AM5/7/12
to hg-...@googlegroups.com
Yes, I can clone the same repository from Bitbucket without issue.

The relevant repositories are http://bitbucket.org/accursoft/osk and http://github.com/accursoft/osk.git. The Github repository requires
[subpaths]
^git\+https://github\.com/([^/]*)/([^/.]*)$ = git+https://github.com/\1/\2.git
or equivalent to be defined somewhere.

Augie Fackler

unread,
May 12, 2012, 4:31:34 AM5/12/12
to hg-...@googlegroups.com

On May 7, 2012, at 11:15 AM, gidyn wrote:

> On Monday, 7 May 2012 11:40:12 UTC+3, Keshav Kini wrote:
>>
> There was an error in mercurial.ini. Corrected exception report:
>
> ** unknown exception encountered, please report by visiting
> ** http://mercurial.selenic.com/wiki/BugTracker
> ** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit
> (AMD64)]
> ** Mercurial Distributed SCM (version 2.2.1)
> ** Extensions loaded: children, color, convert, fetch, graphlog, hgk, mq,
> progress, rebase, purge, collapse, histedit, hg-git
> Traceback (most recent call last):
> File "hg", line 42, in <module>
> File "mercurial\dispatch.pyo", line 27, in run
> File "mercurial\dispatch.pyo", line 64, in dispatch
> File "mercurial\dispatch.pyo", line 87, in _runcatch
> File "mercurial\dispatch.pyo", line 685, in _dispatch
> File "mercurial\dispatch.pyo", line 467, in runcommand
> File "mercurial\extensions.pyo", line 184, in wrap
> File "hgext\color.pyo", line 362, in colorcmd
> File "mercurial\dispatch.pyo", line 775, in _runcommand
> File "mercurial\dispatch.pyo", line 746, in checkargs
> File "mercurial\dispatch.pyo", line 682, in <lambda>
> File "mercurial\util.pyo", line 463, in check
> File "mercurial\commands.pyo", line 1167, in clone
> File "mercurial\hg.pyo", line 400, in clone
> File "mercurial\hg.pyo", line 416, in update
> File "mercurial\merge.pyo", line 596, in update
> File "mercurial\merge.pyo", line 391, in applyupdates
> File "mercurial\subrepo.pyo", line 175, in submerge
> File "mercurial\subrepo.pyo", line 504, in get
> File "mercurial\subrepo.pyo", line 494, in _get
> File "mercurial\hg.pyo", line 254, in clone
> AttributeError: 'gitrepo' object has no attribute 'url'

Please try this patch:
diff --git a/hggit/gitrepo.py b/hggit/gitrepo.py
--- a/hggit/gitrepo.py
+++ b/hggit/gitrepo.py
@@ -15,6 +15,9 @@ class gitrepo(repo.repository):
self.ui = ui
self.path = path

+ def url(self):
+ return self.path
+
def lookup(self, key):
if isinstance(key, str):
return key

gidyn

unread,
May 12, 2012, 2:51:39 PM5/12/12
to hg-...@googlegroups.com
On Saturday, 12 May 2012 11:31:34 UTC+3, Augie wrote:
Please try this patch:
diff --git a/hggit/gitrepo.py b/hggit/gitrepo.py
--- a/hggit/gitrepo.py
+++ b/hggit/gitrepo.py
@@ -15,6 +15,9 @@ class gitrepo(repo.repository):
         self.ui = ui
         self.path = path
 
+    def url(self):
+        return self.path
+
     def lookup(self, key):
         if isinstance(key, str):
             return key
Great, that's fixed it :-)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages