Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 29427:33a6b750b5b9
debug: make debug{revlog,index,data} --dir not just a flag
The directory argument (for tree manifests) should belong to to the
--dir argument. I had mistakenly made --dir a flag. One effect of this
was that I had meant for "-m" to be optional, but instead it changed
the behavior of --dir, so with "hg debugdata -m --dir dir1 0", the -m
took over and the "dir1" got treated as a revision in the root
manifest log.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 24 Jun 2016 11:12:41 -0700 |
parents | 844f72885fb9 |
children | 1b38cfde9530 |
comparison
equal
deleted
inserted
replaced
29426:26ac04a39e11 | 29427:33a6b750b5b9 |
---|---|
530 msg = None | 530 msg = None |
531 if cl and mf: | 531 if cl and mf: |
532 msg = _('cannot specify --changelog and --manifest at the same time') | 532 msg = _('cannot specify --changelog and --manifest at the same time') |
533 elif cl and dir: | 533 elif cl and dir: |
534 msg = _('cannot specify --changelog and --dir at the same time') | 534 msg = _('cannot specify --changelog and --dir at the same time') |
535 elif cl or mf: | 535 elif cl or mf or dir: |
536 if file_: | 536 if file_: |
537 msg = _('cannot specify filename with --changelog or --manifest') | 537 msg = _('cannot specify filename with --changelog or --manifest') |
538 elif not repo: | 538 elif not repo: |
539 msg = _('cannot specify --changelog or --manifest or --dir ' | 539 msg = _('cannot specify --changelog or --manifest or --dir ' |
540 'without a repository') | 540 'without a repository') |
547 r = repo.unfiltered().changelog | 547 r = repo.unfiltered().changelog |
548 elif dir: | 548 elif dir: |
549 if 'treemanifest' not in repo.requirements: | 549 if 'treemanifest' not in repo.requirements: |
550 raise error.Abort(_("--dir can only be used on repos with " | 550 raise error.Abort(_("--dir can only be used on repos with " |
551 "treemanifest enabled")) | 551 "treemanifest enabled")) |
552 dirlog = repo.dirlog(file_) | 552 dirlog = repo.dirlog(dir) |
553 if len(dirlog): | 553 if len(dirlog): |
554 r = dirlog | 554 r = dirlog |
555 elif mf: | 555 elif mf: |
556 r = repo.manifest | 556 r = repo.manifest |
557 elif file_: | 557 elif file_: |