tests/test-revset.t
changeset 33336 4672db164c98
parent 33286 2428e8ec0793
child 33377 5d63e5f40bea
equal deleted inserted replaced
33335:72f051f9a7d8 33336:4672db164c98
  4257   $ hg debugrevspec "custom1()"
  4257   $ hg debugrevspec "custom1()"
  4258   *** failed to import extension custompredicate from $TESTTMP/custompredicate.py: intentional failure of loading extension
  4258   *** failed to import extension custompredicate from $TESTTMP/custompredicate.py: intentional failure of loading extension
  4259   hg: parse error: unknown identifier: custom1
  4259   hg: parse error: unknown identifier: custom1
  4260   [255]
  4260   [255]
  4261 
  4261 
       
  4262 Test repo.anyrevs with customized revset overrides
       
  4263 
       
  4264   $ cat > $TESTTMP/printprevset.py <<EOF
       
  4265   > from mercurial import encoding
       
  4266   > def reposetup(ui, repo):
       
  4267   >     alias = {}
       
  4268   >     p = encoding.environ.get('P')
       
  4269   >     if p:
       
  4270   >         alias['P'] = p
       
  4271   >     revs = repo.anyrevs(['P'], user=True, localalias=alias)
       
  4272   >     ui.write('P=%r' % list(revs))
       
  4273   > EOF
       
  4274 
       
  4275   $ cat >> .hg/hgrc <<EOF
       
  4276   > custompredicate = !
       
  4277   > printprevset = $TESTTMP/printprevset.py
       
  4278   > EOF
       
  4279 
       
  4280   $ hg --config revsetalias.P=1 log -r . -T '\n'
       
  4281   P=[1]
       
  4282   $ P=3 hg --config revsetalias.P=2 log -r . -T '\n'
       
  4283   P=[3]
       
  4284 
  4262   $ cd ..
  4285   $ cd ..