what exactly means the message: abort: repository is unrelated

Adrian Buehlmann adrian at cadifra.com
Wed Apr 23 18:41:53 CDT 2008


Hoi Peter

a hg compatriot :-)

On 24.04.2008 08:51, Peter wrote:
> hi
> I get this message when I try to propagate the changes from one working 
> directory to another. For example, I would lile to keep in sync my home 
> directories on two different machines (keeping in sync does not mean 
> blind rsync in this case).
> When I try to pull the repository from machine1 in the rep on machine2 
> then I get the message "repository is unrelated"
> While I understand the message (in fact they are not related, other that 
> they contain fles that I consider to be related) I do not really 
> understand what is the point I am missing. And what exactly is the 
> definition for "related" (or untrelated)

A repository contains chained changesets [1], linked together
in a parent/child relationship (a tree).

If you try to pull changesets from repo A to repo B
and repo B doesn't have the *root* changeset of the tree
of changesets found in A but missing in B, then Mercurial will abort
with that warning.

Simple example:

repo A:  CA1 -> CA2 -> CA3

repo B:  CB1 -> CB2 -> CB3 -> CB4

If you try to pull from A to B then root changeset CA1 would have
to be added to B, which is most likely an error, as these repos
are unrelated.

So if Mercurial would have to add a new root when transferring, it
aborts with "repository unrelated".

Greetings from Aarau

Adrian

[1] http://www.selenic.com/mercurial/wiki/index.cgi/ChangeSet


More information about the Mercurial mailing list