Mercurial > hg-stable
diff tests/test-convert-hg-startrev.t @ 19891:e271970b9821
convert: introduce hg.revs to replace hg.startrev and --rev with a revset
The existing knobs for controlling which revisions to convert were often
insufficient. Revsets is a shiny hammer that provides a better solution.
Revsets has been introduced in --rev handling in a lot of other places while
being more or less backwards compatible. Doing the same here would be a much
more elegant ... but that would unfortunately not work in this case. "--rev 7"
used to mean revision 0 to 7 - it would be an unacceptable change if it
suddenly just meant revision 7.
Instead we introduce a new configuration setting. It will only work for
Mercurial repositories so adding a new commandline option for it would not be a
nice solution.
There is no way to use the fancy deprecation markup for configuration settings
so we just remove the documentation of hg.startrev.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 20 Jul 2013 00:43:08 +0200 |
parents | 948df0f10ec1 |
children | aa9385f983fa |
line wrap: on
line diff
--- a/tests/test-convert-hg-startrev.t Thu Oct 03 18:01:21 2013 +0200 +++ b/tests/test-convert-hg-startrev.t Sat Jul 20 00:43:08 2013 +0200 @@ -183,3 +183,23 @@ b $ hg -q verify $ cd .. + +Convert from revset in convert.hg.revs + + $ hg convert --config convert.hg.revs='3:4+0' source revsetrepo + initializing destination revsetrepo repository + scanning source... + sorting... + converting... + 2 0: add a b f + 1 3: change a + 0 4: merge 2 and 3 + + $ glog revsetrepo + o 2 "4: merge 2 and 3" files: b c d e f + | + o 1 "3: change a" files: a + | + o 0 "0: add a b f" files: a b f + + $ cd ..