1899 numdeltas)) |
1899 numdeltas)) |
1900 |
1900 |
1901 @command('debugrevspec', |
1901 @command('debugrevspec', |
1902 [('', 'optimize', None, |
1902 [('', 'optimize', None, |
1903 _('print parsed tree after optimizing (DEPRECATED)')), |
1903 _('print parsed tree after optimizing (DEPRECATED)')), |
|
1904 ('', 'show-revs', True, _('print list of result revisions (default)')), |
1904 ('s', 'show-set', None, _('print internal representation of result set')), |
1905 ('s', 'show-set', None, _('print internal representation of result set')), |
1905 ('p', 'show-stage', [], |
1906 ('p', 'show-stage', [], |
1906 _('print parsed tree at the given stage'), _('NAME')), |
1907 _('print parsed tree at the given stage'), _('NAME')), |
1907 ('', 'no-optimized', False, _('evaluate tree without optimization')), |
1908 ('', 'no-optimized', False, _('evaluate tree without optimization')), |
1908 ('', 'verify-optimized', False, _('verify optimized result')), |
1909 ('', 'verify-optimized', False, _('verify optimized result')), |
1911 def debugrevspec(ui, repo, expr, **opts): |
1912 def debugrevspec(ui, repo, expr, **opts): |
1912 """parse and apply a revision specification |
1913 """parse and apply a revision specification |
1913 |
1914 |
1914 Use -p/--show-stage option to print the parsed tree at the given stages. |
1915 Use -p/--show-stage option to print the parsed tree at the given stages. |
1915 Use -p all to print tree at every stage. |
1916 Use -p all to print tree at every stage. |
|
1917 |
|
1918 Use --no-show-revs option with -s or -p to print only the set |
|
1919 representation or the parsed tree respectively. |
1916 |
1920 |
1917 Use --verify-optimized to compare the optimized result with the unoptimized |
1921 Use --verify-optimized to compare the optimized result with the unoptimized |
1918 one. Returns 1 if the optimized result differs. |
1922 one. Returns 1 if the optimized result differs. |
1919 """ |
1923 """ |
1920 stages = [ |
1924 stages = [ |
1987 |
1991 |
1988 func = revset.makematcher(tree) |
1992 func = revset.makematcher(tree) |
1989 revs = func(repo) |
1993 revs = func(repo) |
1990 if opts['show_set'] or (opts['show_set'] is None and ui.verbose): |
1994 if opts['show_set'] or (opts['show_set'] is None and ui.verbose): |
1991 ui.write(("* set:\n"), smartset.prettyformat(revs), "\n") |
1995 ui.write(("* set:\n"), smartset.prettyformat(revs), "\n") |
|
1996 if not opts['show_revs']: |
|
1997 return |
1992 for c in revs: |
1998 for c in revs: |
1993 ui.write("%s\n" % c) |
1999 ui.write("%s\n" % c) |
1994 |
2000 |
1995 @command('debugsetparents', [], _('REV1 [REV2]')) |
2001 @command('debugsetparents', [], _('REV1 [REV2]')) |
1996 def debugsetparents(ui, repo, rev1, rev2=None): |
2002 def debugsetparents(ui, repo, rev1, rev2=None): |