changeset 8176:2660e7002413

transplant: forbid transplant to nonempty repositories with no working directory. Partially undoes d3fb413667e5.
author Brendan Cully <brendan@kublai.com>
date Sun, 26 Apr 2009 14:20:41 -0700
parents c8cb471fc9c2
children 7b861e5167d0
files hgext/transplant.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Sun Apr 26 13:36:08 2009 -0700
+++ b/hgext/transplant.py	Sun Apr 26 14:20:41 2009 -0700
@@ -528,6 +528,8 @@
     tp = transplanter(ui, repo)
 
     p1, p2 = repo.dirstate.parents()
+    if len(repo) > 0 and p1 == revlog.nullid:
+        raise util.Abort(_('no revision checked out'))
     if not opts.get('continue'):
         if p2 != revlog.nullid:
             raise util.Abort(_('outstanding uncommitted merges'))