Multiple Changesets Without Ancestors
Matt Mackall
mpm at selenic.com
Sun May 10 14:19:29 UTC 2015
On Sun, 2015-05-10 at 15:21 +0200, Lasse Kliemann wrote:
> Adrian Buehlmann <adrian at cadifra.com> writes:
>
> > On 2015-05-10 12:18, Lasse Kliemann wrote:
> >> After some stress-testing (automated change of files, commit, pull,
> >> push, merge, ...) my test repos shows a couple of changesets that have
> >> no ancestors (parent is -1).
>
> > This can happen, for example, if you do a 'pull -f' from a unrelated
> > repository. See "hg help pull".
>
> I never used the '-f' option for pull (I used -f for push, but that
> should be a different story). So this is not likely to explain
> it. Thanks for your comment still, I didn't know there was -f availble
> for pull before.
The other possibility is to commit with no checkout. For instance:
hg init
echo a > a
hg ci -m "root one"
hg up null # go to the null checkout
echo b > b
hg ci -m "root two"
The null checkout typically is used on servers to save space, sort of
like git's "bare repo". It also serves as a common ancestor of all
changes.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list