tests/test-subrepo-git.t
changeset 12992 2b73a3279a9f
child 12993 a91334380699
equal deleted inserted replaced
12991:23de1a7f8e82 12992:2b73a3279a9f
       
     1   $ "$TESTDIR/hghave" git || exit 80
       
     2 
       
     3 make git commits repeatable
       
     4 
       
     5   $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
       
     6   $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
       
     7   $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
       
     8   $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
       
     9   $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
       
    10   $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
       
    11 
       
    12 root hg repo
       
    13 
       
    14   $ hg init t
       
    15   $ cd t
       
    16   $ echo a > a
       
    17   $ hg add a
       
    18   $ hg commit -m a
       
    19   $ cd ..
       
    20 
       
    21 new external git repo
       
    22 
       
    23   $ mkdir gitroot
       
    24   $ cd gitroot
       
    25   $ git init -q
       
    26   $ echo g > g
       
    27   $ git add g
       
    28   $ git commit -q -m g
       
    29 
       
    30 add subrepo clone
       
    31 
       
    32   $ cd ../t
       
    33   $ echo 's = [git]../gitroot' > .hgsub
       
    34   $ git clone -q ../gitroot s
       
    35   $ hg add .hgsub
       
    36   $ hg commit -m 'new git subrepo'
       
    37   committing subrepository $TESTTMP/t/s
       
    38   $ hg debugsub
       
    39   path s
       
    40    source   ../gitroot
       
    41    revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
       
    42 
       
    43 record a new commit from upstream
       
    44 
       
    45   $ cd ../gitroot
       
    46   $ echo gg >> g
       
    47   $ git commit -q -a -m gg
       
    48 
       
    49   $ cd ../t/s
       
    50   $ git pull -q
       
    51 
       
    52   $ cd ..
       
    53   $ hg commit -m 'update git subrepo'
       
    54   committing subrepository $TESTTMP/t/s
       
    55   $ hg debugsub
       
    56   path s
       
    57    source   ../gitroot
       
    58    revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a