Skip to content

Commit

Permalink
Preparing issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBachmann committed Dec 21, 2017
1 parent a917270 commit 2001603
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Subversion Offline Solution (SOS 1.0.3) #
# Subversion Offline Solution (SOS 1.0.4) #

[![Travis badge](https://travis-ci.org/ArneBachmann/sos.svg?branch=master)](https://travis-ci.org/ArneBachmann/sos)
[![Build status](https://ci.appveyor.com/api/projects/status/fe915rtx02buqe4r?svg=true)](https://ci.appveyor.com/project/ArneBachmann/sos)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os, shutil, subprocess, sys, time, unittest
from setuptools import setup, find_packages

RELEASE = "1.0.3"
RELEASE = "1.0.4"

readmeFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'README.md')
if 'build' in sys.argv:
Expand Down
15 changes: 11 additions & 4 deletions sos/sos.coco
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ def config(argument:str, options:List[str] = []) -> None:
f, g = saveConfig(c)
if f is None: error("Error saving user configuration: %r" % g)

def move(relpath:str, pattern:str, newrelpath:str, newpattern:str, options:List[str] = []) -> None:
pass

def parse(root:str, cwd:str):
''' Main operation. Main has already chdir into VCS root folder, cwd is original working directory for add, rm. '''
debug("Parsing command-line arguments...")
Expand All @@ -775,23 +778,27 @@ def parse(root:str, cwd:str):
options = sys.argv[3:] if command == "config" else [c for c in sys.argv[2:] if c.startswith("--")] # consider second parameter for no-arg command, otherwise from third on
onlys, excps = parseOnlyOptions(cwd, options) # extracts folder-relative information for changes, commit, diff, switch, update
debug("Processing command %r with argument '%s' and options %r." % (command ?? "", argument ?? "", options))
if command[:1] in "ar": relpath, pattern = relativize(root, os.path.join(cwd, argument))
if command[:1] in "amr": relpath, pattern = relativize(root, os.path.join(cwd, argument))
if command[:1] == "m": newrelpath, newpattern = relativize(root, os.path.join(cwd, options[0])) # TODO add error message if target pattern is missing
if command[:1] == "a": add(relpath, pattern, options)
elif command[:1] == "b": branch(argument, options)
elif command[:2] == "ch": changes(argument, options, onlys, excps)
elif command[:3] == "com" or command[:2] == "ci": commit(argument, options, onlys, excps)
elif command[:3] == "com": commit(argument, options, onlys, excps)
elif command[:2] == "ci": commit(argument, options, onlys, excps)
elif command[:3] == 'con': config(argument, options)
elif command[:2] == "de": delete(argument, options)
elif command[:2] == "di": diff(argument, options, onlys, excps)
elif command[:1] == "h": usage()
elif command[:2] == "lo": log(options)
elif command[:2] in ["li", "ls"]: ls(argument)
elif command[:2] == "li": ls(argument)
elif command[:2] == "ls": ls(argument)
elif command[:1] == "m": move(relpath, pattern, newrelpath, newpattern, options[1:])
elif command[:2] == "of": offline(argument, options)
elif command[:2] == "on": online(options)
elif command[:1] == "r": rm(relpath, pattern)
elif command[:2] == "st": status()
elif command[:2] == "sw": switch(argument, options, onlys, excps)
elif command[:2] == "u": update(argument, options, onlys, excps)
elif command[:2] == "u": update(argument, options, onlys, excps)
else: Exit("Unknown command '%s'" % command)
sys.exit(0)

Expand Down

0 comments on commit 2001603

Please sign in to comment.