Show More
@@ -447,6 +447,14 b' class GitRemote(object):' | |||||
447 | return remote_refs |
|
447 | return remote_refs | |
448 |
|
448 | |||
449 | @reraise_safe_exceptions |
|
449 | @reraise_safe_exceptions | |
|
450 | def sync_push(self, wire, url, refs=None): | |||
|
451 | if self.check_url(url, wire): | |||
|
452 | repo = self._factory.repo(wire) | |||
|
453 | self.run_git_command( | |||
|
454 | wire, ['push', url, '--mirror'], fail_on_stderr=False) | |||
|
455 | ||||
|
456 | ||||
|
457 | @reraise_safe_exceptions | |||
450 | def get_remote_refs(self, wire, url): |
|
458 | def get_remote_refs(self, wire, url): | |
451 | repo = Repo(url) |
|
459 | repo = Repo(url) | |
452 | return repo.get_refs() |
|
460 | return repo.get_refs() |
@@ -561,6 +561,15 b' class HgRemote(object):' | |||||
561 | repo, remote, heads=commit_ids, force=None).cgresult |
|
561 | repo, remote, heads=commit_ids, force=None).cgresult | |
562 |
|
562 | |||
563 | @reraise_safe_exceptions |
|
563 | @reraise_safe_exceptions | |
|
564 | def sync_push(self, wire, url): | |||
|
565 | if self.check_url(url, wire['config']): | |||
|
566 | repo = self._factory.repo(wire) | |||
|
567 | bookmarks = dict(repo._bookmarks).keys() | |||
|
568 | remote = peer(repo, {}, url) | |||
|
569 | return exchange.push( | |||
|
570 | repo, remote, newbranch=True, bookmarks=bookmarks).cgresult | |||
|
571 | ||||
|
572 | @reraise_safe_exceptions | |||
564 | def revision(self, wire, rev): |
|
573 | def revision(self, wire, rev): | |
565 | repo = self._factory.repo(wire) |
|
574 | repo = self._factory.repo(wire) | |
566 | ctx = repo[rev] |
|
575 | ctx = repo[rev] |
General Comments 0
You need to be logged in to leave comments.
Login now