hgext/largefiles/overrides.py
changeset 17835 08d11b82d9fc
parent 17824 221c9c3146eb
child 17847 1e4eb1faba6e
equal deleted inserted replaced
17834:743d04dd48ec 17835:08d11b82d9fc
   966         remote = hg.peer(repo, opts, dest)
   966         remote = hg.peer(repo, opts, dest)
   967     except error.RepoError:
   967     except error.RepoError:
   968         return None
   968         return None
   969     o = lfutil.findoutgoing(repo, remote, False)
   969     o = lfutil.findoutgoing(repo, remote, False)
   970     if not o:
   970     if not o:
   971         return None
   971         return o
   972     o = repo.changelog.nodesbetween(o, revs)[0]
   972     o = repo.changelog.nodesbetween(o, revs)[0]
   973     if opts.get('newest_first'):
   973     if opts.get('newest_first'):
   974         o.reverse()
   974         o.reverse()
   975 
   975 
   976     toupload = set()
   976     toupload = set()
  1000 
  1000 
  1001     if opts.pop('large', None):
  1001     if opts.pop('large', None):
  1002         toupload = getoutgoinglfiles(ui, repo, dest, **opts)
  1002         toupload = getoutgoinglfiles(ui, repo, dest, **opts)
  1003         if toupload is None:
  1003         if toupload is None:
  1004             ui.status(_('largefiles: No remote repo\n'))
  1004             ui.status(_('largefiles: No remote repo\n'))
       
  1005         elif not toupload:
       
  1006             ui.status(_('largefiles: no files to upload\n'))
  1005         else:
  1007         else:
  1006             ui.status(_('largefiles to upload:\n'))
  1008             ui.status(_('largefiles to upload:\n'))
  1007             for file in toupload:
  1009             for file in toupload:
  1008                 ui.status(lfutil.splitstandin(file) + '\n')
  1010                 ui.status(lfutil.splitstandin(file) + '\n')
  1009             ui.status('\n')
  1011             ui.status('\n')
  1019 
  1021 
  1020     if opts.pop('large', None):
  1022     if opts.pop('large', None):
  1021         toupload = getoutgoinglfiles(ui, repo, None, **opts)
  1023         toupload = getoutgoinglfiles(ui, repo, None, **opts)
  1022         if toupload is None:
  1024         if toupload is None:
  1023             ui.status(_('largefiles: No remote repo\n'))
  1025             ui.status(_('largefiles: No remote repo\n'))
       
  1026         elif not toupload:
       
  1027             ui.status(_('largefiles: (no files to upload)\n'))
  1024         else:
  1028         else:
  1025             ui.status(_('largefiles: %d to upload\n') % len(toupload))
  1029             ui.status(_('largefiles: %d to upload\n') % len(toupload))
  1026 
  1030 
  1027 def scmutiladdremove(orig, repo, pats=[], opts={}, dry_run=None,
  1031 def scmutiladdremove(orig, repo, pats=[], opts={}, dry_run=None,
  1028                      similarity=None):
  1032                      similarity=None):