Mercurial > public > mercurial-scm > hg
comparison mercurial/exchange.py @ 22622:ce6b9edee725
exchange: import bookmarks as bookmod
Using the original names makes it difficult to use `bookmarks` as a variable
name.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 25 Sep 2014 15:26:09 -0700 |
parents | cda85cfc8252 |
children | cd7e17aa6040 |
comparison
equal
deleted
inserted
replaced
22621:76a43e0db516 | 22622:ce6b9edee725 |
---|---|
7 | 7 |
8 from i18n import _ | 8 from i18n import _ |
9 from node import hex, nullid | 9 from node import hex, nullid |
10 import errno, urllib | 10 import errno, urllib |
11 import util, scmutil, changegroup, base85, error | 11 import util, scmutil, changegroup, base85, error |
12 import discovery, phases, obsolete, bookmarks, bundle2, pushkey | 12 import discovery, phases, obsolete, bookmarks as bookmod, bundle2, pushkey |
13 | 13 |
14 def readbundle(ui, fh, fname, vfs=None): | 14 def readbundle(ui, fh, fname, vfs=None): |
15 header = changegroup.readexactly(fh, 4) | 15 header = changegroup.readexactly(fh, 4) |
16 | 16 |
17 alg = None | 17 alg = None |
313 if pushop.revs: | 313 if pushop.revs: |
314 revnums = map(repo.changelog.rev, pushop.revs) | 314 revnums = map(repo.changelog.rev, pushop.revs) |
315 ancestors = repo.changelog.ancestors(revnums, inclusive=True) | 315 ancestors = repo.changelog.ancestors(revnums, inclusive=True) |
316 remotebookmark = remote.listkeys('bookmarks') | 316 remotebookmark = remote.listkeys('bookmarks') |
317 | 317 |
318 comp = bookmarks.compare(repo, repo._bookmarks, remotebookmark, srchex=hex) | 318 comp = bookmod.compare(repo, repo._bookmarks, remotebookmark, srchex=hex) |
319 addsrc, adddst, advsrc, advdst, diverge, differ, invalid = comp | 319 addsrc, adddst, advsrc, advdst, diverge, differ, invalid = comp |
320 for b, scid, dcid in advsrc: | 320 for b, scid, dcid in advsrc: |
321 if not ancestors or repo[scid].rev() in ancestors: | 321 if not ancestors or repo[scid].rev() in ancestors: |
322 pushop.outbookmarks.append((b, dcid, scid)) | 322 pushop.outbookmarks.append((b, dcid, scid)) |
323 | 323 |