Show More
@@ -301,7 +301,8 b' def clone(ui, source, dest = None, **opt' | |||||
301 | else: |
|
301 | else: | |
302 | repo = hg.repository(ui, ".", create=1) |
|
302 | repo = hg.repository(ui, ".", create=1) | |
303 | other = hg.repository(ui, source) |
|
303 | other = hg.repository(ui, source) | |
304 |
|
|
304 | fetch = repo.findincoming(other) | |
|
305 | cg = other.changegroup(fetch) | |||
305 | repo.addchangegroup(cg) |
|
306 | repo.addchangegroup(cg) | |
306 |
|
307 | |||
307 | f = repo.opener("hgrc", "w") |
|
308 | f = repo.opener("hgrc", "w") | |
@@ -547,7 +548,8 b' def pull(ui, repo, source="default", **o' | |||||
547 | ui.status('pulling from %s\n' % (source)) |
|
548 | ui.status('pulling from %s\n' % (source)) | |
548 |
|
549 | |||
549 | other = hg.repository(ui, source) |
|
550 | other = hg.repository(ui, source) | |
550 |
|
|
551 | fetch = repo.findincoming(other) | |
|
552 | cg = other.changegroup(fetch) | |||
551 | r = repo.addchangegroup(cg) |
|
553 | r = repo.addchangegroup(cg) | |
552 | if cg and not r: |
|
554 | if cg and not r: | |
553 | if opts['update']: |
|
555 | if opts['update']: |
@@ -820,7 +820,7 b' class localrepository:' | |||||
820 |
|
820 | |||
821 | return nl |
|
821 | return nl | |
822 |
|
822 | |||
823 |
def |
|
823 | def findincoming(self, remote): | |
824 | m = self.changelog.nodemap |
|
824 | m = self.changelog.nodemap | |
825 | search = [] |
|
825 | search = [] | |
826 | fetch = [] |
|
826 | fetch = [] | |
@@ -830,7 +830,7 b' class localrepository:' | |||||
830 | # if we have an empty repo, fetch everything |
|
830 | # if we have an empty repo, fetch everything | |
831 | if self.changelog.tip() == nullid: |
|
831 | if self.changelog.tip() == nullid: | |
832 | self.ui.status("requesting all changes\n") |
|
832 | self.ui.status("requesting all changes\n") | |
833 |
return |
|
833 | return [nullid] | |
834 |
|
834 | |||
835 | # otherwise, assume we're closer to the tip than the root |
|
835 | # otherwise, assume we're closer to the tip than the root | |
836 | self.ui.status("searching for changes\n") |
|
836 | self.ui.status("searching for changes\n") | |
@@ -925,8 +925,8 b' class localrepository:' | |||||
925 |
|
925 | |||
926 | self.ui.debug("%d total queries\n" % reqcnt) |
|
926 | self.ui.debug("%d total queries\n" % reqcnt) | |
927 |
|
927 | |||
928 |
return |
|
928 | return fetch | |
929 |
|
929 | |||
930 | def changegroup(self, basenodes): |
|
930 | def changegroup(self, basenodes): | |
931 | nodes = self.newer(basenodes) |
|
931 | nodes = self.newer(basenodes) | |
932 |
|
932 |
General Comments 0
You need to be logged in to leave comments.
Login now