[Geany-devel] geany on github; why not?

Jiří Techet techet at xxxxx
Mon Sep 5 21:05:15 UTC 2011


On Wed, Aug 31, 2011 at 18:41, Colomban Wendling
<lists.ban at herbesfolles.org> wrote:
> Le 31/08/2011 18:18, Frank Lanitz a écrit :
>> Am 31.08.2011 17:21, schrieb Colomban Wendling:
>>> 3) We won't probably be able to create Git tags from the SVN tags
>>> because they (at least Geany-0_18 do) don't all tag a single commit
>>> (e.g. it's a branch)
>>
>> Can you go into more detail which are not working? IIRC we only had one
>> or two of tag/branches issues within the releases.
>
> $ git log --graph --decorate --pretty=oneline --abbrev-commit
> remotes/tags/Geany-0_18
>
> *   8c84d70 (tags/Geany-0_18) Tag the 0.18 release.
> |\
> | * d6ec2f3 Fix opening of local files in the browser on Windows.
> * | 6df16fe Tag the 0.18 release.
> |/
> * cb9c34f Add missing include path to fix 'make distcheck'.
>
> Hum, actually it looks like it's my bad since it simply looks like a
> re-tagging, so the forked history isn't interesting.  So maybe tags
> aren't a problem -- which would be cool :)
>

Hi,

I've finally had some time to experiment a bit more with the svn->git
conversion and I'm quite satisfied with the result. This is what I
did:

1. Used svn2git for the conversion. I used the authors file with
entries Colomban found and ran

svn2git https://geany.svn.sourceforge.net/svnroot/geany --authors
./authors.txt --metadata

I used the --metadata parameter so the original SVN revision gets
recorded into the git commit comment. I found this useful because some
commit entries refer to SVN commit number and it wouldn't be clear
which commit it was without this information. The resulting repository
is here:

https://gitorious.org/geany-svn2git/geany-svn2git

There are a few problems with the import. First, tags are in separate
mini-branches like

http://dl.dropbox.com/u/2554438/1.png

and some (but not all) branches are not merged:

http://dl.dropbox.com/u/2554438/2.png

I tried to address these issues in the following steps.


2. I created file named grafts under .git/info in the project's
directory. To correct the mini-branches, I changed parents of
individual commits. These are the lines in the grafts file that
correct the mini-branches of tags:

deed5dbc6e0af7bc5e7ddb774bb70438b5bb0463
0a1305bcfbff3323256d01068aca7dffd409183f
dd93684f9107fa4ec70b5aa4eaf576fc7a5512f6
f2a189ea49917b046fea454ff34cffb2a1e7aad0
5ebc0a946f6e7b240ad62f9105bc2b92c577f621
2440f909eb293010043bbcfbf40351524539a72a
ec68e76a2cfd0f779d9fa3b9d1c0b63703bd4fdb
b532fed1cffd4fc120490261bce7a20a657eb06d
f8e36105279aa9ec41abf1a2f3c3d1d370523ce8
b3ccfe1c32119bf2e111823305f1a49ee7215507
366724520ab3f1ee54978f4eac2524859fbf8567
14cacf9f9b73a2eeaeb26cc5c5d4d722efff9992
811eaab72831e3041df22f04463712beebeb8bd9
88becfe38d73130caa944592b5082e219c554a8b
1b8dd6c8f0220384be44397a508ac5aa0190a80a
c0b1035cbb72d4f664a9fc42690d89e42f46abb7
850f1c1711a956f6a7c8c83332ee35d3033d4514
18b4e590235912a0a9390b5edcef08465e1457fc
6eb88a4a04591bd558c45052a7eb37f8bec8c09e
9113a9eb882b963375d1fc498ad916ad6a264fca
1e61eb481ed35d5bb850f04657ee789b226525e9
9ea6b3b1c3e463a46af0cfdbf68269c8326f9356
6bc8aee98c28e349d862d7c47d9251507aa0c80d
39ff8bc39822e30e7c992979e60c12ae337b7a49
091cb63d5b69195f0002c11ea165667b8f4d4b16
5fc1d82f8b6f983755979e1ad6e018703fe4bc3a
b9a233a0e5d6ae23eb5c98dd6d11f7e681891225
6b04d0f873b4395e8323cb1b761149d5cc2abb79
b8e0d52196a8ef49c8af65bbba786fcf0396aac3
f0ca43729bb26b333eba66ae196748a587aef07c
d872050b45eb0983ed1c0bbd1f74d12cc42781d2
9681a8ad259310b2dff453b4fe92fcbd9c1e73c8
43be67bfd601a97810883a17ff3ffe2dd7837ae8
ef90d0c96ec09d10a04db1ed554b1a36e0b3f09b
f0ca43729bb26b333eba66ae196748a587aef07c
c0c1f36bb5be85d6b17762a61008f9a453b1aa86

The result looks this way:

http://dl.dropbox.com/u/2554438/3.png


3. I tried to add all the merges information that wasn't performed
automatically. It was quite easy - I found all commits with "merge" in
their name and they usually specified what branch was merged. Then I
set the parents accordingly in the grafts file:

1882805f70d86561f644c45a5d06172a02335ec7
a0c12ca379bd44e4929d041a1786bfee4a948b31
3a2d26742529ecbd6db47faf1ace1a3f3e19ae93
5f4a5775e2d1bbf1cd6015865a45c38b736b62c2
336b35bfcb3996b5cc9d2f0765dc6d2d3564cd00
6b6edbee734e8cb2860f3688ce79b9ef7d84007b
11f8bf94032160756cc92bd620126c91ee4407b7
a564ed802cda2075b475c37646ace8f604f6a78d
89cf69f5a5e67c094efed6ed74a039e1d851bb51
9eef0db54c3a1bdb15bafbfc9889f2c5f3c21763
dfc78a1a9cd7ee7871a2ad095fd4bcf5ec025a72
df3574e118ea49e15a6e8ff5c33384ea318765d5
08da5856b9f313e64dc2e0b43f08a9dba3936d26
75480426f3e577a3fd72fc4e7885228762068be8
4957f1ea34390a1e590841f22507711adf748382
406d18fe52905154cebdb7864f4c547a156ded72
91284b54fcf60f7f0538ef15a2b80a5d1b5195e6
eee74e4778c960e09fa9a7e5b9003c8da5e8fc6b
573e2f900b407f688b6316ae16cd5908696c8e23
9004b4a5db527ae92a3916121b5481c302d7df7b
cea76d14ee1bb0ca0aff4f5a1f5332e4a584b10c
26d7edb2b117c8c4bebb99911e0a1fd561bd961b
34bffb9033bc243ca5e2e1862ca8d503c1193b26
e367ddba15c739afa269efb255b7ea56743835a4
428cc39ac6bbe604c6b136dfa0b7d78abdec58d2
3961ab135b1abcf41d6696fc90df498948688bb1
8c8e7719c9f3c9cea25502b83b55b184b082fe18
3700de22acbdbc07b9bfb38a1dddca47fc2660c4
60499d0e6734ae3180b467e05783f7073783908e
e2ba33460b650a42b05f585f837b31d15a5fa954
5ce982ef8670e56d1b629e13636c3838fc0f3275
0502d623d5491dbfdecc8d70bb49b0c298c6254a
d0a9a46de0de1055a834065ce935f8dc6ce17f15
d0a9a46de0de1055a834065ce935f8dc6ce17f15
6121972ffb902aa0d5a827b227b053ef7cd0046a
0502d623d5491dbfdecc8d70bb49b0c298c6254a
36e86bb5ea463d92a6c3e0ea5b574a66da88fe2b
a61ae4171a6acb805707f3252f8bf407483e0ec4
9004b4a5db527ae92a3916121b5481c302d7df7b
3009a89e6c54ddb49050d6990f57e3ae225d80b5
75c475a61e619dfbefd88eeae3127822909b4865
53da5105b0ecac985adc194827b9a265da3f72b0
1d9691739008e0ac7c76bbf57f58168efd6bbebb
bc47d18e9eac03b9d67979881e40b4511ca4ad21
46f5d0cb5555856babf287d025d26a7935816c3a
eee74e4778c960e09fa9a7e5b9003c8da5e8fc6b
a829af17967ab2e076d2f14cf1c255fca3c756bf
91284b54fcf60f7f0538ef15a2b80a5d1b5195e6
7aa9387a36a5fc853c42db3246888726cf6d9397
d3881d43460b82759c49bbdb64ec9e2703049fa9
9ffdd9d8d3816e0ff1f406b741cd9c2a73d45990

The result looks this way:

http://dl.dropbox.com/u/2554438/4.png

I didn't do this for the bs2 and sm branches which IMO shouldn't be a
part of geany's main repository but rather in people's personal
branches.

4. I removed all "svn" mentions from the .git directory - all the
branches were set as remote tracking branches of the svn repository
but as Geany is not going to use svn any more, this is not necessary.


5. I deleted refs to all merged branches. All the branches created
during geany's existence were present and active so "git branch"
output something like this:

  0.20.1
  Geany-0_19_1
  Geany-0_19_2
  bs2
  build-system
  custom-filetypes
  custom-tab-width
  document-pointer
  dynamic-editor-menu
  editor-struct
  eht16
  geany-0.10.1
  geany-0.10.2
  geany-0.18.1
  gnu-regex
* master
  plugin-keybindings
  reorder-filetypes
  sm
  split-window-plugin
  symbol-tree
  unstable
  workspace-sockets

But many of the merged branches aren't active any more (they were
created just to implement a single feature) so I removed refs to the
following branches:

  build-system
  custom-filetypes
  custom-tab-width
  document-pointer
  editor-struct
  gnu-regex
  plugin-keybindings
  reorder-filetypes
  split-window-plugin
  symbol-tree
  workspace-sockets

The result looks this way:

http://dl.dropbox.com/u/2554438/5.png


6. I made some minor cleanup. There were things like this:

http://dl.dropbox.com/u/2554438/6.png
http://dl.dropbox.com/u/2554438/7.png

The first is a strange mini-branch created by cvs import and as it
didn't contain any useful commits, I've removed it (if the "start" tag
is wanted, the "Initial revision" commit can be tagged directly).
Similarly, the second seems to be a tag created by mistake so I have
removed it as well.


7. Then I ran

git filter-branch --tag-name-filter cat -- --all

(I've googled this out). This takes the grafts file into account and
rewrites the whole history so the grafts file isn't needed any more.
This has to be done because the grafts file is local only and
therefore not clonable. The command however keeps some backup of the
old parents (without grafts applied) so it's necessary to clone the
resulting repository to get rid of them. I've also removed
"remotes/origin" from the branches under .git/packed-refs, otherwise
the branches don't get uploaded to the repository.


8. Finally, set the origin repository to my personal clone and uploaded it with

git push --all origin
git push --tags origin

The resulting repository is here:

https://gitorious.org/geany-rewrite-history


Now it's time for your comments - please have a look at the repository
and tell me what more needs to be changed (especially check all the
branches and merges, I'm not very much familiar with geany's history).
I have a few comments (and questions) myself:

1. Some branch names should be renamed (e.g. Geany-0_19_1) because
they have the same name as tags and they are ambiguous when doing "git
checkout". Some naming scheme for stable branches should be invented.

2. There are some strange places in the history like this:

http://dl.dropbox.com/u/2554438/8.png

The commit says "create branch" but it appears the branch is actually
merged. Moreover, the merged branch appears not to contain any commit.
There are more examples like this in the history. Any idea what may
have caused this? Should the empty branches be deleted from the
history or kept as they are?

3. I haven't found a merge point for the "dynamic-editor-menu" branch.
Has it been merged to trunk?

4. The "unstable" branch is a bit specific in that it has been
created/merged/removed several times. The svn import however doesn't
reflect the branch's removal after merge so in the history it appears
to be continuous (and then there are commits like "create unstable
branch" even though the branch already exists). I don't know the
history well enough to be sure when the branch can be deleted so I
left it continuous. I think it doesn't matter much, just mentioning it
for completeness.

5. I kept the bs2 and sm branches in the repository  but once the
migration is done, they should be cloned by their owners and should be
removed from the main repository.


End of the long email finally! I tried to record all what needs to be
done so nothing is forgotten once the real migration takes place
because some of the stuff took some time to discover.

Cheers,

Jiri



More information about the Devel mailing list