Index: /mergebot/trunk/mergebot/RebranchActor.py
===================================================================
--- /mergebot/trunk/mergebot/RebranchActor.py	(revision 29)
+++ /mergebot/trunk/mergebot/RebranchActor.py	(revision 30)
@@ -88,7 +88,4 @@
                 "Rebranch internal error: Unable to recreate the branch.  %s" \
                     % (instructioncomment, )),
-            (lambda x: SvnOps.checkout(self.branch_local_url(), workingcopy, x),
-                "Rebranch internal error: Unable to get working copy.  %s" % \
-                    (instructioncomment, )),
         )
         for cmd, error_comment in commanderrors:
@@ -99,4 +96,27 @@
                 results['mergebotstate'] = 'rebranchfailed'
                 return results, error_comment, False
+
+        # Check to see if there have been no commits on the branch.  If there
+        # have been no commits, we know we don't need to merge anything.
+        if startrev == endrev:
+            ticket_message = "\n".join([
+                "Rebranched from %s for %s." % (self.version,
+                                                self.requestor),
+                "There were no changes to commit to the branch since there "
+                    "were no commits on the branch.",
+                "You will need to update your working copy.",
+            ])
+            results['mergebotstate'] = 'branched'
+            return results, ticket_message, True
+
+        retval = SvnOps.checkout(self.branch_local_url(), workingcopy, logfile)
+        if retval:
+            error_comment = \
+                "Rebranch internal error: Unable to get working copy.  " + \
+                instructioncomment
+            if os.path.exists(workingcopy):
+                shutil.rmtree(workingcopy)
+            results['mergebotstate'] = 'rebranchfailed'
+            return results, error_comment, False
 
         # On success, we're in the same state as if we had just branched.
