##// END OF EJS Templates
bookmarks: update only proper bookmarks on push -r/-B (issue 3973)...
Wojciech Lopata -
r19515:14c91b18 stable
parent child Browse files
Show More
@@ -1951,6 +1951,9 b' class localrepository(object):'
1951
1951
1952 self.ui.debug("checking for updated bookmarks\n")
1952 self.ui.debug("checking for updated bookmarks\n")
1953 rb = remote.listkeys('bookmarks')
1953 rb = remote.listkeys('bookmarks')
1954 revnums = map(unfi.changelog.rev, revs or [])
1955 ancestors = [
1956 a for a in unfi.changelog.ancestors(revnums, inclusive=True)]
1954 for k in rb.keys():
1957 for k in rb.keys():
1955 if k in unfi._bookmarks:
1958 if k in unfi._bookmarks:
1956 nr, nl = rb[k], hex(self._bookmarks[k])
1959 nr, nl = rb[k], hex(self._bookmarks[k])
@@ -1958,6 +1961,8 b' class localrepository(object):'
1958 cr = unfi[nr]
1961 cr = unfi[nr]
1959 cl = unfi[nl]
1962 cl = unfi[nl]
1960 if bookmarks.validdest(unfi, cr, cl):
1963 if bookmarks.validdest(unfi, cr, cl):
1964 if ancestors and cl.rev() not in ancestors:
1965 continue
1961 r = remote.pushkey('bookmarks', k, nr, nl)
1966 r = remote.pushkey('bookmarks', k, nr, nl)
1962 if r:
1967 if r:
1963 self.ui.status(_("updating bookmark %s\n") % k)
1968 self.ui.status(_("updating bookmark %s\n") % k)
@@ -422,7 +422,6 b' of this test.'
422 remote: adding manifests
422 remote: adding manifests
423 remote: adding file changes
423 remote: adding file changes
424 remote: added 1 changesets with 1 changes to 1 files
424 remote: added 1 changesets with 1 changes to 1 files
425 updating bookmark @ failed!
426 exporting bookmark add-foo
425 exporting bookmark add-foo
427
426
428 $ cd ..
427 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now