# HG changeset patch # User Brendan Cully # Date 2009-04-26 21:20:41 # Node ID 2660e7002413d5d58e2488945a4e6c08f4bfca69 # Parent c8cb471fc9c23ce63ff512128701599a3b80fb8f transplant: forbid transplant to nonempty repositories with no working directory. Partially undoes d3fb413667e5. diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -528,6 +528,8 @@ def transplant(ui, repo, *revs, **opts): 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'))