Patchwork [1,of,4,RESEND] largefiles: add tests for summary/outgoing improved in subsequent patches

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 8, 2014, 2:40 a.m.
Message ID <6f3a1b7ead9e3f3bf371.1404787223@juju>
Download mbox | patch
Permalink /patch/5128/
State Accepted
Commit 6f332778f904fa2a2c3ad14be69346ac1bf47318
Headers show

Comments

Katsunori FUJIWARA - July 8, 2014, 2:40 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1404726346 -32400
#      Mon Jul 07 18:45:46 2014 +0900
# Node ID 6f3a1b7ead9e3f3bf371bec2fee34d605edb72a8
# Parent  61b333b982ea7baab198a188306fc05fb2850179
largefiles: add tests for summary/outgoing improved in subsequent patches

This patch adds tests for summary/outgoing improved in subsequent
patches, to reduce amount of diffs in each patches.

This patch adds new revisions below:

  - revision #2 adds new largefiles, but they contain as same data as
    one already existing

    this causes that multiple standins refer the same data entity

  - revision #3, #4 and #5 change the already existing largefile

    this causes that multiple data entities are outgoing for the standin.
    #5 can be used to check de-duplication of "(hash, filename)" pair.
Katsunori FUJIWARA - July 8, 2014, 2:54 a.m.
In fact, this series is resent, because previous one seems not to be
transferred beyond SMTP yet, even after half a day and more. (I didn't
receive any error mails for it, like "it was rejected by SPAM filter")

If previous one will be delivered in the future, please ignore it !

At Tue, 08 Jul 2014 11:40:23 +0900,
FUJIWARA Katsunori wrote:
> 
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1404726346 -32400
> #      Mon Jul 07 18:45:46 2014 +0900
> # Node ID 6f3a1b7ead9e3f3bf371bec2fee34d605edb72a8
> # Parent  61b333b982ea7baab198a188306fc05fb2850179
> largefiles: add tests for summary/outgoing improved in subsequent patches
> 
> This patch adds tests for summary/outgoing improved in subsequent
> patches, to reduce amount of diffs in each patches.
> 
> This patch adds new revisions below:
> 
>   - revision #2 adds new largefiles, but they contain as same data as
>     one already existing
> 
>     this causes that multiple standins refer the same data entity
> 
>   - revision #3, #4 and #5 change the already existing largefile
> 
>     this causes that multiple data entities are outgoing for the standin.
>     #5 can be used to check de-duplication of "(hash, filename)" pair.
> 
> diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
> --- a/tests/test-largefiles-misc.t
> +++ b/tests/test-largefiles-misc.t
> @@ -490,6 +490,64 @@ check messages when there are files to u
>    b
>    
>  
> +  $ cp clone2/b clone2/b1
> +  $ cp clone2/b clone2/b2
> +  $ hg -R clone2 add --large clone2/b1 clone2/b2
> +  $ hg -R clone2 commit -m '#2: add largefiles referring same entity'
> +  Invoking status precommit hook
> +  A b1
> +  A b2
> +  $ hg -R clone2 summary --large
> +  parent: 2:6095d0695d70 tip
> +   #2: add largefiles referring same entity
> +  branch: default
> +  commit: (clean)
> +  update: (current)
> +  largefiles: 3 to upload
> +  $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n"
> +  comparing with $TESTTMP/issue3651/src (glob)
> +  searching for changes
> +  1:1acbe71ce432
> +  2:6095d0695d70
> +  largefiles to upload:
> +  b
> +  b1
> +  b2
> +  
> +
> +  $ echo bbb > clone2/b
> +  $ hg -R clone2 commit -m '#3: add new largefile entity as existing file'
> +  Invoking status precommit hook
> +  M b
> +  $ echo bbbb > clone2/b
> +  $ hg -R clone2 commit -m '#4: add new largefile entity as existing file'
> +  Invoking status precommit hook
> +  M b
> +  $ cp clone2/b1 clone2/b
> +  $ hg -R clone2 commit -m '#5: refer existing largefile entity again'
> +  Invoking status precommit hook
> +  M b
> +  $ hg -R clone2 summary --large
> +  parent: 5:036794ea641c tip
> +   #5: refer existing largefile entity again
> +  branch: default
> +  commit: (clean)
> +  update: (current)
> +  largefiles: 3 to upload
> +  $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n"
> +  comparing with $TESTTMP/issue3651/src (glob)
> +  searching for changes
> +  1:1acbe71ce432
> +  2:6095d0695d70
> +  3:7983dce246cc
> +  4:233f12ada4ae
> +  5:036794ea641c
> +  largefiles to upload:
> +  b
> +  b1
> +  b2
> +  
> +
>    $ cd ..
>  
>  merge action 'd' for 'local renamed directory to d2/g' which has no filename
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
> 

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy@lares.dti.ne.jp

Patch

diff --git a/tests/test-largefiles-misc.t b/tests/test-largefiles-misc.t
--- a/tests/test-largefiles-misc.t
+++ b/tests/test-largefiles-misc.t
@@ -490,6 +490,64 @@  check messages when there are files to u
   b
   
 
+  $ cp clone2/b clone2/b1
+  $ cp clone2/b clone2/b2
+  $ hg -R clone2 add --large clone2/b1 clone2/b2
+  $ hg -R clone2 commit -m '#2: add largefiles referring same entity'
+  Invoking status precommit hook
+  A b1
+  A b2
+  $ hg -R clone2 summary --large
+  parent: 2:6095d0695d70 tip
+   #2: add largefiles referring same entity
+  branch: default
+  commit: (clean)
+  update: (current)
+  largefiles: 3 to upload
+  $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n"
+  comparing with $TESTTMP/issue3651/src (glob)
+  searching for changes
+  1:1acbe71ce432
+  2:6095d0695d70
+  largefiles to upload:
+  b
+  b1
+  b2
+  
+
+  $ echo bbb > clone2/b
+  $ hg -R clone2 commit -m '#3: add new largefile entity as existing file'
+  Invoking status precommit hook
+  M b
+  $ echo bbbb > clone2/b
+  $ hg -R clone2 commit -m '#4: add new largefile entity as existing file'
+  Invoking status precommit hook
+  M b
+  $ cp clone2/b1 clone2/b
+  $ hg -R clone2 commit -m '#5: refer existing largefile entity again'
+  Invoking status precommit hook
+  M b
+  $ hg -R clone2 summary --large
+  parent: 5:036794ea641c tip
+   #5: refer existing largefile entity again
+  branch: default
+  commit: (clean)
+  update: (current)
+  largefiles: 3 to upload
+  $ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n"
+  comparing with $TESTTMP/issue3651/src (glob)
+  searching for changes
+  1:1acbe71ce432
+  2:6095d0695d70
+  3:7983dce246cc
+  4:233f12ada4ae
+  5:036794ea641c
+  largefiles to upload:
+  b
+  b1
+  b2
+  
+
   $ cd ..
 
 merge action 'd' for 'local renamed directory to d2/g' which has no filename