You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2019/04/25 19:08:09 UTC

Re: [OT] Finally getting around to switching to Git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Igal,

On 4/25/19 14:42, Igal Sapir wrote:
> On 4/25/2019 11:30 AM, Coty Sutherland wrote:
>> If you clone a single branch with no references such as `git
>> clone apache/tomcat -b master --single-branch` then you get just
>> the references/history for the master branch which results in
>> about a 70M .git directory.
> 
> So one needs to consider whether that added layer of complexity is
> worth the savings of 30M disk space, even when multiplied over 3
> branches. Imagine the reclaimed space after deleting the local SVN
> directories ;)

For Tomcat 8.5.x @ r1852558:

$ du -hs .svn/
 41M	.svn/

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzCBZkACgkQHPApP6U8
pFh/1g//aKPqBxa5PV6G1D17+LdnivuxF5BjfJgpz/DpvlAFiK0OP/osob4Yklbx
JXwF0kt6LWHI5jNBYPtlGRw77gourRAh85kxudwwBcebIqQ0Kqg8MV8BEgcZrPU5
CRp0P+LkbqRnXRyinpwY6c4pWoPnufh6F4jdadkmhssZFnKOZa45+vadMhwTSDsq
FrrtE5DhVhWFo1o4ee5HbRn71Q4lmDGXGS6QiEpb6Q2fRNrqn8+tYNNx5+sy/whk
piyX1df0XZvt/6mHtfkZfrhJPcLG1vZ0t5lmWvqZIZUftxpJikgGBBQVSVSQPcYU
HhR3ylD26fT0gianEivqK0JMheCw5jNYcz0UlqtjuQSQFajG/cUbK63hA3o7h9ls
bJU+gUy+3s+ewZxQUZVnvzWK4n7Zm9W+GqVR30Eiin5PtaCqd2qX08FqJjCk3h2D
ISkLJ3aymDmJ96zLgRGe3KSvSOl27Niv+NVrFyxxvymnzEgG6TmJaqZmYsbHud/k
kiXBGuvw6o1KB47RybyZdx6sloBTZfbIgzBkilLXcJKpHMJy+kwTltJeI1Z8tWCT
e4l13ikL7Oma2MBIQnOxUImmL2Q0oX5dwMY/ojnFWTAdBlPhLOi9kQ/TOTnuXDEK
AQh42hKrtK8gst/CEYwk7/2IhjbA6DB3E0EszBBYlehh972Xaz0=
=4QWj
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [OT] Finally getting around to switching to Git

Posted by Igal Sapir <is...@apache.org>.
Chris,

On 4/29/2019 12:18 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Igal,
>
> On 4/29/19 14:52, Igal Sapir wrote:
>> Chris,
>>
>> On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz <
>> chris@christopherschultz.net> wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>>>
>>> Igal,
>>>
>>> On 4/25/19 14:42, Igal Sapir wrote:
>>>> On 4/25/2019 11:30 AM, Coty Sutherland wrote:
>>>>> If you clone a single branch with no references such as `git
>>>>> clone apache/tomcat -b master --single-branch` then you get
>>>>> just the references/history for the master branch which
>>>>> results in about a 70M .git directory.
>>>> So one needs to consider whether that added layer of complexity
>>>> is worth the savings of 30M disk space, even when multiplied
>>>> over 3 branches. Imagine the reclaimed space after deleting the
>>>> local SVN directories ;)
>>> For Tomcat 8.5.x @ r1852558:
>>>
>>> $ du -hs .svn/ 41M    .svn/
>> Are you sure that you have the whole history there?  I am working
>> ATM on my Ubuntu workstation where I have a copy of the Tomcat 8.5
>> SVN.  The disk usage is mostly in the tags directory and not in the
>> .svn:
>>
>> ux@u18:/workspace/src/tc8.5.x$ du -sh tags 1.2G    tags
>> ux@u18:/workspace/src/tc8.5.x$ du -sh .svn 231M    .svn
>> ux@u18:/workspace/src/tc8.5.x$ du -sh . 1.5G    .
> Oh, heavens no. Checking-out the root of a project in svn is almost
> never a good idea. I've literally never checked-out /svn/[project]. I
> always check-out /svn/[project]/trunk or /svn/[project]/tags/[branch].
> Never even in private repositories, for the same reason: there is no
> reason ever to grab every tag and branch ever onto your own disk.
>
> Subversion is efficient on the server-side, but the client is dumb and
> will happily duplicate everything.
>
>> Each "tag" takes about 35MB:
>>
>> ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25 35M
>> tags/TOMCAT_8_5_25 ux@u18:/workspace/src/tc8.5.x$ du -sh
>> tags/TOMCAT_8_5_24 35M    tags/TOMCAT_8_5_24
>> ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23 34M
>> tags/TOMCAT_8_5_23
> Yeah, you should never have grabbed those. It was a waste of time and
> disk space (and back-up time and disk space).

And now I know ;)  I was actually banned from the apache.org network at 
some point because downloading the whole Tomcat SVN repo used too many 
requests per day.

But this was exactly my point when comparing SVN to Git.  Your Git 
repository of 80MB includes all of the history with all of the branches 
and tags, so it's tiny compared to the gigabytes that SVN uses (1.5GB 
for only tc8.5).

We are using Lightweight Tags [1] in Git so they barely take any disk space.

Igal

[1] https://git-scm.com/book/en/v2/Git-Basics-Tagging#_lightweight_tags



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [OT] Finally getting around to switching to Git

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Igal,

On 4/29/19 14:52, Igal Sapir wrote:
> Chris,
> 
> On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz < 
> chris@christopherschultz.net> wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> 
>> Igal,
>> 
>> On 4/25/19 14:42, Igal Sapir wrote:
>>> On 4/25/2019 11:30 AM, Coty Sutherland wrote:
>>>> If you clone a single branch with no references such as `git 
>>>> clone apache/tomcat -b master --single-branch` then you get
>>>> just the references/history for the master branch which
>>>> results in about a 70M .git directory.
>>> 
>>> So one needs to consider whether that added layer of complexity
>>> is worth the savings of 30M disk space, even when multiplied
>>> over 3 branches. Imagine the reclaimed space after deleting the
>>> local SVN directories ;)
>> 
>> For Tomcat 8.5.x @ r1852558:
>> 
>> $ du -hs .svn/ 41M    .svn/
>> 
>> 
> Are you sure that you have the whole history there?  I am working
> ATM on my Ubuntu workstation where I have a copy of the Tomcat 8.5
> SVN.  The disk usage is mostly in the tags directory and not in the
> .svn:
> 
> ux@u18:/workspace/src/tc8.5.x$ du -sh tags 1.2G    tags 
> ux@u18:/workspace/src/tc8.5.x$ du -sh .svn 231M    .svn 
> ux@u18:/workspace/src/tc8.5.x$ du -sh . 1.5G    .

Oh, heavens no. Checking-out the root of a project in svn is almost
never a good idea. I've literally never checked-out /svn/[project]. I
always check-out /svn/[project]/trunk or /svn/[project]/tags/[branch].
Never even in private repositories, for the same reason: there is no
reason ever to grab every tag and branch ever onto your own disk.

Subversion is efficient on the server-side, but the client is dumb and
will happily duplicate everything.

> Each "tag" takes about 35MB:
> 
> ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25 35M
> tags/TOMCAT_8_5_25 ux@u18:/workspace/src/tc8.5.x$ du -sh
> tags/TOMCAT_8_5_24 35M    tags/TOMCAT_8_5_24 
> ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23 34M
> tags/TOMCAT_8_5_23

Yeah, you should never have grabbed those. It was a waste of time and
disk space (and back-up time and disk space).

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlzHTgUACgkQHPApP6U8
pFgVBQ/9EyhUJFtunEWLsZLZvhmny0r4N0tnp961cQtsek3/uH3DBPakfVgW9JrA
8YcTuPVN0vpkjwFLukQ1xwDGhuUe02oQtcVbjrqQBCUsyLcOQbxXqisis28lMl+M
upAX8MB1BJuZSF6CCoSKZWmazC5JcFBdeTHKAXt5JloovgUNUWHF3TrH9jc78MoG
RCfIx+eZXwer+A6ERxofnVlorsZz7VQY6mMCPLGwMiS5X6u2/9MmkH84gYxwVbHu
FjJfItc8ddcGrZ+KXmkARmWD3dXExl/hpWRNo/Y+LLoIfb2Dsf55vsnyAWgfMmPV
mES7KqE8Y7W+tII19DoHJBi4zxXVwI4szk9MH0rdBcg22AuNPxDPG4kVefxbNtta
kmjH6HbaNP+J23+0rRFj1RnS77xzR4iIy1HJu0r5OQFqkqmEKcViD6ObvYUb7lWZ
WOkRLfLR7Sua1AQO1Y6muiw3EGvQ0Fr1gnGmyWwp8JzG8piHJnd3QZPU3BKmnNv3
raO1TUJ71knhD2mKS5C8yeMyDFDd0+dviUN0b75Nf+CUsc9sT4T9XTgejmCC13lJ
qFTathGwlMqsVdnpuAgtaaEvLGxJYfYYnyXT4uByF36yMNAMJN2q7k4j6wSJUEkA
YKc3Fg+I7DBeExqNYDbPHSwU2mD6NGScqvwmmfMXB+1qYHh7ZnU=
=Mimb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [OT] Finally getting around to switching to Git

Posted by Igal Sapir <ig...@lucee.org>.
Chris,

On Thu, Apr 25, 2019 at 12:08 PM Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Igal,
>
> On 4/25/19 14:42, Igal Sapir wrote:
> > On 4/25/2019 11:30 AM, Coty Sutherland wrote:
> >> If you clone a single branch with no references such as `git
> >> clone apache/tomcat -b master --single-branch` then you get just
> >> the references/history for the master branch which results in
> >> about a 70M .git directory.
> >
> > So one needs to consider whether that added layer of complexity is
> > worth the savings of 30M disk space, even when multiplied over 3
> > branches. Imagine the reclaimed space after deleting the local SVN
> > directories ;)
>
> For Tomcat 8.5.x @ r1852558:
>
> $ du -hs .svn/
>  41M    .svn/
>
>
Are you sure that you have the whole history there?  I am working ATM on my
Ubuntu workstation where I have a copy of the Tomcat 8.5 SVN.  The disk
usage is mostly in the tags directory and not in the .svn:

ux@u18:/workspace/src/tc8.5.x$ du -sh tags
1.2G    tags
ux@u18:/workspace/src/tc8.5.x$ du -sh .svn
231M    .svn
ux@u18:/workspace/src/tc8.5.x$ du -sh .
1.5G    .

Each "tag" takes about 35MB:

ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_25
35M    tags/TOMCAT_8_5_25
ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_24
35M    tags/TOMCAT_8_5_24
ux@u18:/workspace/src/tc8.5.x$ du -sh tags/TOMCAT_8_5_23
34M    tags/TOMCAT_8_5_23


Igal

Re: [OT] Finally getting around to switching to Git

Posted by Igal Sapir <is...@apache.org>.
Chris,

On 4/25/2019 12:08 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Igal,
>
> On 4/25/19 14:42, Igal Sapir wrote:
>> On 4/25/2019 11:30 AM, Coty Sutherland wrote:
>>> If you clone a single branch with no references such as `git
>>> clone apache/tomcat -b master --single-branch` then you get just
>>> the references/history for the master branch which results in
>>> about a 70M .git directory.
>> So one needs to consider whether that added layer of complexity is
>> worth the savings of 30M disk space, even when multiplied over 3
>> branches. Imagine the reclaimed space after deleting the local SVN
>> directories ;)
> For Tomcat 8.5.x @ r1852558:
>
> $ du -hs .svn/
>   41M	.svn/

Interesting.  Maybe the tomcat-site SVN repo threw me off.  I didn't 
bother to look at the breakdown of the project and the site:

     E:\Workspace\svn\tomcat\tomcat
     > du -sh .
     85M

     E:\Workspace\svn\tomcat\tomcat
     > cd ../site

     E:\Workspace\svn\tomcat\site
     > du -sh .
     1.4G

Anyway, good to know.  Thanks,

Igal



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org