Show More
@@ -78,7 +78,6 b' def push(repo, remote, force=False, revs' | |||||
78 |
|
78 | |||
79 | if not pushop.remote.canpush(): |
|
79 | if not pushop.remote.canpush(): | |
80 | raise util.Abort(_("destination does not support push")) |
|
80 | raise util.Abort(_("destination does not support push")) | |
81 | unfi = pushop.repo.unfiltered() |
|
|||
82 | # get local lock as we might write phase data |
|
81 | # get local lock as we might write phase data | |
83 | locallock = None |
|
82 | locallock = None | |
84 | try: |
|
83 | try: | |
@@ -100,17 +99,7 b' def push(repo, remote, force=False, revs' | |||||
100 | if not unbundle: |
|
99 | if not unbundle: | |
101 | lock = pushop.remote.lock() |
|
100 | lock = pushop.remote.lock() | |
102 | try: |
|
101 | try: | |
103 |
|
|
102 | _pushdiscovery(pushop) | |
104 | fci = discovery.findcommonincoming |
|
|||
105 | commoninc = fci(unfi, pushop.remote, force=pushop.force) |
|
|||
106 | common, inc, remoteheads = commoninc |
|
|||
107 | fco = discovery.findcommonoutgoing |
|
|||
108 | outgoing = fco(unfi, pushop.remote, onlyheads=pushop.revs, |
|
|||
109 | commoninc=commoninc, force=pushop.force) |
|
|||
110 | pushop.outgoing = outgoing |
|
|||
111 | pushop.remoteheads = remoteheads |
|
|||
112 | pushop.incoming = inc |
|
|||
113 |
|
||||
114 | if _pushcheckoutgoing(pushop): |
|
103 | if _pushcheckoutgoing(pushop): | |
115 | _pushchangeset(pushop) |
|
104 | _pushchangeset(pushop) | |
116 | _pushsyncphase(pushop) |
|
105 | _pushsyncphase(pushop) | |
@@ -125,6 +114,19 b' def push(repo, remote, force=False, revs' | |||||
125 | _pushbookmark(pushop) |
|
114 | _pushbookmark(pushop) | |
126 | return pushop.ret |
|
115 | return pushop.ret | |
127 |
|
116 | |||
|
117 | def _pushdiscovery(pushop): | |||
|
118 | # discovery | |||
|
119 | unfi = pushop.repo.unfiltered() | |||
|
120 | fci = discovery.findcommonincoming | |||
|
121 | commoninc = fci(unfi, pushop.remote, force=pushop.force) | |||
|
122 | common, inc, remoteheads = commoninc | |||
|
123 | fco = discovery.findcommonoutgoing | |||
|
124 | outgoing = fco(unfi, pushop.remote, onlyheads=pushop.revs, | |||
|
125 | commoninc=commoninc, force=pushop.force) | |||
|
126 | pushop.outgoing = outgoing | |||
|
127 | pushop.remoteheads = remoteheads | |||
|
128 | pushop.incoming = inc | |||
|
129 | ||||
128 | def _pushcheckoutgoing(pushop): |
|
130 | def _pushcheckoutgoing(pushop): | |
129 | outgoing = pushop.outgoing |
|
131 | outgoing = pushop.outgoing | |
130 | unfi = pushop.repo.unfiltered() |
|
132 | unfi = pushop.repo.unfiltered() |
General Comments 0
You need to be logged in to leave comments.
Login now