-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #372 from orus-io/hg-cache
hg: Add a cache for mercurial repositories.
- Loading branch information
Showing
7 changed files
with
330 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
``build.sh`` assemble a mercurial repository and more, suitable for testing the hg | ||
fetcher cache feature: | ||
|
||
- A base repository (repo) | ||
- A bundle with an extra changeset | ||
- A json file with the changeset ids we need in the test, and the bundle filename |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
rm -rf build | ||
|
||
mkdir build | ||
cd build | ||
|
||
mkdir repo | ||
cd repo | ||
|
||
hg init . | ||
|
||
echo "content1" > file1.txt | ||
|
||
hg add file1.txt | ||
hg commit -m "Added file1" | ||
CSET1_ID=$(hg id --id) | ||
|
||
hg tag first-tag | ||
hg phase -p | ||
|
||
hg topic "wip" | ||
echo "content2" > file1.txt | ||
hg commit -m "extra cset" | ||
CSETX_ID=$(hg id --id) | ||
|
||
hg strip -r . | ||
|
||
BUNDLE=$(basename .hg/strip-backup/*-backup.hg) | ||
mv .hg/strip-backup/$BUNDLE .. | ||
|
||
hg checkout 00000 | ||
|
||
cd .. | ||
|
||
cat > info.json <<EOF | ||
{ | ||
"initial-changeset": "$CSET1_ID", | ||
"extra-bundle": "$BUNDLE", | ||
"extra-changeset": "$CSETX_ID" | ||
} | ||
EOF | ||
|
||
tar caf ../asset.tgz . |
Oops, something went wrong.