Patchwork test-convert-git.t: make copy detection deterministic

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 24, 2014, 6:20 p.m.
Message ID <ceef13d8a95dc6f3fa8e.1411582852@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/5966/
State Accepted
Headers show

Comments

Siddharth Agarwal - Sept. 24, 2014, 6:20 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1411582835 25200
#      Wed Sep 24 11:20:35 2014 -0700
# Node ID ceef13d8a95dc6f3fa8e51c2bd70b66aab0f2035
# Parent  9d18972ea7b42f030326633b70e7e83d7076b027
test-convert-git.t: make copy detection deterministic

Since both 'bar' and 'bar-copied' matched 'bar-copied2', Git's copy detection
would sometimes result in 'bar' being the source for 'bar-copied2' and
sometimes 'bar-copied'. Change bar in a separate commit so that that would no
longer be the case.
Augie Fackler - Sept. 24, 2014, 6:36 p.m.
On Wed, Sep 24, 2014 at 11:20:52AM -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1411582835 25200
> #      Wed Sep 24 11:20:35 2014 -0700
> # Node ID ceef13d8a95dc6f3fa8e51c2bd70b66aab0f2035
> # Parent  9d18972ea7b42f030326633b70e7e83d7076b027
> test-convert-git.t: make copy detection deterministic

Queued, thanks.

>
> Since both 'bar' and 'bar-copied' matched 'bar-copied2', Git's copy detection
> would sometimes result in 'bar' being the source for 'bar-copied2' and
> sometimes 'bar-copied'. Change bar in a separate commit so that that would no
> longer be the case.
>
> diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
> --- a/tests/test-convert-git.t
> +++ b/tests/test-convert-git.t
> @@ -278,6 +278,8 @@
>    R foo
>
>    $ cd git-repo2
> +  $ echo bar2 >> bar
> +  $ commit -a -m 'change bar'
>    $ cp bar bar-copied2
>    $ git add bar-copied2
>    $ commit -a -m 'copy with no changes'
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -278,6 +278,8 @@ 
   R foo
 
   $ cd git-repo2
+  $ echo bar2 >> bar
+  $ commit -a -m 'change bar'
   $ cp bar bar-copied2
   $ git add bar-copied2
   $ commit -a -m 'copy with no changes'