Permalink
Browse files

Makes IPC commands less-cryptic.

  • Loading branch information...
1 parent aa67178 commit 4593645dec62171061230a00f82aff7ba880270b @amujumdar amujumdar committed Oct 11, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/scm/adapters/bzrlib/bzrlib_pipe_client.rb
  2. +2 −2 lib/scm/adapters/bzrlib/bzrlib_pipe_server.py
@@ -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)
@@ -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':
@@ -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))

0 comments on commit 4593645

Please sign in to comment.