Moving to GitHub

28 views
Skip to first unread message

Vlad Riscutia

unread,
May 18, 2013, 7:55:25 AM5/18/13
to tinker...@googlegroups.com
Hi everyone,

As I mentioned earlier, I am moving Tinkerer to GitHub.

I just created https://github.com/vladris/tinkerer and https://github.com/vladris/tinkerer-contrib. I am also looking into hosting www.tinkerer.me on GitHub Pages.

During the following days, I will announce this on the Tinkerer website and Bitbucket repos.

Please start following the GitHub projects as ideally no new development will happen on Bitbucket. Bitbucket repos will be retired once everyone gets a chance to see the announcement.

Thank you,
Vlad

shirou

unread,
May 18, 2013, 8:38:47 AM5/18/13
to tinker...@googlegroups.com
Hi Vlad,

It seems you lost all previous commit log. Why don't you use
fast-export in order to store commit log?

[1] https://github.com/frej/fast-export

Regards,
Shirou


WAKAYAMA Shirou


2013/5/18 Vlad Riscutia <riscut...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "tinkerer-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tinkerer-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Vlad Riscutia

unread,
May 18, 2013, 8:46:17 AM5/18/13
to tinker...@googlegroups.com
Heh, I didn't think of that :) Actually I wasn't aware of fast-export. I just copied the files over and pushed them. 

I'll leave both bitbucket and github repos around for a while and if anyone has any major need for the commit history, I can look into using this. Otherwise I'm personally fine with missing the commit log as Tinkerer should be fairly stable right now and contributors list up to date :)

I will definitely remember this next time when I'm migrating things over.

Thank you,
Vlad

shirou

unread,
May 18, 2013, 9:29:32 AM5/18/13
to tinkerer-dev
Since there are only a few commits at this time, please use fast-export.
It only takes a few minutes.

% mkdir tinkerer.git (or something)
% cd tinkeer.git
% git init
% pip install hg-git
% pip install mercurial
% curl -O https://raw.github.com/frej/fast-export/master/hg-fast-export.sh
% curl -O https://raw.github.com/frej/fast-export/master/hg-fast-export.py
% curl -O https://raw.github.com/frej/fast-export/master/hg2git.py
% sh hg-fast-export.sh -r <your_hg_path>

Thank you,

Vlad Riscutia

unread,
May 18, 2013, 12:45:08 PM5/18/13
to tinker...@googlegroups.com
I'm having some trouble running this. I'm not sure what is supposed to happen after running hg-fast-export, I don't see any changes in git.

I'll leave it as-is for now.

Thank you,
Vlad

shirou

unread,
May 19, 2013, 8:44:45 PM5/19/13
to tinkerer-dev
Vlad, thank you for trying.
Could you find any error messages?

or, if you don't care, converted tar.gz file is here.
https://dl.dropboxusercontent.com/u/218108/files/tinkerer.git.tar.gz
Just hg clone from bitbucket and converted.

Regards,
Shirou

WAKAYAMA Shirou


2013/5/19 Vlad Riscutia <riscut...@gmail.com>:

Vlad Riscutia

unread,
May 23, 2013, 12:15:03 PM5/23/13
to tinker...@googlegroups.com
Thanks! 

I'm not sure I want to drop and recreate the github repository at this point as I already have a couple of followers, moved the issues over, even have a new bug report plus I updated the website and published it on github pages. I was hoping there is an easy way to merge this into the existing repository but otherwise this just means a bunch of extra work, including website going down.

Again, thanks a lot for letting me know about this tool and I will definitely use it if I ever want to move another project from hg to git, but right now I already spent some time on github Tinkerer and I don't want to do extra work just for the history which is already available on bitbucket.

Thank you,
Vlad

Christian Jann

unread,
May 23, 2013, 3:44:59 PM5/23/13
to tinker...@googlegroups.com
Hi Vlad,

you should be able to just override the remote repo, create a new local git
repository with full history, edit .git/config and add the remote repo at
GitHub (from your old .git/config) and then do something like git push --
mirror --force. People that have already cloned the repo will only see a non-
fast-forward error when doing a git pull and have to do a git clone again.

--
chris

Vlad Riscutia

unread,
May 24, 2013, 10:34:22 AM5/24/13
to tinker...@googlegroups.com
What about changes that occurred in the mean time? My git-fu is not that great, though I would happily pull this if someone who knows better than me what he is doing can set it up :)

Thank you,
Vlad

Nathan Yergler

unread,
May 24, 2013, 12:28:56 PM5/24/13
to tinker...@googlegroups.com
If there have been changes made in GitHub since the import, they would
need to be cherry-picked over onto the imported history.

Leaving the old history in BitBucket seems like it makes life
difficult for other developers to come along and understand the
codebase: if they want to see why someone did something, they're not
able to use the tools they normally would, like git blame. If they
wanted to see when behavior changed, they wouldn't be able to use git
bisect. Retaining history seems pretty important to me.

NRY

Yarko Tymciurak

unread,
May 24, 2013, 2:29:07 PM5/24/13
to tinker...@googlegroups.com
I'm more of an hg than a git user, but when I fork on github, the pattern I follow is:

- locally clone my forked repo from github;
- add the master (forked-from) repo to my local "remote"s;
  - git remote add some_remote_name  remote-url
- when the original author makes updates I want (does the merges:
  - git pull some_remote_name
- test, make sure the merge works, then commit to my repo:
  - git push my_repo

Couldn't you just do this?   
- Do whatever bitbucket convert to a local repo;
- set that local repo as a named remote;
- from your local clone of your github tree, pulll  from the "local-remote" which was from bitbucket;
- check that everything is ok;
- push to github

?


Regards,
- Yarko

Nathan Yergler

unread,
May 24, 2013, 2:46:23 PM5/24/13
to tinker...@googlegroups.com
That's a great strategy in many cases, but unfortunately I don't think
it will work here. Git records the parent of each commit with the
commit, and I think the goal of incorporating the existing history is
a linear history, with the most recent commits on top of the existing
changes.

There are only a handful of new commits and two branches, so now is
the time to fix this if it's going to get fixed.

If you'd like I could take Shirou's converted repo, pull in the
changes from github, and then push to a repo of my own for you to
inspect? If it looks sane, you can temporarily give me push privileges
on the real one and I can force push it. People cloning would get a
non-fast-forward warning, and if they tried to merge it could be a bit
sticky, but it doesn't look like there are any forks yet, so now is
probably the time to do it.

Thanks,

NRY

Vlad Riscutia

unread,
May 24, 2013, 2:57:56 PM5/24/13
to tinker...@googlegroups.com
If you could do that, it would be great! I'd really appreciate it!

Thank you,
Vlad

Nathan Yergler

unread,
May 25, 2013, 2:13:32 AM5/25/13
to tinker...@googlegroups.com
I've imported Shirou's converted repository and cherry-picked changes
for master and gh-pages into it.

You can see the result at https://github.com/nyergler/tinkerer-temp

If you (and hopefully others) can verify that looks correct, you can
add me to the main repo and I can force push it. As I mentioned,
you'll need to re-clone once we've replaced the repository.

Cheers,

NRY

Vlad Riscutia

unread,
May 25, 2013, 11:02:14 AM5/25/13
to tinker...@googlegroups.com
Thanks! Great job!

A couple of minor issues: looks like the bitbucket history contains the "Tinkerer moved to GitHub" commits to the README files, which probably shouldn't come over, but otherwise it's great.

I'll grant you access to tinkerer.

Thanks again, Nathan! And Shirou for converting the commit history! You guys are great!

Thank you,
Vlad

Nathan Yergler

unread,
May 25, 2013, 1:04:17 PM5/25/13
to tinker...@googlegroups.com
Hi Vlad,

I've pushed the new content to GitHub. I went ahead and removed and
"Tinkerer moved to Github" commit, and cleaned up the history on
gh-pages, as well. I have a backup of the old repository in case
something went amiss, but it looks right to me at this point.

Let me know if you have any questions or see anything that looks strange.

Cheers,

Nathan

Yarko Tymciurak

unread,
May 25, 2013, 2:47:57 PM5/25/13
to tinker...@googlegroups.com
Thanks - just tried an update;  looking int these results now.

It looks like you gained .hgignore, and lost .gitignore - suggest leaving both in (for anyone who prefers either git or hg locally);
Also, seem you lost egg-info file.

Other than that, the pull / merge, and a clean checkout of newly updated seem to be the same, but the failed merge might confuse.

Yarko-Tymciuraks-MacBook-Pro-2:tinkerer $ git pull
remote: Counting objects: 3986, done.
remote: Compressing objects: 100% (1189/1189), done.
remote: Total 3986 (delta 2661), reused 3981 (delta 2656)
Receiving objects: 100% (3986/3986), 1.69 MiB | 2.72 MiB/s, done.
Resolving deltas: 100% (2661/2661), done.
 + 7d8909b...92818f8 master     -> origin/master  (forced update)
 + ff34c9e...70154ed gh-pages   -> origin/gh-pages  (forced update)
 * [new branch]      html5      -> origin/html5
 * [new branch]      release    -> origin/release
Auto-merging tinkertest/content/lorem.rst
CONFLICT (add/add): Merge conflict in tinkertest/content/lorem.rst
Auto-merging blog/generate.sh
CONFLICT (add/add): Merge conflict in blog/generate.sh
Auto-merging blog/build-all-themes.sh
CONFLICT (add/add): Merge conflict in blog/build-all-themes.sh
Automatic merge failed; fix conflicts and then commit the result.

Yarko-Tymciuraks-MacBook-Pro-2:tinkerer $ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 4 and 497 different commits each, respectively.
#   (use "git pull" to merge the remote branch into yours)
#
# You have unmerged paths.
#   (fix conflicts and run "git commit")
#
# Changes to be committed:
#
# new file:   .hgignore
#
# Unmerged paths:
#   (use "git add <file>..." to mark resolution)
#
# both added:         blog/build-all-themes.sh
# both added:         blog/generate.sh
# both added:         tinkertest/content/lorem.rst
#

Yarko-Tymciuraks-MacBook-Pro-2:tinkerer $ cd ..
Yarko-Tymciuraks-MacBook-Pro-2:tinkerer $ git clone g...@github.com:vladris/tinkerer.git ntinkerer
Cloning into 'ntinkerer'...
remote: Counting objects: 3986, done.
remote: Compressing objects: 100% (1189/1189), done.
remote: Total 3986 (delta 2661), reused 3981 (delta 2656)
Receiving objects: 100% (3986/3986), 1.69 MiB | 2.45 MiB/s, done.
Resolving deltas: 100% (2661/2661), done.

Yarko-Tymciuraks-MacBook-Pro-2:tinkerer $ diff -q tinkerer ntinkerer
Common subdirectories: tinkerer/.git and ntinkerer/.git
Only in tinkerer: .gitignore
Only in tinkerer: Tinkerer.egg-info
Common subdirectories: tinkerer/blog and ntinkerer/blog
Only in tinkerer: build
Only in tinkerer: dist
Common subdirectories: tinkerer/tinkerer and ntinkerer/tinkerer
Common subdirectories: tinkerer/tinkertest and ntinkerer/tinkertest


Regards,
- Yarko

Nathan Yergler

unread,
May 25, 2013, 7:35:14 PM5/25/13
to tinker...@googlegroups.com
I wouldn't expect a merge to work, and if it did, you'd wind up
pushing the old + new history back, so that seems possibly wrong.

It does look like we lost .gitignore, probably because I was trying to
get the right parts from each repo.

Tinkerer.egg-info is derived from running setup.py, so arguably
shouldn't be checked in anyway (I usually ignore *.egg-info).

Vlad, would you like me to restore .gitignore, or do you want to take
care of it?

NRY

Vlad Riscutia

unread,
May 25, 2013, 8:24:36 PM5/25/13
to tinker...@googlegroups.com
I can take care of it and also ignore egg info. Thanks again guys!

Thank you,
Vlad

From: Nathan Yergler
Sent: ‎5/‎25/‎2013 4:35 PM
To: tinker...@googlegroups.com
Subject: Re: Moving to GitHub

[The entire original message is not included.]
Reply all
Reply to author
Forward
0 new messages