rebase: rename and test '_destrebase'
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 15 Oct 2015 01:56:03 +0100
changeset 26719 8bed1eae99df
parent 26718 806ca3a37858
child 26720 6c22a17faa18
rebase: rename and test '_destrebase' We make the name consistent with the other similar revsets and make sure it has minimal tests.
hgext/rebase.py
tests/test-rebase-scenario-global.t
--- a/hgext/rebase.py	Thu Oct 15 01:51:53 2015 +0100
+++ b/hgext/rebase.py	Thu Oct 15 01:56:03 2015 +0100
@@ -69,7 +69,7 @@
     branch = repo[None].branch()
     return repo[branch].rev()
 
-def _rebasedefaultdest(repo, subset, x):
+def _revsetdestrebase(repo, subset, x):
     # ``_rebasedefaultdest()``
 
     # default destination for rebase.
@@ -1222,4 +1222,4 @@
          _("use 'hg rebase --continue' or 'hg rebase --abort'")])
     # ensure rebased rev are not hidden
     extensions.wrapfunction(repoview, '_getdynamicblockers', _rebasedvisible)
-    revset.symbols['_rebasedefaultdest'] = _rebasedefaultdest
+    revset.symbols['_destrebase'] = _revsetdestrebase
--- a/tests/test-rebase-scenario-global.t	Thu Oct 15 01:51:53 2015 +0100
+++ b/tests/test-rebase-scenario-global.t	Thu Oct 15 01:56:03 2015 +0100
@@ -743,3 +743,14 @@
   rebasing 2:779a07b1b7a0 "first source commit"
   rebasing 3:a7d6f3a00bf3 "second source with subdir" (tip)
   saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob)
+
+Test experimental revset
+
+  $ cd ..
+  $ hg log -r '_destrebase()'
+  changeset:   3:1910d5ff34ea
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     second source with subdir
+