hoangduit / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

Moving to bitbucket or github #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

You use a dropbox link to update, and no version mentioned in the project home.

Google has changed the Google Project Hosting policy so I think it's time to 
move. We downstreams are not easy to track updates without announcement. After 
you move to github, you can use a tag to tag the new releases, this will be 
helpful for us to update the package.

Thanks.

Original issue reported on code.google.com by Cickumqt on 25 Mar 2014 at 12:52

GoogleCodeExporter commented 9 years ago
Maybe rather than leaving Google Code, where LZ4 is currently referenced 
basically everywhere, it would be better to start by creating a mirror on 
GitHub...

Original comment by yann.col...@gmail.com on 26 Mar 2014 at 9:54

GoogleCodeExporter commented 9 years ago
You can have a look at what the mirror could look like by going to :
https://github.com/Cyan4973/lz4

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 7:37

GoogleCodeExporter commented 9 years ago
Hi, thanks for the mirror !

Just an FYI, you can clone entire SVN history.

 - http://stackoverflow.com/questions/796991/
 - http://stackoverflow.com/questions/20128260/
 - http://blog.tfnico.com/2013/08/always-use-git-svn-with-prefix.html

Here is an example:

git svn clone -s --prefix=origin/ https://lz4.googlecode.com/svn lz4
cd lz4
git remote add origin git@github.com:Cyan4973/lz4_mirror.git
git push origin master

Original comment by takayuki...@gmail.com on 6 Apr 2014 at 8:04

GoogleCodeExporter commented 9 years ago
Thanks for detailed info Takayuki.

Do you feel it's a useful feature for users to also upload SVN history into 
github ?

My (probably uninstructed) fear is that, having already setup a master, adding 
an history at this point might get SVN/Git confused...

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 8:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
By the way (following your example, using Linux Mint 16):

git svn clone -s --prefix=origin/ https://lz4.googlecode.com/svn lz4
git: 'svn' is not a git command. See 'git --help'.

Did you mean one of these?
    fsck
    mv
    show

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 8:12

GoogleCodeExporter commented 9 years ago

Original comment by yann.col...@gmail.com on 6 Apr 2014 at 8:12

GoogleCodeExporter commented 9 years ago
> git: 'svn' is not a git command. See 'git --help'.

Sorry!  You can install it by `git-svn`:

sudo apt-get install git-svn

For Windows, msysgit has `git-svn` for years.

> Do you feel it's a useful feature for users to also upload SVN history into 
github ?

Yes, I think so.
For example, it enables them to be able to use specific commit (revision).

It will be a good news for people who has a wish to use lz4 repository
by git-submodule and keep up-to-date for daily development, but also want to
use older revision (eg. r100) for stable-release branch.

> adding an history at this point might get SVN/Git confused...

Hmm, I'm not a git-svn expert but it seems there are some solutions.

(1) Synchronize Google Code (svn) and GitHub (git) repositories.

Many people has tried this problem:

 - http://stackoverflow.com/questions/190431/
 - https://www.atlassian.com/git/migration#!migration-convert

It seems to work well. But I don't know much about hidden
pitfalls about branches.

(2) Convert svn-repo to git-repo on Google Code and synchronize
Google Code (git) and GitHub (git) repositories.

I've found a nice document about svn-to-git conversion on code.google.com:

 - https://code.google.com/p/support/wiki/ConvertingSvnToGit

If you choose this method, difficulties about synchronizing
svn (on google code) and git (on github) will be gone.
Just push/pull/merge between two git repositories.

Original comment by takayuki...@gmail.com on 7 Apr 2014 at 2:38

GoogleCodeExporter commented 9 years ago
> sudo apt-get install git-svn

Thanks, it works fine now

> It will be a good news for people who has a wish to use lz4 repository
> by git-submodule and keep up-to-date for daily development, but also want to
> use older revision (eg. r100) for stable-release branch.

Note that it is my intention to only push to master stable releases, mirror of 
Google code ones, while keeping intermediate developments into beta branch.

Regarding automatic double update google/github :
I prefer to keep it manual for the time being.
I understand there are solutions for this, but I'm not yet accustomed of the 
situatio not weary of manual process. Github repo only started days ago as a 
mirror of Google repo. I will remain this way for some time.

