##// 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 seen = {}
870 seen = {}
871 seenbranch = {}
871 seenbranch = {}
872
872
873 # if we have an empty repo, fetch everything
873 # assume we're closer to the tip than the root
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
879 # and start by examining the heads
874 # and start by examining the heads
880 self.ui.status("searching for changes\n")
875 self.ui.status("searching for changes\n")
881 heads = remote.heads()
876 heads = remote.heads()
@@ -1006,7 +1001,14 b' class localrepository:'
1006
1001
1007 def pull(self, remote):
1002 def pull(self, remote):
1008 lock = self.lock()
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 if not fetch:
1012 if not fetch:
1011 self.ui.status("no changes found\n")
1013 self.ui.status("no changes found\n")
1012 return 1
1014 return 1
General Comments 0
You need to be logged in to leave comments. Login now