##// END OF EJS Templates
largefiles: show also how many data entities are outgoing at "hg outgoing"...
FUJIWARA Katsunori -
r21883:87aa279f default
parent child Browse files
Show More
@@ -1009,15 +1009,34 b' def _getoutgoings(repo, missing, addfunc'
1009
1009
1010 def outgoinghook(ui, repo, other, opts, missing):
1010 def outgoinghook(ui, repo, other, opts, missing):
1011 if opts.pop('large', None):
1011 if opts.pop('large', None):
1012 toupload = set()
1012 lfhashes = set()
1013 lfutil.getlfilestoupload(repo, missing,
1013 if ui.debugflag:
1014 lambda fn, lfhash: toupload.add(fn))
1014 toupload = {}
1015 def addfunc(fn, lfhash):
1016 if fn not in toupload:
1017 toupload[fn] = []
1018 toupload[fn].append(lfhash)
1019 lfhashes.add(lfhash)
1020 def showhashes(fn):
1021 for lfhash in sorted(toupload[fn]):
1022 ui.debug(' %s\n' % (lfhash))
1023 else:
1024 toupload = set()
1025 def addfunc(fn, lfhash):
1026 toupload.add(fn)
1027 lfhashes.add(lfhash)
1028 def showhashes(fn):
1029 pass
1030 _getoutgoings(repo, missing, addfunc)
1031
1015 if not toupload:
1032 if not toupload:
1016 ui.status(_('largefiles: no files to upload\n'))
1033 ui.status(_('largefiles: no files to upload\n'))
1017 else:
1034 else:
1018 ui.status(_('largefiles to upload:\n'))
1035 ui.status(_('largefiles to upload (%d entities):\n')
1036 % (len(lfhashes)))
1019 for file in sorted(toupload):
1037 for file in sorted(toupload):
1020 ui.status(lfutil.splitstandin(file) + '\n')
1038 ui.status(lfutil.splitstandin(file) + '\n')
1039 showhashes(file)
1021 ui.status('\n')
1040 ui.status('\n')
1022
1041
1023 def summaryremotehook(ui, repo, opts, changes):
1042 def summaryremotehook(ui, repo, opts, changes):
@@ -478,7 +478,7 b' check messages when there are files to u'
478 date: Thu Jan 01 00:00:00 1970 +0000
478 date: Thu Jan 01 00:00:00 1970 +0000
479 summary: #1
479 summary: #1
480
480
481 largefiles to upload:
481 largefiles to upload (1 entities):
482 b
482 b
483
483
484 $ hg -R clone2 outgoing --large --graph --template "{rev}"
484 $ hg -R clone2 outgoing --large --graph --template "{rev}"
@@ -486,7 +486,7 b' check messages when there are files to u'
486 searching for changes
486 searching for changes
487 @ 1
487 @ 1
488
488
489 largefiles to upload:
489 largefiles to upload (1 entities):
490 b
490 b
491
491
492
492
@@ -509,11 +509,28 b' check messages when there are files to u'
509 searching for changes
509 searching for changes
510 1:1acbe71ce432
510 1:1acbe71ce432
511 2:6095d0695d70
511 2:6095d0695d70
512 largefiles to upload:
512 largefiles to upload (1 entities):
513 b
513 b
514 b1
514 b1
515 b2
515 b2
516
516
517 $ hg -R clone2 cat -r 1 clone2/.hglf/b
518 89e6c98d92887913cadf06b2adb97f26cde4849b
519 $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug
520 comparing with $TESTTMP/issue3651/src (glob)
521 query 1; heads
522 searching for changes
523 all remote heads known locally
524 1:1acbe71ce432
525 2:6095d0695d70
526 largefiles to upload (1 entities):
527 b
528 89e6c98d92887913cadf06b2adb97f26cde4849b
529 b1
530 89e6c98d92887913cadf06b2adb97f26cde4849b
531 b2
532 89e6c98d92887913cadf06b2adb97f26cde4849b
533
517
534
518 $ echo bbb > clone2/b
535 $ echo bbb > clone2/b
519 $ hg -R clone2 commit -m '#3: add new largefile entity as existing file'
536 $ hg -R clone2 commit -m '#3: add new largefile entity as existing file'
@@ -542,11 +559,35 b' check messages when there are files to u'
542 3:7983dce246cc
559 3:7983dce246cc
543 4:233f12ada4ae
560 4:233f12ada4ae
544 5:036794ea641c
561 5:036794ea641c
545 largefiles to upload:
562 largefiles to upload (3 entities):
546 b
563 b
547 b1
564 b1
548 b2
565 b2
549
566
567 $ hg -R clone2 cat -r 3 clone2/.hglf/b
568 c801c9cfe94400963fcb683246217d5db77f9a9a
569 $ hg -R clone2 cat -r 4 clone2/.hglf/b
570 13f9ed0898e315bf59dc2973fec52037b6f441a2
571 $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug
572 comparing with $TESTTMP/issue3651/src (glob)
573 query 1; heads
574 searching for changes
575 all remote heads known locally
576 1:1acbe71ce432
577 2:6095d0695d70
578 3:7983dce246cc
579 4:233f12ada4ae
580 5:036794ea641c
581 largefiles to upload (3 entities):
582 b
583 13f9ed0898e315bf59dc2973fec52037b6f441a2
584 89e6c98d92887913cadf06b2adb97f26cde4849b
585 c801c9cfe94400963fcb683246217d5db77f9a9a
586 b1
587 89e6c98d92887913cadf06b2adb97f26cde4849b
588 b2
589 89e6c98d92887913cadf06b2adb97f26cde4849b
590
550
591
551 $ cd ..
592 $ cd ..
552
593
@@ -680,7 +680,7 b' Test that outgoing --large works (with r'
680 date: Thu Jan 01 00:00:00 1970 +0000
680 date: Thu Jan 01 00:00:00 1970 +0000
681 summary: this used to not notice the rm
681 summary: this used to not notice the rm
682
682
683 largefiles to upload:
683 largefiles to upload (2 entities):
684 foo
684 foo
685 large
685 large
686 large8
686 large8
General Comments 0
You need to be logged in to leave comments. Login now