568 self._repo.vfs.write(b'hgrc', util.tonativeeol(b''.join(lines))) |
568 self._repo.vfs.write(b'hgrc', util.tonativeeol(b''.join(lines))) |
569 |
569 |
570 @annotatesubrepoerror |
570 @annotatesubrepoerror |
571 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
571 def add(self, ui, match, prefix, uipathfn, explicitonly, **opts): |
572 return cmdutil.add( |
572 return cmdutil.add( |
573 ui, self._repo, match, prefix, uipathfn, explicitonly, **opts |
573 ui, |
|
574 self._repo, |
|
575 match, |
|
576 prefix, |
|
577 uipathfn, |
|
578 explicitonly, |
|
579 **opts, |
574 ) |
580 ) |
575 |
581 |
576 @annotatesubrepoerror |
582 @annotatesubrepoerror |
577 def addremove(self, m, prefix, uipathfn, opts): |
583 def addremove(self, m, prefix, uipathfn, opts): |
578 # In the same way as sub directories are processed, once in a subrepo, |
584 # In the same way as sub directories are processed, once in a subrepo, |
1121 bufsize=-1, |
1127 bufsize=-1, |
1122 close_fds=procutil.closefds, |
1128 close_fds=procutil.closefds, |
1123 stdout=subprocess.PIPE, |
1129 stdout=subprocess.PIPE, |
1124 stderr=subprocess.PIPE, |
1130 stderr=subprocess.PIPE, |
1125 env=procutil.tonativeenv(env), |
1131 env=procutil.tonativeenv(env), |
1126 **extrakw |
1132 **extrakw, |
1127 ) |
1133 ) |
1128 stdout, stderr = map(util.fromnativeeol, p.communicate()) |
1134 stdout, stderr = map(util.fromnativeeol, p.communicate()) |
1129 stderr = stderr.strip() |
1135 stderr = stderr.strip() |
1130 if not failok: |
1136 if not failok: |
1131 if p.returncode: |
1137 if p.returncode: |
1486 cwd=pycompat.rapply(procutil.tonativestr, cwd), |
1492 cwd=pycompat.rapply(procutil.tonativestr, cwd), |
1487 env=procutil.tonativeenv(env), |
1493 env=procutil.tonativeenv(env), |
1488 close_fds=procutil.closefds, |
1494 close_fds=procutil.closefds, |
1489 stdout=subprocess.PIPE, |
1495 stdout=subprocess.PIPE, |
1490 stderr=errpipe, |
1496 stderr=errpipe, |
1491 **extrakw |
1497 **extrakw, |
1492 ) |
1498 ) |
1493 if stream: |
1499 if stream: |
1494 return p.stdout, None |
1500 return p.stdout, None |
1495 |
1501 |
1496 retdata = p.stdout.read().strip() |
1502 retdata = p.stdout.read().strip() |