Hard links in a Mercurial repository

Dr Rainer Woitok rainer.woitok at gmail.com
Mon Aug 21 09:35:44 UTC 2017


Greetings,

in one of my projects I would like to use hard links  within a Mecrurial
repository.  However, plain Mercurial does not seem to support that:

  $ export HGPLAINEXCEPT= HGRCPATH=
  $ hg --version | head -1
  Mercurial Distributed SCM (version 4.3.1+5-7686cbb0ba41)
  $ cd /tmp
  $ hg init repo
  $ cd repo
  $ echo a > a 
  $ ln a b
  $ hg commit -Am.
  adding a
  adding b
  $ ls -li
  total 8
  2359341 -rw------- 2 rainer rainer 2 2017-08-21 11:18 a
  2359341 -rw------- 2 rainer rainer 2 2017-08-21 11:18 b
  $ cd ..
  $ hg clone repo clone
  updating to branch default
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ ls -li clone
  total 8
  2359378 -rw------- 1 rainer rainer 2 2017-08-21 11:18 a
  2359379 -rw------- 1 rainer rainer 2 2017-08-21 11:18 b
  $ rm -rf repo clone

Is there some Mercurial extension which provides hard link support?

Sincerely,
  Rainer


More information about the Mercurial mailing list