Original comment by yann.col...@gmail.com on 9 Apr 2014 at 8:53

GoogleCodeExporter commented 9 years ago
For information :
I tried your recommended list of commands.
It almost works.

Only last command is source for concern :

> git push origin master

To git@github.com:Cyan4973/lz4.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:Cyan4973/lz4.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

So there are indeed some problems in trying to push the old history from SVN 
into a new but existing git.

Original comment by yann.col...@gmail.com on 10 Apr 2014 at 10:51

GoogleCodeExporter commented 9 years ago
You could also try "git push -f origin master" to overwrite the contents of the 
other repository. I'm not sure it works in this scenario; at the same time, 
with my understanding of how Git works, I'm not sure why it wouldn't.

Original comment by jeffrey.mitchell on 11 Apr 2014 at 5:25

GoogleCodeExporter commented 9 years ago
Yann,

You can't push local `master` branch (mirror of svn/trunk in this case) to 
`origin` (github) directly. You have to merge or rename the branch.

I think branch renaming is easier way in this case.
Use following commands instead of `git push origin master` :

# rename branch `master` to `google-code`
git branch -m master google-code

# push branch `google-code` to origin (github)
git push origin google-code

Now, you can see `google-code` branch in your github interface.
Here is my example : https://github.com/t-mat/lz4/network

And you can use these branches :

master      : Stable release branch.
beta        : Development branch.
google-code : Mirror of googlecode svn-repo. You can dcommit/pull via this 
branch.

Original comment by takayuki...@gmail.com on 13 Apr 2014 at 4:03

GoogleCodeExporter commented 9 years ago
Thanks Jeffrey, the '-f' command worked.

The mirror on Github is now fully synchronized with the Google Code history 
(r116).

As a consequence, the beta branch was completely separated (unmergeable) from 
master, and I guess any fork will suffer the same consequence.
I had to recreate a new beta branch and upload latest modifications there; it 
seems to work so far.

@Takayuki : thanks for suggestion. I'm only starting to understand it now. Yes 
it probably would have worked too.

For the time being, I'm intending to keep "master" at github synchronized with 
the google code repository, which is still, for the time being, the official 
LZ4 repository (github is only a mirror).
It's easier for me to manage it this way.

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 1:36

GoogleCodeExporter commented 9 years ago
I'm very glad to your conclusion and thanks to Jeffery too !

By the way, I have just a bit offtopic question.
Could you accept Pull Request on GitHub ?

Original comment by takayuki...@gmail.com on 15 Apr 2014 at 3:00

GoogleCodeExporter commented 9 years ago
I guess so, I already accepted a few pull request with FSE.
Although considering the current model,
I would likely prefer to integrate them into the beta branch first.

Regards

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 3:08

GoogleCodeExporter commented 9 years ago
Sure, you can create a git branch with name "devel" or anything you want, then 
merge all changes to the dev branch, when you think it's ready, merge them into 
master.

Original comment by Cickumqt on 15 Apr 2014 at 3:14

GoogleCodeExporter commented 9 years ago
Yes, that's what the "beta" branch is supposed to do.

Is the name "devel" somewhat "more standard" than "beta" for this usage ?

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 4:35

GoogleCodeExporter commented 9 years ago
Yann,
Thanks. I'll send pull request at GitHub :)

> "beta" vs "devel"

There are articles about `develop` branch (aka "git-flow"):

  Gitflow Workflow Tutorial / Atlassian
  http://www.atlassian.com/git/workflows#!workflow-gitflow

  A successful Git branching model (detailed, famous article)
  http://nvie.com/posts/a-successful-git-branching-model/

"git-flow" is well known, structured, traditional work flow. You can find many 
articles about this.

Original comment by takayuki...@gmail.com on 15 Apr 2014 at 6:35

GoogleCodeExporter commented 9 years ago
Thanks Takayuki, 
these are excellent references

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 6:45

GoogleCodeExporter commented 9 years ago
OK, I'm sold.

Starting with r117, the main development branch will be called "develop" as 
suggested by the reference git-flow model, instead of "beta" as it is today.

Original comment by yann.col...@gmail.com on 15 Apr 2014 at 7:09

GoogleCodeExporter commented 9 years ago

Original comment by yann.col...@gmail.com on 22 Apr 2014 at 11:06