summaryrefslogtreecommitdiff
path: root/tests/test-subrepo-git.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-subrepo-git.t')
-rw-r--r--tests/test-subrepo-git.t79
1 files changed, 23 insertions, 56 deletions
diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
index 3f06a46..9fbe85e 100644
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -2,8 +2,6 @@
make git commits repeatable
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
$ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
$ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
$ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
@@ -36,6 +34,7 @@ add subrepo clone
$ git clone -q ../gitroot s
$ hg add .hgsub
$ hg commit -m 'new git subrepo'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -56,6 +55,7 @@ record a new commit from upstream from a different branch
$ hg status --subrepos
M s/g
$ hg commit -m 'update git subrepo'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -103,7 +103,7 @@ clone root, make local change
$ echo ggg >> s/g
$ hg status --subrepos
M s/g
- $ hg commit --subrepos -m ggg
+ $ hg commit -m ggg
committing subrepository s
$ hg debugsub
path s
@@ -125,7 +125,7 @@ clone root separately, make different local change
$ hg status --subrepos
A s/f
- $ hg commit --subrepos -m f
+ $ hg commit -m f
committing subrepository s
$ hg debugsub
path s
@@ -135,7 +135,7 @@ clone root separately, make different local change
user b push changes
$ hg push 2>/dev/null
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
pushing branch testing of subrepo s
searching for changes
adding changesets
@@ -147,7 +147,7 @@ user a pulls, merges, commits
$ cd ../ta
$ hg pull
- pulling from $TESTTMP/t (glob)
+ pulling from $TESTTMP/t
searching for changes
adding changesets
adding manifests
@@ -164,7 +164,7 @@ user a pulls, merges, commits
g
gg
ggg
- $ hg commit --subrepos -m 'merge'
+ $ hg commit -m 'merge'
committing subrepository s
$ hg status --subrepos --rev 1:5
M .hgsubstate
@@ -175,7 +175,7 @@ user a pulls, merges, commits
source ../gitroot
revision f47b465e1bce645dbf37232a00574aa1546ca8d3
$ hg push 2>/dev/null
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
pushing branch testing of subrepo s
searching for changes
adding changesets
@@ -207,7 +207,7 @@ make and push changes to hg without updating the subrepo
$ echo aa >> a
$ hg commit -m aa
$ hg push
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
searching for changes
adding changesets
adding manifests
@@ -222,6 +222,7 @@ sync to upstream git, distribute changes
$ git pull -q >/dev/null 2>/dev/null
$ cd ..
$ hg commit -m 'git upstream sync'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -270,16 +271,6 @@ archive subrepos
gg
ggg
- $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null
- $ find ../archive_x | sort | grep -v pax_global_header
- ../archive_x
- ../archive_x/.hg_archival.txt
- ../archive_x/.hgsub
- ../archive_x/.hgsubstate
- ../archive_x/a
- ../archive_x/s
- ../archive_x/s/g
-
create nested repo
$ cd ..
@@ -296,15 +287,16 @@ create nested repo
$ echo inner = inner > .hgsub
$ hg add .hgsub
$ hg commit -m 'nested sub'
+ committing subrepository inner
nested commit
$ echo ffff >> inner/s/f
$ hg status --subrepos
M inner/s/f
- $ hg commit --subrepos -m nested
+ $ hg commit -m nested
committing subrepository inner
- committing subrepository inner/s (glob)
+ committing subrepository inner/s
nested archive
@@ -333,7 +325,7 @@ Don't crash if the subrepo is missing
$ hg push -q
abort: subrepo s is missing
[255]
- $ hg commit --subrepos -qm missing
+ $ hg commit -qm missing
abort: subrepo s is missing
[255]
$ hg update -C
@@ -347,41 +339,27 @@ Don't crash if the .hgsubstate entry is missing
$ hg update 1 -q
$ hg rm .hgsubstate
$ hg commit .hgsubstate -m 'no substate'
- nothing changed
- [1]
+ created new head
$ hg tag -l nosubstate
$ hg manifest
.hgsub
- .hgsubstate
a
$ hg status -S
- R .hgsubstate
$ hg sum | grep commit
- commit: 1 removed, 1 subrepos (new branch head)
+ commit: 1 subrepos
$ hg commit -m 'restore substate'
- nothing changed
- [1]
+ committing subrepository s
$ hg manifest
.hgsub
.hgsubstate
a
$ hg sum | grep commit
- commit: 1 removed, 1 subrepos (new branch head)
+ commit: (clean)
$ hg update -qC nosubstate
$ ls s
- g
-
-issue3109: false positives in git diff-index
-
- $ hg update -q
- $ touch -t 200001010000 s/g
- $ hg status --subrepos
- $ touch -t 200001010000 s/g
- $ hg sum | grep commit
- commit: (clean)
Check hg update --clean
$ cd $TESTTMP/ta
@@ -430,7 +408,7 @@ Sticky subrepositorys, file changes
$ git add f1
$ cd ..
$ hg id -n
- 1+
+ 1
$ cd s
$ git rev-parse HEAD
da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
@@ -487,14 +465,16 @@ Sticky subrepository, file changes and revision updates
l
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id -n
- 7+
+ 7
$ cd s
$ git rev-parse HEAD
aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
$ cd ..
Sticky repository, update --clean
- $ hg update --clean tip 2>/dev/null
+ $ hg update --clean tip
+ Previous HEAD position was aa84837... f
+ HEAD is now at 32a3438... fff
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id -n
7
@@ -519,16 +499,3 @@ Test subrepo already at intended revision:
da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
$ cd ..
-Test forgetting files, not implemented in git subrepo, used to
-traceback
-#if no-windows
- $ hg forget 'notafile*'
- notafile*: No such file or directory
- [1]
-#else
- $ hg forget 'notafile'
- notafile: * (glob)
- [1]
-#endif
-
- $ cd ..