# HG changeset patch # User Pierre-Yves David # Date 2015-10-15 00:56:03 # Node ID 8bed1eae99df802086c81611f77ccd3cfb5eef3f # Parent 806ca3a37858c395a5f8921b110efc83f05b1cfb rebase: rename and test '_destrebase' We make the name consistent with the other similar revsets and make sure it has minimal tests. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -69,7 +69,7 @@ def _destrebase(repo): 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 @@ def uisetup(ui): _("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 diff --git a/tests/test-rebase-scenario-global.t b/tests/test-rebase-scenario-global.t --- a/tests/test-rebase-scenario-global.t +++ b/tests/test-rebase-scenario-global.t @@ -743,3 +743,14 @@ Test that rebase is not confused by $CWD 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 +