diff tests/test-grab.t @ 3527:7b4d1bfb6b7d

grab: gracefully handle the case when we try to grab parent of wdir Before this patch, we go all the way down to obsmarker creation logic and gets an error saying that changeset cannot obsolete itself. We should be more smart here and error out early saying we cannot grab that changeset.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 13 Mar 2018 20:44:51 +0530
parents df20ddc79064
children d5adce52cef4 d7034826c0a2
line wrap: on
line diff
--- a/tests/test-grab.t	Sat Mar 03 23:31:46 2018 +0530
+++ b/tests/test-grab.t	Tue Mar 13 20:44:51 2018 +0530
@@ -47,6 +47,12 @@
   abort: cannot grab an ancestor revision
   [255]
 
+Grabbing the working directory parent
+
+  $ hg grab -r .
+  abort: cannot grab an ancestor revision
+  [255]
+
 Specifying multiple revisions to grab
 
   $ hg grab 1f0dee641bb7 -r 7c3bad9141dc