--- a/hgext/evolve.py Wed Sep 19 17:30:07 2012 +0200
+++ b/hgext/evolve.py Wed Sep 19 15:28:35 2012 +0200
@@ -1115,11 +1115,14 @@
try:
rebase = extensions.find('rebase')
if rebase:
- extensions.wrapcommand(rebase.cmdtable, "rebase", cmdrebase)
- entry = extensions.wrapcommand(rebase.cmdtable, 'rebase', warnobserrors)
- extensions.wrapfunction(rebase, 'buildstate', buildstate)
- extensions.wrapfunction(rebase, 'defineparents', defineparents)
- extensions.wrapfunction(rebase, 'concludenode', concludenode)
+ incore = getattr(rebase, 'obsolete', None) is not None
+ if not incore:
+ extensions.wrapcommand(rebase.cmdtable, "rebase", cmdrebase)
+ extensions.wrapcommand(rebase.cmdtable, 'rebase', warnobserrors)
+ if not incore:
+ extensions.wrapfunction(rebase, 'buildstate', buildstate)
+ extensions.wrapfunction(rebase, 'defineparents', defineparents)
+ extensions.wrapfunction(rebase, 'concludenode', concludenode)
except KeyError:
pass # rebase not found
--- a/tests/test-obsolete-rebase.t Wed Sep 19 17:30:07 2012 +0200
+++ b/tests/test-obsolete-rebase.t Wed Sep 19 15:28:35 2012 +0200
@@ -286,26 +286,25 @@
$ hg ci -m 'babar is not dead'
$ echo '[ui]' >> .hg/hgrc
$ echo 'logtemplate={rev} {node|short} {desc|firstline}\n' >> .hg/hgrc
- $ hg pull --rebase --traceback
+ $ hg pull --rebase --traceback | grep -v 'saved'
pulling from $TESTTMP/repo
searching for changes
adding changesets
adding manifests
adding file changes
added 5 changesets with 5 changes to 5 files (+4 heads)
- saved backup bundle to $TESTTMP/other/.hg/strip-backup/2a6c62a1b55d-backup.hg
$ hg glog
- @ 7 d5567dbec794 babar is not dead
+ @ [78] d5567dbec794 babar is not dead (re)
|
- o 6 1951ead97108 appendab
+ o [67] 1951ead97108 appendab (re)
|
- o 5 03f165c84ea8 addd
+ o [56] 03f165c84ea8 addd (re)
|
- | o 4 a7773ffa7edc Collapsed revision
+ | o [45] a7773ffa7edc Collapsed revision (re)
|/
- | o 3 9c5494949763 adde
+ | o [34] 9c5494949763 adde (re)
|/
- | o 2 102a90ea7b4a addb
+ | o [23] 102a90ea7b4a addb (re)
| |
o | 1 540395c44225 changea
|/
--- a/tests/test-obsolete.t Wed Sep 19 17:30:07 2012 +0200
+++ b/tests/test-obsolete.t Wed Sep 19 15:28:35 2012 +0200
@@ -457,16 +457,16 @@
check rebase compat
- $ hg log -G -r 'not extinct()' --template='{rev} - {node|short}\n'
- o 8 - 159dfc9fa5d3
+ $ hg log -G --template='{rev} - {node|short} {desc}\n'
+ o 8 - 159dfc9fa5d3 add obsol_d''
|
- | o 4 - 725c380fe99b
+ | o 4 - 725c380fe99b add obsol_c'
| |
- x | 3 - 0d3f46688ccc
+ x | 3 - 0d3f46688ccc add obsol_c
|/
- o 1 - 7c3bad9141dc
+ o 1 - 7c3bad9141dc add b
|
- o 0 - 1f0dee641bb7
+ o 0 - 1f0dee641bb7 add a
$ hg log -G --template='{rev} - {node|short}\n' --hidden
@@ -493,22 +493,21 @@
should not rebase extinct changeset
- $ hg rebase -s 7 -d 4
- whole rebase set is extinct and ignored.
+#excluded 'whole rebase set is extinct and ignored.' message not in core
+ $ hg rebase -s 7 -d 4 2>&1 | grep -v 'whole rebase'
nothing to rebase
- [1]
- $ hg rebase -b 3 -d 4 --traceback
+ $ hg rebase -b '3' -d 4 --traceback
2 new conflicting changesets
- $ hg log -G -r 'not extinct()' --template='{rev} - {node|short}\n'
- @ 11 - 9468a5f5d8b2
+ $ hg log -G --template='{rev} - {node|short} {desc}\n'
+ @ 11 - 9468a5f5d8b2 add obsol_d''
|
- o 10 - 2033b4e49474
+ o 10 - 2033b4e49474 add obsol_c
|
- o 4 - 725c380fe99b
+ o 4 - 725c380fe99b add obsol_c'
|
- o 1 - 7c3bad9141dc
+ o 1 - 7c3bad9141dc add b
|
- o 0 - 1f0dee641bb7
+ o 0 - 1f0dee641bb7 add a
Does not complain about new head if you obsolete the old one