Show More
@@ -923,6 +923,15 b' def serve(ui, repo, **opts):' | |||||
923 |
|
923 | |||
924 | out.flush() |
|
924 | out.flush() | |
925 |
|
925 | |||
|
926 | elif cmd == "addchangegroup": | |||
|
927 | if not lock: | |||
|
928 | respond("not locked") | |||
|
929 | continue | |||
|
930 | respond("") | |||
|
931 | ||||
|
932 | r = repo.addchangegroup(fin) | |||
|
933 | respond("") | |||
|
934 | ||||
926 | def openlog(opt, default): |
|
935 | def openlog(opt, default): | |
927 | if opts[opt] and opts[opt] != '-': return open(opts[opt], 'w') |
|
936 | if opts[opt] and opts[opt] != '-': return open(opts[opt], 'w') | |
928 | else: return default |
|
937 | else: return default |
@@ -1715,6 +1715,21 b' class sshrepository:' | |||||
1715 | f = self.do_cmd("changegroup", roots=n) |
|
1715 | f = self.do_cmd("changegroup", roots=n) | |
1716 | return self.pipei |
|
1716 | return self.pipei | |
1717 |
|
1717 | |||
|
1718 | def addchangegroup(self, cg): | |||
|
1719 | d = self.call("addchangegroup") | |||
|
1720 | if d: | |||
|
1721 | raise RepoError("push refused: %s", d) | |||
|
1722 | ||||
|
1723 | while 1: | |||
|
1724 | d = cg.read(4096) | |||
|
1725 | if not d: break | |||
|
1726 | self.pipeo.write(d) | |||
|
1727 | ||||
|
1728 | self.pipeo.flush() | |||
|
1729 | ||||
|
1730 | l = int(self.pipei.readline()) | |||
|
1731 | return self.pipei.read(l) | |||
|
1732 | ||||
1718 | def repository(ui, path=None, create=0): |
|
1733 | def repository(ui, path=None, create=0): | |
1719 | if path: |
|
1734 | if path: | |
1720 | if path.startswith("http://"): |
|
1735 | if path.startswith("http://"): |
General Comments 0
You need to be logged in to leave comments.
Login now