##// END OF EJS Templates
Move the empty changeset detection out of findincoming to pull...
Matt Mackall -
r636:ac0ec421 default
parent child Browse files
Show More
@@ -870,12 +870,7 b' class localrepository:'
870 870 seen = {}
871 871 seenbranch = {}
872 872
873 # if we have an empty repo, fetch everything
874 if self.changelog.tip() == nullid:
875 self.ui.status("requesting all changes\n")
876 return [nullid]
877
878 # otherwise, assume we're closer to the tip than the root
873 # assume we're closer to the tip than the root
879 874 # and start by examining the heads
880 875 self.ui.status("searching for changes\n")
881 876 heads = remote.heads()
@@ -1006,7 +1001,14 b' class localrepository:'
1006 1001
1007 1002 def pull(self, remote):
1008 1003 lock = self.lock()
1009 fetch = self.findincoming(remote)
1004
1005 # if we have an empty repo, fetch everything
1006 if self.changelog.tip() == nullid:
1007 self.ui.status("requesting all changes\n")
1008 fetch = [nullid]
1009 else:
1010 fetch = self.findincoming(remote)
1011
1010 1012 if not fetch:
1011 1013 self.ui.status("no changes found\n")
1012 1014 return 1
General Comments 0
You need to be logged in to leave comments. Login now