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

pulling garbage revisions from github #217

Closed marutosi closed 12 years ago

marutosi commented 12 years ago

For example.

GitHub Merge Button https://bitbucket.org/redmine/chiliproject/changeset/67624bcd9a62

durin42 commented 12 years ago

I'm not sure what you mean. What do you expect to see? What about this revision is "garbage"? It looks fine to me.

marutosi commented 12 years ago

This github repository has four branches. https://github.com/chiliproject/chiliproject

$ hg path
chili = git://github.com/chiliproject/chiliproject.git

$ hg pull chili

$ LANG=C hg bookmarks
   master                    4882:6a1daeb1b963
   release-v2.0.0            4876:0a7317c97b65
   stable                    4774:0d81ecde98b7
   unstable                  4825:12f08b92ee50

$ LANG=C hg tip
changeset:   4884:67624bcd9a62
tag:         tip
parent:      4882:6a1daeb1b963
parent:      4883:f6efae48d438
user:        GitHub Merge Button <merge-button@github.com>
date:        Thu Jun 23 06:08:00 2011 -0700
summary:     Merge 470d91d9ff2e40927823e0c827117a553c796d9c into 308852e21cfee71f8c0363edf732feba1e620589

$ LANG=C hg heads -t 
changeset:   4884:67624bcd9a62
tag:         tip
parent:      4882:6a1daeb1b963
parent:      4883:f6efae48d438
user:        GitHub Merge Button <merge-button@github.com>
date:        Thu Jun 23 06:08:00 2011 -0700
summary:     Merge 470d91d9ff2e40927823e0c827117a553c796d9c into 308852e21cfee71f8c0363edf732feba1e620589

changeset:   4881:c13aa4bcf793
parent:      4776:20d501d291c1
parent:      4850:89c5160ec28a
user:        GitHub Merge Button <merge-button@github.com>
date:        Tue Jun 21 03:51:28 2011 -0700
summary:     Merge a23f92f98c3f9a51a22dffb2dfa93fd075bfd771 into 44b1bcfa37e71a4466ffe5f65952df36f983b1e5

changeset:   4880:225e1dd8556f
parent:      4776:20d501d291c1
parent:      4879:32c6cf1240a2
user:        GitHub Merge Button <merge-button@github.com>
date:        Tue Jun 21 02:43:44 2011 -0700
summary:     Merge ffc1db8a544da46a112a5f64d9b895a903e16627 into 44b1bcfa37e71a4466ffe5f65952df36f983b1e5

.
.
.

$ LANG=C hg heads -t | grep -e "^changeset"  | wc -l
63

It seems hg-git pulls all "pull requests" which is not accepted yet. https://github.com/chiliproject/chiliproject/pulls

marutosi commented 12 years ago

Before Jun 24th, hg-git works fine. But after Jun 24th, hg-git pulling garbage.

http://twitter.com/marutosijp/status/84155197387046912

durin42 commented 12 years ago

I can't reproduce this:

$ hg clone git://github.com/chiliproject/chiliproject.git
destination directory: chiliproject
importing git objects into hg
updating to branch default                                                            
1792 files updated, 0 files merged, 0 files removed, 0 files unresolved               
$ cd chiliproject
$ hg log -r 'heads(::tip) and not bookmark()'

All heads have an associated bookmark. Perhaps the source of your pull request is rewriting history and therefore causing you to gain some defunct changes on the hg side?

marutosi commented 12 years ago

I tried clean clone. But, I still have problem.

$ hg clone git://github.com/chiliproject/chiliproject.git

$ hg log -r 'head() and  bookmark()' --template '{node|short}\n' 
12f08b92ee50
f5184dc720f9
e5150675f48a
b60a5cb6a0e8

$ hg log -r 'head() and not bookmark()' --template '{node|short}\n' 
b4a7d505f9d5
0b20a25b05be
38ab3664bf7a
.
.
.

$ hg log -r 'head() and not bookmark()' --template '{node|short}\n' | wc -l
60

I don't send pull request for this project.

Bitbucket mirror is maintained on other machine. https://bitbucket.org/redmine/chiliproject/

bos commented 12 years ago

This is better described in issue #219.