Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: New svn icon #758

Merged
merged 7 commits into from
Jan 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions bin/create_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash

set -eux

TARGETDIR="$1"
cd "$TARGETDIR"
if [ -e "foo" ] && [ -e "foorepo" ]; then
echo "Repository already exists"
exit 0
fi

SvnCommit() {
local MESSAGE="$1"
local USERNAME=${2:-Alice}
svn ci --username "$USERNAME" -m "$MESSAGE"
}

svnadmin create foorepo
svn co "file://$(readlink -f foorepo)" foo
cd foo

svn mkdir trunk branches tags
SvnCommit 'initial'

( # create project
set -e
cd trunk
cat > Makefile << 'EOF'
.PHONY: libfoo exe
all: exe
libfoo:
$(MAKE) -C libfoo
exe: libfoo
$(MAKE) -C exe
EOF
mkdir libfoo exe
cat > libfoo/Makefile << 'EOF'
all:
cc *.c -o libfoo.so -shared
EOF
echo 'const char* get_foo_string();' > libfoo/libfoo.h
cat > libfoo/libfoo.c << 'EOF'
const char* get_foo_string() {
return "foooooo";
}
EOF
cat > exe/Makefile << 'EOF'
all:
cc *.c -o foo -L ../libfoo/ -lfoo
EOF
cat > exe/foo.c << 'EOF'
#include <stdio.h>
#include "../libfoo/libfoo.h"

int main() {
puts(get_foo_string());
}
EOF
svn add ./*
SvnCommit "$(echo -e 'Project created\nlibrary foo\nand exe')"
)

(
set -e
cd trunk
echo "// dummy comment" >> libfoo/libfoo.c
SvnCommit "add comment" Bob
echo 'const char* get_foo_string();' > libfoo/libfoo.h
cat > libfoo/libfoo.h << 'EOF'
#ifndef LIBFOO
#define LIBFOO
const char* get_foo_string();
#endif
EOF
SvnCommit "fix header" Bob
)

(
set -e
svn cp ^/trunk ^/branches/feature1 -m "create branch"
svn up
cd branches/feature1
echo "// another dummy comment" >> libfoo/libfoo.c
echo "# another dummy comment" >> libfoo/Makefile
SvnCommit "comment" Mark
svn mv exe/foo.c exe/exefoo.c
echo '// edited! ' >> exe/exefoo.c
SvnCommit "rename exe" Mark
)

(
set -e
cd trunk
echo "# Alice's comment" >> exe/Makefile
SvnCommit "comment by Alice"
)

(
set -e
cd branches/feature1
svn up
svn merge ^/trunk
SvnCommit "sync with trunk" Mark
)

(
set -e
cd trunk
svn up
svn merge ^/branches/feature1
SvnCommit "merge feature1 to trunk" Mark
svn rm ^/branches/feature1 -m "rm branch"
)

svn up
57 changes: 29 additions & 28 deletions icons/subversion-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.