##// END OF EJS Templates
largefiles: remove findoutgoing portability wrapper
Mads Kiilerich -
r18152:4454607b default
parent child Browse files
Show More
@@ -47,11 +47,6 b' def repoforget(repo, list):'
47 forget = repo[None].forget
47 forget = repo[None].forget
48 return forget(list)
48 return forget(list)
49
49
50 def findoutgoing(repo, remote, force):
51 from mercurial import discovery
52 outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=force)
53 return outgoing.missing
54
55 # -- Private worker functions ------------------------------------------
50 # -- Private worker functions ------------------------------------------
56
51
57 def getminsize(ui, assumelfiles, opt, default=10):
52 def getminsize(ui, assumelfiles, opt, default=10):
@@ -12,7 +12,7 b' import os'
12 import copy
12 import copy
13
13
14 from mercurial import hg, commands, util, cmdutil, scmutil, match as match_, \
14 from mercurial import hg, commands, util, cmdutil, scmutil, match as match_, \
15 node, archival, error, merge
15 node, archival, error, merge, discovery
16 from mercurial.i18n import _
16 from mercurial.i18n import _
17 from mercurial.node import hex
17 from mercurial.node import hex
18 from hgext import rebase
18 from hgext import rebase
@@ -976,10 +976,10 b' def getoutgoinglfiles(ui, repo, dest=Non'
976 remote = hg.peer(repo, opts, dest)
976 remote = hg.peer(repo, opts, dest)
977 except error.RepoError:
977 except error.RepoError:
978 return None
978 return None
979 o = lfutil.findoutgoing(repo, remote, False)
979 outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=False)
980 if not o:
980 if not outgoing.missing:
981 return o
981 return outgoing.missing
982 o = repo.changelog.nodesbetween(o, revs)[0]
982 o = repo.changelog.nodesbetween(outgoing.missing, revs)[0]
983 if opts.get('newest_first'):
983 if opts.get('newest_first'):
984 o.reverse()
984 o.reverse()
985
985
@@ -11,7 +11,8 b' import copy'
11 import types
11 import types
12 import os
12 import os
13
13
14 from mercurial import context, error, manifest, match as match_, util
14 from mercurial import context, error, manifest, match as match_, util, \
15 discovery
15 from mercurial import node as node_
16 from mercurial import node as node_
16 from mercurial.i18n import _
17 from mercurial.i18n import _
17 from mercurial import localrepo
18 from mercurial import localrepo
@@ -404,10 +405,11 b' def reposetup(ui, repo):'
404 wlock.release()
405 wlock.release()
405
406
406 def push(self, remote, force=False, revs=None, newbranch=False):
407 def push(self, remote, force=False, revs=None, newbranch=False):
407 o = lfutil.findoutgoing(self, remote, force)
408 outgoing = discovery.findcommonoutgoing(repo, remote.peer(),
408 if o:
409 force=force)
410 if outgoing.missing:
409 toupload = set()
411 toupload = set()
410 o = self.changelog.nodesbetween(o, revs)[0]
412 o = self.changelog.nodesbetween(outgoing.missing, revs)[0]
411 for n in o:
413 for n in o:
412 parents = [p for p in self.changelog.parents(n)
414 parents = [p for p in self.changelog.parents(n)
413 if p != node_.nullid]
415 if p != node_.nullid]
General Comments 0
You need to be logged in to leave comments. Login now