Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

hg-git downloads the GitHub project directory, not the git repo #196

Closed
billgarrison opened this issue Apr 25, 2011 · 4 comments
Closed

Comments

@billgarrison
Copy link

My environment:
hg-git 0.2.6
dulwich 0.7.1
git 1.7.4.4
hg 1.8.2
Mac OS X 10.6.7, Xcode 4

Observed:
When I use hg-git to clone any GitHub repo that doesn't belong to me, I get the GitHub project directory instead of the git repo.

I get the correct behavior from hg-git when cloning repos on GitHub that I have created, which were all natively Mercurial repos previously pushed to GitHub via hg-git.

With hg

$ hg clone git://github.com/gabriel/gh-unit.git
destination directory: gh-unit
importing Hg objects into Git
Counting objects: 5137, done.
Compressing objects: 100% (1938/1938), done.
Total 5137 (delta 3470), reused 4579 (delta 3001)
importing Git objects into Hg
updating to branch default
97 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd gh-unit; ls 
.gitignore                                                    _g_h_test_operation_8h_source.html                            functions.html
.hg/                                                          _g_h_test_runner_8h_source.html                               functions_func.html
.nojekyll                                                     _g_h_test_suite_8h_source.html                                functions_prop.html
Info.plist                                                    _g_h_test_view_model_8h_source.html                           globals.html
Nodes.xml                                                     _g_h_testing_8h_source.html                                   globals_defs.html
Tokens.xml                                                    _g_h_u_n_s_object_09_swizzle_8h_source.html                   hierarchy.html
_building.html                                                _g_h_unit_8h_source.html                                      index.html
_command_line.html                                            _hudson.html                                                  installdox*
_customizing.html                                             _installing.html                                              interface_g_h_async_test_case.html
_env_variables.html                                           _n_s_exception_09_g_h_test_failure_exceptions_8h_source.html  interface_g_h_async_test_case.png
_examples.html                                                _n_s_value_09_g_h_value_formatter_8h_source.html              interface_g_h_test_case.html
_g_h_async_test_case_8h_source.html                           _test_macros.html                                             interface_g_h_test_case.png
_g_h_mock_n_s_h_t_t_p_u_r_l_response_8h_source.html           annotated.html                                                nav_f.png
_g_h_mock_n_s_u_r_l_connection_8h_source.html                 bc_s.png                                                      nav_h.png
_g_h_n_s_locale_09_mock_8h_source.html                        class_g_h_async_test_case-members.html                        open.png
_g_h_test_09_j_unit_x_m_l_8h_source.html                      class_g_h_test_case-members.html                              pages.html
_g_h_test_8h_source.html                                      classes.html                                                  search/
_g_h_test_case_8h_source.html                                 closed.png                                                    tab_a.png
_g_h_test_group_09_j_unit_x_m_l_8h_source.html                deprecated.html                                               tab_b.png
_g_h_test_group_8h_source.html                                doxygen.css                                                   tab_h.png
_g_h_test_macros_8h.html                                      doxygen.png                                                   tab_s.png
_g_h_test_macros_8h_source.html                               files.html                                                    tabs.css

With git

$ git clone git://github.com/gabriel/gh-unit.git
Cloning into gh-unit...
remote: Counting objects: 5137, done.
remote: Compressing objects: 100% (1938/1938), done.
remote: Total 5137 (delta 3470), reused 4579 (delta 3001)
Receiving objects: 100% (5137/5137), 21.17 MiB | 591 KiB/s, done.
Resolving deltas: 100% (3470/3470), done.
$ cd gh-unit; ls
ls
.git/             CHANGELOG.md      Classes-IPhone/   Documentation/    Examples/         Libraries/        Makefile          Project-IPhone/   Scripts/          Tests/
.gitignore        Classes/          Classes-MacOSX/   Doxyfile          LICENSE           Libraries-MaxOSX/ Project/          README.md         TODO.md           XcodeConfig/
@billgarrison
Copy link
Author

To add more info to this issue:

It appears that hg-git only has problems with certain GitHub repos. I was able to successfully clone git://github.com/schacon/hg-git.git with both git and hg-git.

@nightkr
Copy link
Contributor

nightkr commented May 3, 2011

To me it looks like that this happens on projects which use GitHub Pages, probably also only when the pages were the last thing updated.
Try executing $ hg update master.

@billgarrison
Copy link
Author

Hmm. I couldn't verify whether $ hg update master would work. The gh-unit repo came down fine this time on a fresh hg clone attempt. It looks like that repo's master branch was the most recently updated.

I'll try this next time I run into the problem and update the issue.

@Jaharmi
Copy link

Jaharmi commented Apr 9, 2012

I had this problem happen with the Luggage repo using both Mercurial 1.9.1 and Mercurial 2.1.2 on Mac OS X 10.6.8.

$ hg clone git://github.com/unixorn/luggage.git

I made multiple clone attempts and it always resulted in the local repo showing the GitHub project rather than the source. I found this issue and tried $ hg update master and it appeared to work (had reinstalled Hg 1.9.1 beforehand).

I had also had problems using $ hg fetch to get the latest commits from the GH source repo.

$ hg fetch
abort: outstanding uncommitted merge

To my knowledge, I hadn't actually had any changes to merge. My local repo was showing that all of the source files were modified when I checked after the fetch with $ hg status.

@durin42 durin42 closed this as completed Dec 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants