Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Geoffrey Thomas

On Sat, 22 Jun 2013, Paul Menzel wrote:


Hopefully everyone will agree, that git is the most popular one in the
FOSS world (Linux, freedesktop.org, GNOME, KDE, …) and a lot of people
are now familiar with the basic git commands. So using Bazaar is one
more thing to deal with for new contributors before making a
contribution to GRUB. (I know there is git-bzr-ng, but it is still one
more step.)

Talking to Vladimir and Colin in #grub, they did not oppose a migration
to git and Vladimir asked me to bring it up on the list.

Does anyone have experience with such a move and how to do it on
Savannah? Could you please share these? That would be great.


I did a conversion via bzr fast-export | git fast-import a while ago for 
my workplace, so that we could internally use git for development (so we 
all don't have to learn yet another VCS). Our priorities have shifted so 
we haven't hacked on GRUB for a while, but this thread inspired me to dust 
off the conversion, and re-attempt setting up a cronjob to do the import. 
I believe I now have it working and it should push new commits every hour:


  https://github.com/mokafive/grub

I'd be thrilled for GRUB to adopt that history -- let me know if it looks 
reasonable. Until there's a move to git, I intend to keep the URL working, 
so feel free to clone and format-patch from there. I'll try not to break 
history, but if someone points out that something got mis-imported, I'll 
fix that, which will involve rewriting history.


I haven't handled branches, because they don't look very active and 
honestly I don't yet understand bzr branching. I think handling it is 
straightforward, though, so I will figure that out if someone asks.


If you're curious about the details, the scripts I used for the conversion 
are at the end of the email; consider them freely usable with no 
restrictions. Here are the issues I ran into:


* For some reason, git packs the fast-import very, very poorly, causing 
the .git directory to balloon to over a gigabyte (for comparison, the .bzr 
directory is 21M). Running `git gc --aggressive` fixes it and drops .git 
to more like 20M. Note that Github seems to preserve the packing you send 
it, so if you make a new repo on the Github web interface, clones _from_ 
there will be gargantuan if you don't run the aggressive GC before the 
first time you push. I don't seem to need to rerun the GC on incremental 
imports, fortunately.


* A couple of commits (like 
cjwat...@ubuntu.com-20110330103133-rwadssw622rhkogw / b38045f in my 
import) seem to have an empty author name or email, when fast-exported, 
but a valid committer. So I set the author to the committer.


* .bzrignore needs to become .gitignore, so I changed that in each commit 
so that checking out older commits works reasonably. bzr has some built-in 
defaults that git doesn't, that GRUB makes use of (like *.o), so I added 
those. Also, .bzrignore itself was listed in .bzrignore, which strikes me 
as odd.


* I couldn't easily figure out how to make filter-branch resume from a 
certain point. Fortunately it doesn't take _that_ long to filter the whole 
thing, and is consistent. I think you can do this with .git/info/replace, 
if you really care, though.


There's nothing Github-specific about the import, so it should upload to 
Savannah just fine. I can post the "marks" files, for converting between 
bzr and git commit names, if people find them useful.


As probably implied by the fact that I did this, I'm a fan of moving, both 
because git is significantly more popular and because I find the UI better 
than bzr's (although that may just be familiarity).


--
Geoffrey Thomas
gtho...@mokafive.com

[gthomas@hobgoblin grub]$ crontab -l
0 * * * * chronic /home/gthomas/src/grub/import.sh
[gthomas@hobgoblin grub]$ cat import.sh
#!/bin/sh

set -e

cd ~/src/grub/bzr
bzr up
cd ~/src/grub/git
bzr fast-export --branch=import --marks=../bzr-marks ../bzr | git fast-import 
--import-marks-if-exists=../git-marks --export-marks=../git-marks --quiet
git reset --hard
../filter.sh
git reset --hard
git push github HEAD:upstream
[gthomas@hobgoblin grub]$ cat filter.sh
#!/bin/sh

set -e

export default_ignores=$(python -c "from bzrlib import ignores; print 
\"\\n\".join(ignores.USER_DEFAULTS)")

git update-ref -m "New upstream" refs/heads/upstream import
git checkout upstream
git reset --hard

dir=$(mktemp -d --tmpdir=${XDG_RUNTIME_DIR:-/tmp} filter-branch.XX)
git filter-branch -f -d "$dir" --env-filter '
export GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-$GIT_COMMITTER_NAME}
export GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-$GIT_COMMITTER_EMAIL}
   ' --index-filter '
flag=0
if git checkout .bzrignore 2>/dev/null; then
sed "s/^\*\*\///" .bzrignore | grep -v .bzrignore > .gitignore
echo "$default_ignores" >> .gitignore
git rm -qf .bzrignore
git diff .gitignore
git add .gitignore
if git show --pretty=format: --name-only "$GIT_COMMIT" | grep -Fxq 
.bzrignore; t

Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Gregg Levine
On Mon, Jun 24, 2013 at 10:54 PM, Vladimir 'φ-coder/phcoder'
Serbinenko  wrote:
> On 24.06.2013 12:27, Mikko Rantalainen wrote:
>>
>> Bruce Dubbs, 2013-06-23 00:52 (Europe/Helsinki):
>>>
>>> Paul Menzel wrote:

 this is *not* the start of a flame war about what VCS is the best.

 Hopefully everyone will agree, that git is the most popular one in the
 FOSS world (Linux, freedesktop.org, GNOME, KDE, ...) and a lot of people
 are now familiar with the basic git commands. So using Bazaar is one
 more thing to deal with for new contributors before making a
 contribution to GRUB. (I know there is git-bzr-ng, but it is still one
 more step.)
>>>
>>>
>>> Personally, I prefer subversion, but I'm not a GRUB developer.  The
>>> choice of version control can be similar emacs/vi or Bourne Shell/C
>>> Shell, so it really should be the choice of the primary developers.
>>
>>
>> I disagree. The choice of version control means a lot more than working
>> environment of a single developer (primary developer or not) because
>> that is the medium for sharing the source code. Even Linus himself uses
>> git over patches from email, even though the latter method is not bad
>> either for a single patch.
>>
>> Once you master even a single DVCS system (e.g. Git, Mercurial, Bazaar),
>> the limitations caused by subversion or any other centralized version
>> control system start to look much greater than before.
>>
>> I'd suggest trying to apply the workflow used by git development for
>> grub, too.
>>
>> Make sure to have a mirror at github.com and if you don't want to use
>> github's issue tracker, put a big disclaimer about that in github. As
>> far as I know, you cannot disable public issue tracker in github
>> repository's settings.
>>
> Moving away from savannah is out of the question. Savannah is official place
> for GNU projects and as such we'll stay at savannah.
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

Hello!
I agree. Moving away from hosting there is not an option. But what
about the decision concerning BZR?

-
Gregg C Levine gregg.drw...@gmail.com
"This signature fought the Time Wars, time and again."

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko

On 24.06.2013 16:09, Lennart Sorensen wrote:

On Sat, Jun 22, 2013 at 04:52:04PM -0500, Bruce Dubbs wrote:

Personally, I prefer subversion, but I'm not a GRUB developer.  The
choice of version control can be similar emacs/vi or Bourne Shell/C
Shell, so it really should be the choice of the primary developers.

Using Google for 'git vs subversion' provides a lot of interesting
opinions.


I find subversion almost as annoying as bazaar to deal with.  It makes
it very hard to find what you want to find.  Like bazaar, the only way
to tolerate subversion is to use a convertor to git format.


No flame-war messages please. You can voice your support pro or contra 
based on convenience for you but please don't transform this into flame war.



___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Vladimir 'φ-coder/phcoder' Serbinenko

On 24.06.2013 12:27, Mikko Rantalainen wrote:

Bruce Dubbs, 2013-06-23 00:52 (Europe/Helsinki):

Paul Menzel wrote:

this is *not* the start of a flame war about what VCS is the best.

Hopefully everyone will agree, that git is the most popular one in the
FOSS world (Linux, freedesktop.org, GNOME, KDE, …) and a lot of people
are now familiar with the basic git commands. So using Bazaar is one
more thing to deal with for new contributors before making a
contribution to GRUB. (I know there is git-bzr-ng, but it is still one
more step.)


Personally, I prefer subversion, but I'm not a GRUB developer.  The
choice of version control can be similar emacs/vi or Bourne Shell/C
Shell, so it really should be the choice of the primary developers.


I disagree. The choice of version control means a lot more than working
environment of a single developer (primary developer or not) because
that is the medium for sharing the source code. Even Linus himself uses
git over patches from email, even though the latter method is not bad
either for a single patch.

Once you master even a single DVCS system (e.g. Git, Mercurial, Bazaar),
the limitations caused by subversion or any other centralized version
control system start to look much greater than before.

I'd suggest trying to apply the workflow used by git development for
grub, too.

Make sure to have a mirror at github.com and if you don't want to use
github's issue tracker, put a big disclaimer about that in github. As
far as I know, you cannot disable public issue tracker in github
repository's settings.

Moving away from savannah is out of the question. Savannah is official 
place for GNU projects and as such we'll stay at savannah.


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Daniel Kahn Gillmor
On 06/24/2013 06:27 AM, Mikko Rantalainen wrote:
> I'd suggest trying to apply the workflow used by git development for
> grub, too.

While i don't expect my opinion to have any particular weight (i'm
mostly a bug reporter and tester in this community) i would also be
happy to see a switch from bzr to git if the upstream devs are OK with it.

> Make sure to have a mirror at github.com and if you don't want to use
> github's issue tracker, put a big disclaimer about that in github. As
> far as I know, you cannot disable public issue tracker in github
> repository's settings.

I have to disagree with the above.  Maintaining a mirror at github.com
is not at all a requirement, and the maintenance of such a mirror is
extra work (however small).  The extra mirror can potentially create
confusion if it isn't properly maintained, as can the github issue
tracker if it isn't the canonical issue tracker.  If you consider
switching to git, please don't spend any extra cycles worrying about
github.com integration unless you have a compelling reason to do so.

--dkg



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Lennart Sorensen
On Sat, Jun 22, 2013 at 04:52:04PM -0500, Bruce Dubbs wrote:
> Personally, I prefer subversion, but I'm not a GRUB developer.  The
> choice of version control can be similar emacs/vi or Bourne Shell/C
> Shell, so it really should be the choice of the primary developers.
> 
> Using Google for 'git vs subversion' provides a lot of interesting
> opinions.

I find subversion almost as annoying as bazaar to deal with.  It makes
it very hard to find what you want to find.  Like bazaar, the only way
to tolerate subversion is to use a convertor to git format.

-- 
Len Sorensen

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: [RFC] Moving from Bazaar (bzr) to git

2013-06-24 Thread Mikko Rantalainen
Bruce Dubbs, 2013-06-23 00:52 (Europe/Helsinki):
> Paul Menzel wrote:
>> this is *not* the start of a flame war about what VCS is the best.
>>
>> Hopefully everyone will agree, that git is the most popular one in the
>> FOSS world (Linux, freedesktop.org, GNOME, KDE, …) and a lot of people
>> are now familiar with the basic git commands. So using Bazaar is one
>> more thing to deal with for new contributors before making a
>> contribution to GRUB. (I know there is git-bzr-ng, but it is still one
>> more step.)
> 
> Personally, I prefer subversion, but I'm not a GRUB developer.  The
> choice of version control can be similar emacs/vi or Bourne Shell/C
> Shell, so it really should be the choice of the primary developers.

I disagree. The choice of version control means a lot more than working
environment of a single developer (primary developer or not) because
that is the medium for sharing the source code. Even Linus himself uses
git over patches from email, even though the latter method is not bad
either for a single patch.

Once you master even a single DVCS system (e.g. Git, Mercurial, Bazaar),
the limitations caused by subversion or any other centralized version
control system start to look much greater than before.

I'd suggest trying to apply the workflow used by git development for
grub, too.

Make sure to have a mirror at github.com and if you don't want to use
github's issue tracker, put a big disclaimer about that in github. As
far as I know, you cannot disable public issue tracker in github
repository's settings.

-- 
Mikko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel