weird "du" sizes when cloning a local repo

Robert P. J. Day rpjday at crashcourse.ca
Tue Oct 6 10:14:21 CDT 2009


  (aside:  i'm just getting into mercurial and am working my way thru
the book, so i'm hoping this is the right place to ask relatively
newbie-level questions, and be corrected on my abuse of terminology.)

  on p. 15 of the o'sullivan book, there's a simple example of cloning
the demonstration "hello" checkout, after which i wanted to verify
that the two checkouts were approximately the same in terms of space
usage:

$ hg clone hello my-hello
updating working directory
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
[rpjday at localhost test]$ du -s *
76	hello
40	my-hello
$

  ok, that strikes me as strange ... why would the clone take up so
much less space?  let's examine further:

$ cd my-hello
$ ls -a
.  ..  hello.c  .hg  Makefile
$ du -s .hg
56	.hg
$

  now i'm just baffled.  how could the entire "my-hello" directory be
listed as taking 40K, when the .hg directory along is displayed as
taking 56?  this is probably a "du" issue, not really mercurial, but
i'm just confused by the above.

  what *should* the comparative sizes be?  i would have thought
identical, or nearly so.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================


More information about the Mercurial mailing list