Lines Matching refs:repo

152 def not_check(repo, cmd):
158 # repo root), whereas the check commands get paths relative to the cwd.
165 cpath = scmutil.canonpath(repo.root, repo.getcwd(), path)
167 cpath = util.canonpath(repo.root, repo.getcwd(), path)
173 for f in [repo.join('cdm/%s.NOT' % cmd),
174 repo.wjoin('exception_lists/%s' % cmd)]:
179 ign = ignore.ignore(repo.root, ignorefiles, repo.ui.warn)
200 # Adding a reference to WorkSpace from a repo causes a circular reference
201 # repo <-> WorkSpace.
203 # This prevents repo, WorkSpace and members thereof from being garbage
208 # Instead, we hold the repo->WorkSpace association in a dictionary, breaking
214 def reposetup(ui, repo):
215 if repo.local() and repo not in wslist:
216 wslist[repo] = WorkSpace(repo)
228 def pbconfirm(ui, repo, hooktype, source):
243 def cdm_pdiffs(ui, repo, *pats, **opts):
256 diffs = wslist[repo].pdiff(pats, opts, parent=parent)
265 def cdm_list(ui, repo, **opts):
293 act = wslist[repo].active(opts['parent'])
321 def cdm_arcs(ui, repo, parent=None):
324 act = wslist[repo].active(parent)
331 def cdm_bugs(ui, repo, parent=None):
334 act = wslist[repo].active(parent)
340 def cdm_comments(ui, repo, parent=None):
342 act = wslist[repo].active(parent)
348 def cdm_renamed(ui, repo, parent=None):
358 act = wslist[repo].active(parent)
364 def cdm_comchk(ui, repo, **opts):
373 active = wslist[repo].active(opts.get('parent'))
382 def cdm_cddlchk(ui, repo, *args, **opts):
396 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
397 exclude = not_check(repo, 'cddlchk')
420 def cdm_mapfilechk(ui, repo, *args, **opts):
432 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
433 exclude = not_check(repo, 'mapfilechk')
466 def cdm_copyright(ui, repo, *args, **opts):
481 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
482 exclude = not_check(repo, 'copyright')
500 def cdm_hdrchk(ui, repo, *args, **opts):
513 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
514 exclude = not_check(repo, 'hdrchk')
534 def cdm_cstyle(ui, repo, *args, **opts):
548 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
549 exclude = not_check(repo, 'cstyle')
571 def cdm_jstyle(ui, repo, *args, **opts):
578 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
579 exclude = not_check(repo, 'jstyle')
599 def cdm_permchk(ui, repo, *args, **opts):
609 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
610 exclude = not_check(repo, 'permchk')
635 def cdm_tagchk(ui, repo, **opts):
644 active = wslist[repo].active(opts.get('parent'))
649 tfile = wslist[repo].filepath('.hgtags')
665 def cdm_branchchk(ui, repo, **opts):
675 heads = set(repo.heads())
676 parents = set([x.node() for x in wslist[repo].workingctx().parents()])
686 for head in [repo.changectx(head) for head in heads]:
694 if repo.dirstate.branch() != 'default':
701 (repo.dirstate.branch()))
704 branches = repo.branchtags().keys()
722 def cdm_rtichk(ui, repo, **opts):
734 if opts.get('nocheck') or os.path.exists(repo.join('cdm/rtichk.NOT')):
742 parent = wslist[repo].parent(opts.get('parent'))
743 active = wslist[repo].active(parent)
758 def cdm_keywords(ui, repo, *args, **opts):
768 filelist = buildfilelist(wslist[repo], opts.get('parent'), args)
769 exclude = not_check(repo, 'keywords')
792 def cdm_outchk(ui, repo, **opts):
797 st = wslist[repo].modified()
806 def cdm_mergechk(ui, repo, **opts):
809 active = wslist[repo].active(opts.get('parent'))
838 result = cmd(ws.ui, ws.repo, honour_nots=True, *args, **opts)
848 def cdm_nits(ui, repo, *args, **opts):
878 return run_checks(wslist[repo], cmds, *args, **opts)
881 def cdm_pbchk(ui, repo, **opts):
929 return run_checks(wslist[repo], cmds, **opts)
932 def cdm_recommit(ui, repo, **opts):
961 ws = wslist[repo]
963 if not os.getcwd().startswith(repo.root):
968 wlock = repo.wlock()
969 lock = repo.lock()
973 between = repo.changelog.nodesbetween(ws.findoutgoing(parent))[2]
974 heads = set(between) & set(repo.heads())
978 for head in sorted(map(repo.changelog.rev, heads), reverse=True):
1003 os.path.exists(repo.wjoin(f.parentname))]
1027 bk = CdmBackup(ui, ws, backup_name(repo.root))
1032 oldtags = repo.tags()
1033 clearedtags = [(name, nd, repo.changelog.rev(nd), local)
1048 for ntag, nnode in sorted(repo.tags().items(),
1053 (ntag, repo.changelog.rev(nnode),
1074 def cdm_eval(ui, repo, *command, **opts):
1093 act = wslist[repo].active(opts['parent'])
1097 do_eval(cmd, files, repo.root, not opts['remain'])
1100 def cdm_apply(ui, repo, *command, **opts):
1110 act = wslist[repo].active(opts['parent'])
1120 do_eval(cmd, files, repo.root, not opts['remain'])
1122 def cdm_reparent_11(ui, repo, parent):
1123 filename = repo.join('hgrc')
1144 def cdm_reparent_13(ui, repo, parent):
1146 # In 1.9 (changeset d764463b433e in the mercurial repo), atomictempfile()
1155 fp = repo.opener('hgrc', 'a', atomictemp=True)
1166 fp = repo.opener('hgrc', 'a', atomictemp=True)
1225 if not os.path.exists(repo.join('hgrc')):
1230 cfg.read(repo.join('hgrc'))
1239 if path != repo.join('hgrc'):
1240 raise util.Abort("Cannot edit path specification not in repo hgrc\n"
1288 def cdm_backup(ui, repo, if_newer=False):
1315 name = backup_name(repo.root)
1316 bk = CdmBackup(ui, wslist[repo], name)
1318 wlock = repo.wlock()
1319 lock = repo.lock()
1331 def cdm_restore(ui, repo, backup, **opts):
1347 if not os.getcwd().startswith(repo.root):
1350 abort_if_dirty(wslist[repo])
1360 wlock = repo.wlock()
1361 lock = repo.lock()
1364 bk = CdmBackup(ui, wslist[repo], backup)
1371 def cdm_webrev(ui, repo, **opts):