Skip to content
Snippets Groups Projects
Commit ef59b46865d0 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

tests: don't commit a string referring to $TESTTMP

This leads to unstable commit IDs.
parent ba1b2afe7a12
No related branches found
No related tags found
1 merge request!157Some minor test suite tweaks
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
create mode 100644 gamma create mode 100644 gamma
$ cd ../.. $ cd ../..
$ echo xxx >> alpha $ echo xxx >> alpha
$ hg commit -m 'Update subrepo2 from hg' | grep -v "committing subrepository" || true $ fn_hg_commit -m 'Update subrepo2 from hg' | grep -v "committing subrepository" || true
$ hg push $ hg push
pushing to $TESTTMP/gitrepo1 pushing to $TESTTMP/gitrepo1
searching for changes searching for changes
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
160000 commit aabf7cd015089aff0b84596e69aa37b24a3d090a xyz/subrepo2 160000 commit aabf7cd015089aff0b84596e69aa37b24a3d090a xyz/subrepo2
bring working copy to HEAD state (it's not bare repo) bring working copy to HEAD state (it's not bare repo)
$ git reset --hard $ git reset --hard
HEAD is now at ae335e3 Update subrepo2 from hg HEAD is now at 275b0a5 Update subrepo2 from hg
$ cd .. $ cd ..
3. Check .hgsub and .hgsubstate from git repository are merged, not overwritten 3. Check .hgsub and .hgsubstate from git repository are merged, not overwritten
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
$ hg add delta $ hg add delta
$ fn_hg_commit -m "add delta" $ fn_hg_commit -m "add delta"
$ echo "`hg tip --template '{node}'` hgsub" > ../gitrepo1/.hgsubstate $ echo "`hg tip --template '{node}'` hgsub" > ../gitrepo1/.hgsubstate
$ echo "hgsub = $(pwd)" > ../gitrepo1/.hgsub $ echo "hgsub = ../hgsub" > ../gitrepo1/.hgsub
$ cd ../gitrepo1 $ cd ../gitrepo1
$ git add .hgsubstate .hgsub $ git add .hgsubstate .hgsub
$ fn_git_commit -m "Test3. Prepare .hgsub and .hgsubstate sources" $ fn_git_commit -m "Test3. Prepare .hgsub and .hgsubstate sources"
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
2 files updated, 0 files merged, 0 files removed, 0 files unresolved 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd .. $ cd ..
pull shall bring .hgsub entry which was added to the git repo pull shall bring .hgsub entry which was added to the git repo
$ cat hgrepo/.hgsub | sort $ cat hgrepo/.hgsub
hgsub = $TESTTMP/hgsub hgsub = ../hgsub
subrepo1 = [git]../gitsubrepo subrepo1 = [git]../gitsubrepo
xyz/subrepo2 = [git]../gitsubrepo xyz/subrepo2 = [git]../gitsubrepo
.hgsubstate shall list revision of the subrepo added through git repo .hgsubstate shall list revision of the subrepo added through git repo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment