[PATCH] hypothesis: handle "repository is unrelated" errors

David R. MacIver david at drmaciver.com
Fri Feb 26 17:25:07 UTC 2016


# HG changeset patch
# User David R. MacIver <david at drmaciver.com>
# Date 1456507454 0
#      Fri Feb 26 17:24:14 2016 +0000
# Node ID 9dc48c7b1f25c697cfdb84afc8d9a4304496be46
# Parent  9a28035d39f02fc7e03d0d376ce66998628a6877
hypothesis: handle "repository is unrelated" errors

These can validly occur if the source repository has had its history
entirely rewritten and thus there are no longer any commits in
common.

diff -r 9a28035d39f0 -r 9dc48c7b1f25 tests/test-verify-repo-operations.py
--- a/tests/test-verify-repo-operations.py	Fri Feb 26 17:15:49 2016 +0000
+++ b/tests/test-verify-repo-operations.py	Fri Feb 26 17:24:14 2016 +0000
@@ -433,7 +433,10 @@
 
     @rule()
     def pull(self, repo=repos):
-        with acceptableerrors("repository default not found"):
+        with acceptableerrors(
+            "repository default not found",
+            "repository is unrelated",
+        ):
             self.hg("pull")
 
     @rule(newbranch=st.booleans())


More information about the Mercurial-devel mailing list