##// END OF EJS Templates
py3: use r'' to prevent the addition of b'' by transformer...
Pulkit Goyal -
r33101:b257aaa0 default
parent child Browse files
Show More
@@ -326,7 +326,7 b' def _debugbundle2(ui, gen, all=None, **o'
326 if not isinstance(gen, bundle2.unbundle20):
326 if not isinstance(gen, bundle2.unbundle20):
327 raise error.Abort(_('not a bundle2 file'))
327 raise error.Abort(_('not a bundle2 file'))
328 ui.write(('Stream params: %s\n' % repr(gen.params)))
328 ui.write(('Stream params: %s\n' % repr(gen.params)))
329 parttypes = opts.get('part_type', [])
329 parttypes = opts.get(r'part_type', [])
330 for part in gen.iterparts():
330 for part in gen.iterparts():
331 if parttypes and part.type not in parttypes:
331 if parttypes and part.type not in parttypes:
332 continue
332 continue
@@ -393,7 +393,7 b' def debugcheckstate(ui, repo):'
393 def debugcolor(ui, repo, **opts):
393 def debugcolor(ui, repo, **opts):
394 """show available color, effects or style"""
394 """show available color, effects or style"""
395 ui.write(('color mode: %s\n') % ui._colormode)
395 ui.write(('color mode: %s\n') % ui._colormode)
396 if opts.get('style'):
396 if opts.get(r'style'):
397 return _debugdisplaystyle(ui)
397 return _debugdisplaystyle(ui)
398 else:
398 else:
399 return _debugdisplaycolor(ui)
399 return _debugdisplaycolor(ui)
@@ -461,8 +461,8 b' def debugdag(ui, repo, file_=None, *revs'
461
461
462 Otherwise, the changelog DAG of the current repo is emitted.
462 Otherwise, the changelog DAG of the current repo is emitted.
463 """
463 """
464 spaces = opts.get('spaces')
464 spaces = opts.get(r'spaces')
465 dots = opts.get('dots')
465 dots = opts.get(r'dots')
466 if file_:
466 if file_:
467 rlog = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False),
467 rlog = revlog.revlog(vfsmod.vfs(pycompat.getcwd(), audit=False),
468 file_)
468 file_)
@@ -475,8 +475,8 b' def debugdag(ui, repo, file_=None, *revs'
475 yield 'l', (r, "r%i" % r)
475 yield 'l', (r, "r%i" % r)
476 elif repo:
476 elif repo:
477 cl = repo.changelog
477 cl = repo.changelog
478 tags = opts.get('tags')
478 tags = opts.get(r'tags')
479 branches = opts.get('branches')
479 branches = opts.get(r'branches')
480 if tags:
480 if tags:
481 labels = {}
481 labels = {}
482 for l, n in repo.tags().items():
482 for l, n in repo.tags().items():
@@ -531,7 +531,7 b' def debugdata(ui, repo, file_, rev=None,'
531 norepo=True, optionalrepo=True)
531 norepo=True, optionalrepo=True)
532 def debugdate(ui, date, range=None, **opts):
532 def debugdate(ui, date, range=None, **opts):
533 """parse and display a date"""
533 """parse and display a date"""
534 if opts["extended"]:
534 if opts[r"extended"]:
535 d = util.parsedate(date, util.extendeddateformats)
535 d = util.parsedate(date, util.extendeddateformats)
536 else:
536 else:
537 d = util.parsedate(date)
537 d = util.parsedate(date)
@@ -650,8 +650,8 b' def debugdeltachain(ui, repo, file_=None'
650 def debugstate(ui, repo, **opts):
650 def debugstate(ui, repo, **opts):
651 """show the contents of the current dirstate"""
651 """show the contents of the current dirstate"""
652
652
653 nodates = opts.get('nodates')
653 nodates = opts.get(r'nodates')
654 datesort = opts.get('datesort')
654 datesort = opts.get(r'datesort')
655
655
656 timestr = ""
656 timestr = ""
657 if datesort:
657 if datesort:
@@ -792,7 +792,7 b' def debugextensions(ui, **opts):'
792 _('[-r REV] FILESPEC'))
792 _('[-r REV] FILESPEC'))
793 def debugfileset(ui, repo, expr, **opts):
793 def debugfileset(ui, repo, expr, **opts):
794 '''parse and apply a fileset specification'''
794 '''parse and apply a fileset specification'''
795 ctx = scmutil.revsingle(repo, opts.get('rev'), None)
795 ctx = scmutil.revsingle(repo, opts.get(r'rev'), None)
796 if ui.verbose:
796 if ui.verbose:
797 tree = fileset.parse(expr)
797 tree = fileset.parse(expr)
798 ui.note(fileset.prettyformat(tree), "\n")
798 ui.note(fileset.prettyformat(tree), "\n")
@@ -833,11 +833,11 b' def debuggetbundle(ui, repopath, bundlep'
833 raise error.Abort("getbundle() not supported by target repository")
833 raise error.Abort("getbundle() not supported by target repository")
834 args = {}
834 args = {}
835 if common:
835 if common:
836 args['common'] = [bin(s) for s in common]
836 args[r'common'] = [bin(s) for s in common]
837 if head:
837 if head:
838 args['heads'] = [bin(s) for s in head]
838 args[r'heads'] = [bin(s) for s in head]
839 # TODO: get desired bundlecaps from command line.
839 # TODO: get desired bundlecaps from command line.
840 args['bundlecaps'] = None
840 args[r'bundlecaps'] = None
841 bundle = repo.getbundle('debug', **args)
841 bundle = repo.getbundle('debug', **args)
842
842
843 bundletype = opts.get('type', 'bzip2').lower()
843 bundletype = opts.get('type', 'bzip2').lower()
@@ -1176,11 +1176,11 b' def debuglocks(ui, repo, **opts):'
1176
1176
1177 """
1177 """
1178
1178
1179 if opts.get('force_lock'):
1179 if opts.get(r'force_lock'):
1180 repo.svfs.unlink('lock')
1180 repo.svfs.unlink('lock')
1181 if opts.get('force_wlock'):
1181 if opts.get(r'force_wlock'):
1182 repo.vfs.unlink('wlock')
1182 repo.vfs.unlink('wlock')
1183 if opts.get('force_lock') or opts.get('force_lock'):
1183 if opts.get(r'force_lock') or opts.get(r'force_lock'):
1184 return 0
1184 return 0
1185
1185
1186 now = time.time()
1186 now = time.time()
@@ -1485,7 +1485,7 b' def debugpathcomplete(ui, repo, *specs, '
1485 if fixpaths:
1485 if fixpaths:
1486 spec = spec.replace(pycompat.ossep, '/')
1486 spec = spec.replace(pycompat.ossep, '/')
1487 speclen = len(spec)
1487 speclen = len(spec)
1488 fullpaths = opts['full']
1488 fullpaths = opts[r'full']
1489 files, dirs = set(), set()
1489 files, dirs = set(), set()
1490 adddir, addfile = dirs.add, files.add
1490 adddir, addfile = dirs.add, files.add
1491 for f, st in dirstate.iteritems():
1491 for f, st in dirstate.iteritems():
@@ -1503,11 +1503,11 b' def debugpathcomplete(ui, repo, *specs, '
1503 return files, dirs
1503 return files, dirs
1504
1504
1505 acceptable = ''
1505 acceptable = ''
1506 if opts['normal']:
1506 if opts[r'normal']:
1507 acceptable += 'nm'
1507 acceptable += 'nm'
1508 if opts['added']:
1508 if opts[r'added']:
1509 acceptable += 'a'
1509 acceptable += 'a'
1510 if opts['removed']:
1510 if opts[r'removed']:
1511 acceptable += 'r'
1511 acceptable += 'r'
1512 cwd = repo.getcwd()
1512 cwd = repo.getcwd()
1513 if not specs:
1513 if not specs:
@@ -1671,7 +1671,7 b' def debugrebuilddirstate(ui, repo, rev, '
1671 dirstate = repo.dirstate
1671 dirstate = repo.dirstate
1672 changedfiles = None
1672 changedfiles = None
1673 # See command doc for what minimal does.
1673 # See command doc for what minimal does.
1674 if opts.get('minimal'):
1674 if opts.get(r'minimal'):
1675 manifestfiles = set(ctx.manifest().keys())
1675 manifestfiles = set(ctx.manifest().keys())
1676 dirstatefiles = set(dirstate)
1676 dirstatefiles = set(dirstate)
1677 manifestonly = manifestfiles - dirstatefiles
1677 manifestonly = manifestfiles - dirstatefiles
@@ -2134,14 +2134,14 b' def debugtemplate(ui, repo, tmpl, **opts'
2134 Use --verbose to print the parsed tree.
2134 Use --verbose to print the parsed tree.
2135 """
2135 """
2136 revs = None
2136 revs = None
2137 if opts['rev']:
2137 if opts[r'rev']:
2138 if repo is None:
2138 if repo is None:
2139 raise error.RepoError(_('there is no Mercurial repository here '
2139 raise error.RepoError(_('there is no Mercurial repository here '
2140 '(.hg not found)'))
2140 '(.hg not found)'))
2141 revs = scmutil.revrange(repo, opts['rev'])
2141 revs = scmutil.revrange(repo, opts[r'rev'])
2142
2142
2143 props = {}
2143 props = {}
2144 for d in opts['define']:
2144 for d in opts[r'define']:
2145 try:
2145 try:
2146 k, v = (e.strip() for e in d.split('=', 1))
2146 k, v = (e.strip() for e in d.split('=', 1))
2147 if not k or k == 'ui':
2147 if not k or k == 'ui':
General Comments 0
You need to be logged in to leave comments. Login now