##// END OF EJS Templates
bookmarks: merge suspect addchangegroup into core...
Matt Mackall -
r13365:f1c5294e default
parent child Browse files
Show More
@@ -129,23 +129,6 b' def bookmark(ui, repo, mark=None, rev=No'
129 129 label=label)
130 130 return
131 131
132 def reposetup(ui, repo):
133 if not repo.local():
134 return
135
136 class bookmark_repo(repo.__class__):
137 def addchangegroup(self, *args, **kwargs):
138 result = super(bookmark_repo, self).addchangegroup(*args, **kwargs)
139 if result > 1:
140 # We have more heads than before
141 return result
142 node = self.changelog.tip()
143 parents = self.dirstate.parents()
144 bookmarks.update(self, parents, node)
145 return result
146
147 repo.__class__ = bookmark_repo
148
149 132 def pull(oldpull, ui, repo, source="default", **opts):
150 133 # translate bookmark args to rev args for actual pull
151 134 if opts.get('bookmark'):
@@ -1891,6 +1891,10 b' class localrepository(repo.repository):'
1891 1891 self.hook("incoming", node=hex(cl.node(i)),
1892 1892 source=srctype, url=url)
1893 1893
1894 # FIXME - why does this care about tip?
1895 if newheads == oldheads:
1896 bookmarks.update(self, self.dirstate.parents(), self['tip'].node())
1897
1894 1898 # never return 0 here:
1895 1899 if newheads < oldheads:
1896 1900 return newheads - oldheads - 1
General Comments 0
You need to be logged in to leave comments. Login now