def push(self, remote, force=False, revs=None, newbranch=False): o = lfutil.findoutgoing(repo, remote, force) if o: toupload = set() o = repo.changelog.nodesbetween(o, revs)[0] for n in o: parents = [p for p in repo.changelog.parents(n) if p != node_.nullid] ctx = repo[n] files = set(ctx.files()) if len(parents) == 2: mc = ctx.manifest() mp1 = ctx.parents()[0].manifest() mp2 = ctx.parents()[1].manifest() for f in mp1: if f not in mc: files.add(f) for f in mp2: if f not in mc: files.add(f) for f in mc: if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, None): files.add(f) toupload = toupload.union( set([ctx[f].data().strip() for f in files if lfutil.isstandin(f) and f in ctx])) lfcommands.uploadlfiles(ui, self, remote, toupload) return super(lfilesrepo, self).push(remote, force, revs, newbranch)
def push(self, remote, force=False, revs=None, newbranch=False): outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=force) if outgoing.missing: toupload = set() o = self.changelog.nodesbetween(outgoing.missing, revs)[0] for n in o: parents = [p for p in self.changelog.parents(n) if p != node_.nullid] ctx = self[n] files = set(ctx.files()) if len(parents) == 2: mc = ctx.manifest() mp1 = ctx.parents()[0].manifest() mp2 = ctx.parents()[1].manifest() for f in mp1: if f not in mc: files.add(f) for f in mp2: if f not in mc: files.add(f) for f in mc: if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, None): files.add(f) toupload = toupload.union( set([ctx[f].data().strip() for f in files if lfutil.isstandin(f) and f in ctx])) lfcommands.uploadlfiles(ui, self, remote, toupload) return super(lfilesrepo, self).push(remote, force, revs, newbranch)
def prepushoutgoinghook(pushop): """Push largefiles for pushop before pushing revisions.""" lfrevs = pushop.lfrevs if lfrevs is None: lfrevs = pushop.outgoing.missing if lfrevs: toupload = set() addfunc = lambda fn, lfhash: toupload.add(lfhash) lfutil.getlfilestoupload(pushop.repo, lfrevs, addfunc) lfcommands.uploadlfiles(ui, pushop.repo, pushop.remote, toupload)
def prepushoutgoinghook(pushop): """Push largefiles for pushop before pushing revisions.""" lfrevs = pushop.lfrevs if lfrevs is None: lfrevs = pushop.outgoing.missing if lfrevs: toupload = set() addfunc = lambda fn, lfhash: toupload.add(lfhash) lfutil.getlfilestoupload(pushop.repo, lfrevs, addfunc) lfcommands.uploadlfiles(ui, pushop.repo, pushop.remote, toupload)
def push(self, remote, force=False, revs=None, newbranch=False): if remote.local(): missing = set(self.requirements) - remote.local().supported if missing: msg = _("required features are not" " supported in the destination:" " %s") % (', '.join(sorted(missing))) raise util.Abort(msg) outgoing = discovery.findcommonoutgoing(repo, remote.peer(), force=force) if outgoing.missing: toupload = set() o = self.changelog.nodesbetween(outgoing.missing, revs)[0] for n in o: parents = [p for p in self.changelog.parents(n) if p != node_.nullid] ctx = self[n] files = set(ctx.files()) if len(parents) == 2: mc = ctx.manifest() mp1 = ctx.parents()[0].manifest() mp2 = ctx.parents()[1].manifest() for f in mp1: if f not in mc: files.add(f) for f in mp2: if f not in mc: files.add(f) for f in mc: if mc[f] != mp1.get(f, None) or mc[f] != mp2.get(f, None): files.add(f) toupload = toupload.union( set([ctx[f].data().strip() for f in files if lfutil.isstandin(f) and f in ctx])) lfcommands.uploadlfiles(ui, self, remote, toupload) return super(lfilesrepo, self).push(remote, force, revs, newbranch)
def prepushoutgoinghook(local, remote, outgoing): if outgoing.missing: toupload = set() addfunc = lambda fn, lfhash: toupload.add(lfhash) lfutil.getlfilestoupload(local, outgoing.missing, addfunc) lfcommands.uploadlfiles(ui, local, remote, toupload)
def prepushoutgoinghook(local, remote, outgoing): if outgoing.missing: toupload = set() addfunc = lambda fn, lfhash: toupload.add(lfhash) lfutil.getlfilestoupload(local, outgoing.missing, addfunc) lfcommands.uploadlfiles(ui, local, remote, toupload)