Show More
@@ -451,8 +451,9 b' class GitRemote(object):' | |||||
451 | if self.check_url(url, wire): |
|
451 | if self.check_url(url, wire): | |
452 | repo = self._factory.repo(wire) |
|
452 | repo = self._factory.repo(wire) | |
453 | self.run_git_command( |
|
453 | self.run_git_command( | |
454 |
wire, ['push', url, '--mirror'], fail_on_stderr=False |
|
454 | wire, ['push', url, '--mirror'], fail_on_stderr=False, | |
455 |
|
455 | _copts=['-c', 'core.askpass=""'], | ||
|
456 | extra_env={'GIT_TERMINAL_PROMPT': '0'}) | |||
456 |
|
457 | |||
457 | @reraise_safe_exceptions |
|
458 | @reraise_safe_exceptions | |
458 | def get_remote_refs(self, wire, url): |
|
459 | def get_remote_refs(self, wire, url): | |
@@ -625,6 +626,10 b' class GitRemote(object):' | |||||
625 | del opts['_safe'] |
|
626 | del opts['_safe'] | |
626 | safe_call = True |
|
627 | safe_call = True | |
627 |
|
628 | |||
|
629 | if '_copts' in opts: | |||
|
630 | _copts.extend(opts['_copts'] or []) | |||
|
631 | del opts['_copts'] | |||
|
632 | ||||
628 | gitenv = os.environ.copy() |
|
633 | gitenv = os.environ.copy() | |
629 | gitenv.update(opts.pop('extra_env', {})) |
|
634 | gitenv.update(opts.pop('extra_env', {})) | |
630 | # need to clean fix GIT_DIR ! |
|
635 | # need to clean fix GIT_DIR ! |
@@ -553,7 +553,13 b' class HgRemote(object):' | |||||
553 | @reraise_safe_exceptions |
|
553 | @reraise_safe_exceptions | |
554 | def pull(self, wire, url, commit_ids=None): |
|
554 | def pull(self, wire, url, commit_ids=None): | |
555 | repo = self._factory.repo(wire) |
|
555 | repo = self._factory.repo(wire) | |
|
556 | # Disable any prompts for this repo | |||
|
557 | repo.ui.setconfig('ui', 'interactive', 'off', '-y') | |||
|
558 | ||||
556 | remote = peer(repo, {}, url) |
|
559 | remote = peer(repo, {}, url) | |
|
560 | # Disable any prompts for this remote | |||
|
561 | remote.ui.setconfig('ui', 'interactive', 'off', '-y') | |||
|
562 | ||||
557 | if commit_ids: |
|
563 | if commit_ids: | |
558 | commit_ids = [bin(commit_id) for commit_id in commit_ids] |
|
564 | commit_ids = [bin(commit_id) for commit_id in commit_ids] | |
559 |
|
565 | |||
@@ -564,8 +570,15 b' class HgRemote(object):' | |||||
564 | def sync_push(self, wire, url): |
|
570 | def sync_push(self, wire, url): | |
565 | if self.check_url(url, wire['config']): |
|
571 | if self.check_url(url, wire['config']): | |
566 | repo = self._factory.repo(wire) |
|
572 | repo = self._factory.repo(wire) | |
|
573 | ||||
|
574 | # Disable any prompts for this repo | |||
|
575 | repo.ui.setconfig('ui', 'interactive', 'off', '-y') | |||
|
576 | ||||
567 | bookmarks = dict(repo._bookmarks).keys() |
|
577 | bookmarks = dict(repo._bookmarks).keys() | |
568 | remote = peer(repo, {}, url) |
|
578 | remote = peer(repo, {}, url) | |
|
579 | # Disable any prompts for this remote | |||
|
580 | remote.ui.setconfig('ui', 'interactive', 'off', '-y') | |||
|
581 | ||||
569 | return exchange.push( |
|
582 | return exchange.push( | |
570 | repo, remote, newbranch=True, bookmarks=bookmarks).cgresult |
|
583 | repo, remote, newbranch=True, bookmarks=bookmarks).cgresult | |
571 |
|
584 |
@@ -14,6 +14,9 b'' | |||||
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software Foundation, |
|
15 | # along with this program; if not, write to the Free Software Foundation, | |
16 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
16 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
|
17 | import logging | |||
|
18 | ||||
|
19 | log = logging.getLogger(__name__) | |||
17 |
|
20 | |||
18 |
|
21 | |||
19 | def safe_int(val, default=None): |
|
22 | def safe_int(val, default=None): |
General Comments 0
You need to be logged in to leave comments.
Login now