Mercurial > evolve
comparison hgext/evolve.py @ 1635:91ba7e0daff6
alias: report evolve as origin for aliases
author | timeless@gmail.com |
---|---|
date | Fri, 08 Apr 2016 18:45:45 +0000 |
parents | 9ae4e79a28f3 |
children | 13f830540a14 |
comparison
equal
deleted
inserted
replaced
1634:9ae4e79a28f3 | 1635:91ba7e0daff6 |
---|---|
395 # If no capabilities are specified, enable everything. | 395 # If no capabilities are specified, enable everything. |
396 # This is so existing evolve users don't need to change their config. | 396 # This is so existing evolve users don't need to change their config. |
397 evolveopts = ui.configlist('experimental', 'evolution') | 397 evolveopts = ui.configlist('experimental', 'evolution') |
398 if not evolveopts: | 398 if not evolveopts: |
399 evolveopts = ['all'] | 399 evolveopts = ['all'] |
400 ui.setconfig('experimental', 'evolution', evolveopts) | 400 ui.setconfig('experimental', 'evolution', evolveopts, 'evolve') |
401 | 401 |
402 @eh.uisetup | 402 @eh.uisetup |
403 def _configurecmdoptions(ui): | 403 def _configurecmdoptions(ui): |
404 # Unregister evolve commands if the command capability is not specified. | 404 # Unregister evolve commands if the command capability is not specified. |
405 # | 405 # |
465 ### Useful alias | 465 ### Useful alias |
466 | 466 |
467 @eh.uisetup | 467 @eh.uisetup |
468 def _installalias(ui): | 468 def _installalias(ui): |
469 if ui.config('alias', 'pstatus', None) is None: | 469 if ui.config('alias', 'pstatus', None) is None: |
470 ui.setconfig('alias', 'pstatus', 'status --rev .^') | 470 ui.setconfig('alias', 'pstatus', 'status --rev .^', 'evolve') |
471 if ui.config('alias', 'pdiff', None) is None: | 471 if ui.config('alias', 'pdiff', None) is None: |
472 ui.setconfig('alias', 'pdiff', 'diff --rev .^') | 472 ui.setconfig('alias', 'pdiff', 'diff --rev .^', 'evolve') |
473 if ui.config('alias', 'olog', None) is None: | 473 if ui.config('alias', 'olog', None) is None: |
474 ui.setconfig('alias', 'olog', "log -r 'precursors(.)' --hidden") | 474 ui.setconfig('alias', 'olog', "log -r 'precursors(.)' --hidden", |
475 'evolve') | |
475 if ui.config('alias', 'odiff', None) is None: | 476 if ui.config('alias', 'odiff', None) is None: |
476 ui.setconfig('alias', 'odiff', | 477 ui.setconfig('alias', 'odiff', |
477 "diff --hidden --rev 'limit(precursors(.),1)' --rev .") | 478 "diff --hidden --rev 'limit(precursors(.),1)' --rev .", |
479 'evolve') | |
478 if ui.config('alias', 'grab', None) is None: | 480 if ui.config('alias', 'grab', None) is None: |
479 if os.name == 'nt': | 481 if os.name == 'nt': |
480 ui.setconfig('alias', 'grab', | 482 ui.setconfig('alias', 'grab', |
481 "! " + util.hgexecutable() + " rebase --dest . --rev $@ && " | 483 "! " + util.hgexecutable() + " rebase --dest . --rev $@ && " |
482 + util.hgexecutable() + " up tip") | 484 + util.hgexecutable() + " up tip", |
485 'evolve') | |
483 else: | 486 else: |
484 ui.setconfig('alias', 'grab', | 487 ui.setconfig('alias', 'grab', |
485 "! $HG rebase --dest . --rev $@ && $HG up tip") | 488 "! $HG rebase --dest . --rev $@ && $HG up tip", |
489 'evolve') | |
486 | 490 |
487 | 491 |
488 ### Troubled revset symbol | 492 ### Troubled revset symbol |
489 | 493 |
490 @eh.revset('troubled') | 494 @eh.revset('troubled') |