Skip to content

Commit

Permalink
Makes IPC commands less-cryptic.
Browse files Browse the repository at this point in the history
  • Loading branch information
amujumdar committed Oct 11, 2011
1 parent aa67178 commit 4593645
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/scm/adapters/bzrlib/bzrlib_pipe_client.rb
Expand Up @@ -13,14 +13,14 @@ def start
end

def open_repository
send_command("REP_OPEN|#{@repository_url}")
send_command("REPO_OPEN|#{@repository_url}")
end
def cat_file(revision, file)
send_command("CAT_FILE|#{revision}|#{file}")
end

def parent_tokens(revision)
send_command("PAR_TKNS|#{revision}").split('|')
send_command("PARENT_TOKENS|#{revision}").split('|')
end

def send_command(cmd)
Expand Down
4 changes: 2 additions & 2 deletions lib/scm/adapters/bzrlib/bzrlib_pipe_server.py
Expand Up @@ -61,7 +61,7 @@ def exit_delayed(status, delay=1):
def command_loop():
while True:
cmd = Command(sys.stdin.readline())
if cmd.get_action() == 'REP_OPEN':
if cmd.get_action() == 'REPO_OPEN':
commander = BzrPipeServer(cmd.get_arg(1))
send_success()
elif cmd.get_action() == 'CAT_FILE':
Expand All @@ -71,7 +71,7 @@ def command_loop():
else:
send_success(len(content))
send_data(content)
elif cmd.get_action() == 'PAR_TKNS':
elif cmd.get_action() == 'PARENT_TOKENS':
tokens = commander.get_parent_tokens(cmd.get_arg(1))
tokens = '|'.join(tokens)
send_success(len(tokens))
Expand Down

0 comments on commit 4593645

Please sign in to comment.