mercurial/commands.py
changeset 4868 192cd95c2ba8
parent 4863 6dc0094c0827
parent 4835 9858477ed74c
child 4879 da8640113b5a
equal deleted inserted replaced
4867:8be7ba425621 4868:192cd95c2ba8
   546         if ui.verbose or not exact:
   546         if ui.verbose or not exact:
   547             ui.status(_('copying %s to %s\n') % (relsrc, reltarget))
   547             ui.status(_('copying %s to %s\n') % (relsrc, reltarget))
   548         targets[abstarget] = abssrc
   548         targets[abstarget] = abssrc
   549         if abstarget != origsrc:
   549         if abstarget != origsrc:
   550             if repo.dirstate.state(origsrc) == 'a':
   550             if repo.dirstate.state(origsrc) == 'a':
   551                 ui.warn(_("%s was marked for addition. "
   551                 if not ui.quiet:
   552                           "%s will not be committed as a copy.\n")
   552                     ui.warn(_("%s has not been committed yet, so no copy "
   553                         % (repo.pathto(origsrc, cwd), reltarget))
   553                               "data will be stored for %s.\n")
       
   554                             % (repo.pathto(origsrc, cwd), reltarget))
   554                 if abstarget not in repo.dirstate and not opts.get('dry_run'):
   555                 if abstarget not in repo.dirstate and not opts.get('dry_run'):
   555                     repo.add([abstarget], wlock)
   556                     repo.add([abstarget], wlock)
   556             elif not opts.get('dry_run'):
   557             elif not opts.get('dry_run'):
   557                 repo.copy(origsrc, abstarget, wlock)
   558                 repo.copy(origsrc, abstarget, wlock)
   558         copied.append((abssrc, relsrc, exact))
   559         copied.append((abssrc, relsrc, exact))
  2469     optlist = ("name templates style address port ipv6"
  2470     optlist = ("name templates style address port ipv6"
  2470                " accesslog errorlog webdir_conf certificate")
  2471                " accesslog errorlog webdir_conf certificate")
  2471     for o in optlist.split():
  2472     for o in optlist.split():
  2472         if opts[o]:
  2473         if opts[o]:
  2473             parentui.setconfig("web", o, str(opts[o]))
  2474             parentui.setconfig("web", o, str(opts[o]))
       
  2475             if repo.ui != parentui:
       
  2476                 repo.ui.setconfig("web", o, str(opts[o]))
  2474 
  2477 
  2475     if repo is None and not ui.config("web", "webdir_conf"):
  2478     if repo is None and not ui.config("web", "webdir_conf"):
  2476         raise hg.RepoError(_("There is no Mercurial repository here"
  2479         raise hg.RepoError(_("There is no Mercurial repository here"
  2477                              " (.hg not found)"))
  2480                              " (.hg not found)"))
  2478 
  2481