# HG changeset patch # User mpm@selenic.com # Date 1119984122 28800 # Node ID 9f67222186bd8f2fed8b30afb405f203ef57edad # Parent 7f3fc8fd427ea05971988a285beb2370ddb41294 Disallow merging of unrelated projects -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Disallow merging of unrelated projects manifest hash: 40badbca64e1ccfd83fee8cd7bf5099f57b6f8bf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwZn6ywK+sNU5EO8RAmdeAJ9TAaGSe0nGMdL+Du3AGwm9x28IUgCgpfGG UunOBkobMVLGdHegnOvQkmQ= =VwVi -----END PGP SIGNATURE----- diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -917,6 +917,9 @@ class localrepository: if f in m: raise RepoError("already have changeset " + short(f[:4])) + if fetch == [nullid]: + raise RepoError("unrelated repository") + self.ui.note("adding new changesets starting at " + " ".join([short(f) for f in fetch]) + "\n")