PATCH: warn if their is no revision to clone.

Create issue
Issue #54 invalid
Former user created an issue


thanks for this great hg extension. It is really usefull. How do I contribute to it? Here is a patch that would have saved me 1 or 2 hours digging in the source to find why their was nothing that was cloned.

check that we have some revision to clone. Otherwise, print a warning with a possible explaination: their is no trunk, tags and branches subdirectory in the specified url. This mean we can't clone a partial svn repository.

diff -r 91db8fc049b0 svnwrap/
--- a/svnwrap/ Tue Feb 24 14:30:21 2009 -0600
+++ b/svnwrap/ Wed Feb 25 11:47:07 2009 -0500
@@ -253,6 +253,7 @@
# start=start)
# this does the same thing, but at the repo root + filtering. It's # kind of tough cookies, sadly.
+ have_yielded = False
for r in self.fetch_history_at_paths([''], start=start,
should_yield = False
@@ -266,8 +267,12 @@
i += 1
if should_yield:
yield r
+ have_yielded = True

  • if not have_yielded:
  • print "Warning: We didn't found any revision to fetch! The path you try to clone should includ the subdirectory trunk, tags and branches. This mean you can't clone a partial svn repository."

  •  def fetch_history_at_paths(self, paths, start=None, stop=None,
         revisions = []

Comments (1)

  1. Augie Fackler repo owner

    Sorry, but your patch got horribly mangled when you pasted it here. Could you try submitting it via a a fork or mq on bitbucket or by patchbombing the google group?


  2. Log in to comment