tests/test-subrepo-git.t
changeset 33365 6d88468d435b
parent 32902 642feee29d70
child 33658 db83a1df03fe
equal deleted inserted replaced
33364:bf2daeddd42b 33365:6d88468d435b
   154 
   154 
   155 user b push changes
   155 user b push changes
   156 
   156 
   157   $ hg push 2>/dev/null
   157   $ hg push 2>/dev/null
   158   pushing to $TESTTMP/t (glob)
   158   pushing to $TESTTMP/t (glob)
   159   pushing branch testing of subrepo s
   159   pushing branch testing of subrepository "s"
   160   searching for changes
   160   searching for changes
   161   adding changesets
   161   adding changesets
   162   adding manifests
   162   adding manifests
   163   adding file changes
   163   adding file changes
   164   added 1 changesets with 1 changes to 1 files
   164   added 1 changesets with 1 changes to 1 files
   198   path s
   198   path s
   199    source   ../gitroot
   199    source   ../gitroot
   200    revision f47b465e1bce645dbf37232a00574aa1546ca8d3
   200    revision f47b465e1bce645dbf37232a00574aa1546ca8d3
   201   $ hg push 2>/dev/null
   201   $ hg push 2>/dev/null
   202   pushing to $TESTTMP/t (glob)
   202   pushing to $TESTTMP/t (glob)
   203   pushing branch testing of subrepo s
   203   pushing branch testing of subrepository "s"
   204   searching for changes
   204   searching for changes
   205   adding changesets
   205   adding changesets
   206   adding manifests
   206   adding manifests
   207   adding file changes
   207   adding file changes
   208   added 2 changesets with 2 changes to 1 files
   208   added 2 changesets with 2 changes to 1 files
   222 
   222 
   223   $ cd ../t
   223   $ cd ../t
   224   $ hg clone . ../td 2>&1 | egrep -v '^Cloning into|^done\.'
   224   $ hg clone . ../td 2>&1 | egrep -v '^Cloning into|^done\.'
   225   updating to branch default
   225   updating to branch default
   226   cloning subrepo s from $TESTTMP/gitroot
   226   cloning subrepo s from $TESTTMP/gitroot
   227   checking out detached HEAD in subrepo s
   227   checking out detached HEAD in subrepository "s"
   228   check out a git branch if you intend to make changes
   228   check out a git branch if you intend to make changes
   229   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   229   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
   230   $ cd ../td
   230   $ cd ../td
   231   $ echo aa >> a
   231   $ echo aa >> a
   232   $ hg commit -m aa
   232   $ hg commit -m aa
   387   $ rm -rf s
   387   $ rm -rf s
   388   $ hg status -S
   388   $ hg status -S
   389   $ hg sum | grep commit
   389   $ hg sum | grep commit
   390   commit: 1 subrepos
   390   commit: 1 subrepos
   391   $ hg push -q
   391   $ hg push -q
   392   abort: subrepo s is missing (in subrepo s)
   392   abort: subrepo s is missing (in subrepository "s")
   393   [255]
   393   [255]
   394   $ hg commit --subrepos -qm missing
   394   $ hg commit --subrepos -qm missing
   395   abort: subrepo s is missing (in subrepo s)
   395   abort: subrepo s is missing (in subrepository "s")
   396   [255]
   396   [255]
   397 
   397 
   398 #if symlink
   398 #if symlink
   399 Don't crash if subrepo is a broken symlink
   399 Don't crash if subrepo is a broken symlink
   400   $ ln -s broken s
   400   $ ln -s broken s
   401   $ hg status -S
   401   $ hg status -S
   402   $ hg push -q
   402   $ hg push -q
   403   abort: subrepo s is missing (in subrepo s)
   403   abort: subrepo s is missing (in subrepository "s")
   404   [255]
   404   [255]
   405   $ hg commit --subrepos -qm missing
   405   $ hg commit --subrepos -qm missing
   406   abort: subrepo s is missing (in subrepo s)
   406   abort: subrepo s is missing (in subrepository "s")
   407   [255]
   407   [255]
   408   $ rm s
   408   $ rm s
   409 #endif
   409 #endif
   410 
   410 
   411   $ hg update -C 2> /dev/null
   411   $ hg update -C 2> /dev/null
   700 Test that sanitizing is omitted in meta data area:
   700 Test that sanitizing is omitted in meta data area:
   701 
   701 
   702   $ mkdir s/.git/.hg
   702   $ mkdir s/.git/.hg
   703   $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc
   703   $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc
   704   $ hg update -q -C af6d2edbb0d3
   704   $ hg update -q -C af6d2edbb0d3
   705   checking out detached HEAD in subrepo s
   705   checking out detached HEAD in subrepository "s"
   706   check out a git branch if you intend to make changes
   706   check out a git branch if you intend to make changes
   707 
   707 
   708 check differences made by most recent change
   708 check differences made by most recent change
   709   $ cd s
   709   $ cd s
   710   $ cat > foobar << EOF
   710   $ cat > foobar << EOF
  1158   > malicious-subrepository malicious-subrepository-protected
  1158   > malicious-subrepository malicious-subrepository-protected
  1159   Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob)
  1159   Cloning into '$TESTTMP/tc/malicious-subrepository-protected/s'... (glob)
  1160   fatal: transport 'ext' not allowed
  1160   fatal: transport 'ext' not allowed
  1161   updating to branch default
  1161   updating to branch default
  1162   cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
  1162   cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
  1163   abort: git clone error 128 in s (in subrepo s)
  1163   abort: git clone error 128 in s (in subrepository "s")
  1164   [255]
  1164   [255]
  1165   $ f -Dq pwned.txt
  1165   $ f -Dq pwned.txt
  1166   pwned.txt: file not found
  1166   pwned.txt: file not found
  1167 
  1167 
  1168 whitelisting of ext should be respected (that's the git submodule behaviour)
  1168 whitelisting of ext should be respected (that's the git submodule behaviour)
  1174   
  1174   
  1175   Please make sure you have the correct access rights
  1175   Please make sure you have the correct access rights
  1176   and the repository exists.
  1176   and the repository exists.
  1177   updating to branch default
  1177   updating to branch default
  1178   cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
  1178   cloning subrepo s from ext::sh -c echo% pwned:% $PWNED_MSG% >pwned.txt
  1179   abort: git clone error 128 in s (in subrepo s)
  1179   abort: git clone error 128 in s (in subrepository "s")
  1180   [255]
  1180   [255]
  1181   $ f -Dq pwned.txt
  1181   $ f -Dq pwned.txt
  1182   pwned: you asked for it
  1182   pwned: you asked for it
  1183 
  1183 
  1184 #endif
  1184 #endif