diff tests/test-glog.t @ 25765:5e1b0739611c

revset: use integer representation of wdir() in revset This is the simplest way to handle wdir() revision in revset. None didn't work well because revset heavily depends on integer operations such as min(), max(), sorted(), x:y, etc. One downside is that we cannot do "wctx.rev() in set" because wctx.rev() is still None. We could wrap the result set by wdirproxyset that translates None to wdirrev, but it seems overengineered at this point. result = getset(repo, subset, tree) if 'wdir' in funcsused(tree): result = wdirproxyset(result) Test cases need the '(all() + wdir()) &' hack because we have yet to fix the bootstrapping issue of null and wdir.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 16 Mar 2015 16:17:06 +0900
parents c76e8d14383a
children 8117e2cd959e
line wrap: on
line diff
--- a/tests/test-glog.t	Sat Aug 16 13:25:45 2014 +0900
+++ b/tests/test-glog.t	Mon Mar 16 16:17:06 2015 +0900
@@ -2392,4 +2392,12 @@
      summary:     add a
   
 
+working-directory revision
+
+  $ hg log -G -qr '. + wdir()'
+  o  2147483647:ffffffffffff
+  |
+  @  3:5918b8d165d1
+  |
+
   $ cd ..