hgext/evolve.py
branchstable
changeset 1104 cb36a4eb0157
parent 1101 8cac667a0d7d
child 1106 6b0cf1b73693
--- a/hgext/evolve.py	Sun Aug 24 01:02:18 2014 +0530
+++ b/hgext/evolve.py	Tue Aug 12 19:09:53 2014 -0400
@@ -22,7 +22,7 @@
 testedwith = '3.0.1 3.1'
 buglink = 'http://bz.selenic.com/'
 
-import sys
+import sys, os
 import random
 from StringIO import StringIO
 import struct
@@ -69,6 +69,7 @@
 from mercurial import localrepo
 from mercurial.hgweb import hgweb_mod
 from mercurial import bundle2
+from mercurial import util
 
 cmdtable = {}
 command = cmdutil.command(cmdtable)
@@ -503,8 +504,13 @@
         ui.setconfig('alias', 'odiff',
             "diff --hidden --rev 'limit(precursors(.),1)' --rev .")
     if ui.config('alias', 'grab', None) is None:
-        ui.setconfig('alias', 'grab',
-            "! $HG rebase --dest . --rev $@ && $HG up tip")
+        if os.name == 'nt':
+            ui.setconfig('alias', 'grab',
+                "! " + util.hgexecutable() + " rebase --dest . --rev  && "
+                 + util.hgexecutable() + " up tip")
+        else:
+            ui.setconfig('alias', 'grab',
+                "! $HG rebase --dest . --rev $@ && $HG up tip")
 
 
 ### Troubled revset symbol