comparison tests/test-revset.t @ 20613:10433163bf57

revset: add 'only' revset Adds a only() revset that has two forms: only(<set>) is equivalent to "::<set> - ::(heads() - heads(<set>::))" only(<include>,<exclude>) is equivalent to "::<include> - ::<exclude>" On a large repo, this implementation can process/traverse 50,000 revs in 0.7 seconds, versus 4.2 seconds using "::<include> - ::<exclude>". This is useful for performing histedits on your branch: hg histedit -r 'first(only(.))' Or lifting branch foo off of branch bar: hg rebase -d @ -s 'only(foo, bar)' Or a variety of other uses.
author Durham Goode <durham@fb.com>
date Sat, 16 Nov 2013 08:57:08 -0800
parents 2efd608473fb
children da3124178fbb
comparison
equal deleted inserted replaced
20612:60c308b932eb 20613:10433163bf57
365 6 365 6
366 $ log 'modifies("set:modified()")' 366 $ log 'modifies("set:modified()")'
367 4 367 4
368 $ log 'id(5)' 368 $ log 'id(5)'
369 2 369 2
370 $ log 'only(9)'
371 8
372 9
373 $ log 'only(8)'
374 8
375 $ log 'only(9, 5)'
376 2
377 4
378 8
379 9
380 $ log 'only(7 + 9, 5 + 2)'
381 4
382 6
383 7
384 8
385 9
370 $ log 'outgoing()' 386 $ log 'outgoing()'
371 8 387 8
372 9 388 9
373 $ log 'outgoing("../remote1")' 389 $ log 'outgoing("../remote1")'
374 8 390 8