# HG changeset patch # User Greg Ward # Date 1317580468 14400 # Node ID d60568a6946505b2454c47f413f0a59293169d0b # Parent 06a1ec674ee8a34b3a95ec7c4ae46d4d1d48701f import: wrap a transaction around the whole command Now 'rollback' after 'import' is less surprising: it rolls back all of the imported changesets, not just the last one. As an extra added benefit, you don't need 'rollback -f' after 'import --bypass', which was an undesired side effect of fixing issue2998 (59e8bc22506e).. Note that this is a different take on issue963, which complained that rollback after importing multiple patches returned the working dir parent to the starting point, not to the second-last patch applied. Since we now rollback the entire import, returning the working dir to the starting point is entirely logical. So this change also undoes a732eebf1958, the fix to issue963, and updates its tests accordingly. Bottom line: rollback after import was weird before issue963, understandable since the fix for issue963, and even better now. [ original upstream message ] diff -r 06a1ec674ee8 -r d60568a69465 tests/test-keyword.t --- a/tests/test-keyword.t Wed Sep 14 15:34:32 2011 +0100 +++ b/tests/test-keyword.t Sun Oct 02 14:34:28 2011 -0400 @@ -825,7 +825,7 @@ ignore $Id$ $ hg rollback - repository tip rolled back to revision 2 (undo commit) + repository tip rolled back to revision 2 (undo import) working directory now based on revision 2 $ hg update --clean 1 files updated, 0 files merged, 0 files removed, 0 files unresolved