Disallow merging of unrelated projects
authormpm@selenic.com
Tue, 28 Jun 2005 10:42:02 -0800
changeset 511 9f67222186bd
parent 510 7f3fc8fd427e
child 512 78896f572a22
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-----
mercurial/hg.py
--- a/mercurial/hg.py	Tue Jun 28 03:08:47 2005 -0800
+++ b/mercurial/hg.py	Tue Jun 28 10:42:02 2005 -0800
@@ -917,6 +917,9 @@
             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")