comparison push_cmd.py @ 241:4950b18cf949

Move fetch_command.fetch_revisions() to svncommands.pull().
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 08 Apr 2009 17:49:30 +0200
parents 33e885f5f86a
children
comparison
equal deleted inserted replaced
240:1aa1d2d406d9 241:4950b18cf949
5 5
6 import util 6 import util
7 import hg_delta_editor 7 import hg_delta_editor
8 import svnexternals 8 import svnexternals
9 import svnwrap 9 import svnwrap
10 import fetch_command 10 import svncommands
11 import utility_commands 11 import utility_commands
12 12
13 13
14 class BaseException(Exception): 14 class BaseException(Exception):
15 pass 15 pass
66 except NoFilesException: 66 except NoFilesException:
67 ui.warn("Could not push revision %s because it had no changes in svn.\n" % 67 ui.warn("Could not push revision %s because it had no changes in svn.\n" %
68 old_ctx) 68 old_ctx)
69 return 1 69 return 1
70 # 3. Fetch revisions from svn 70 # 3. Fetch revisions from svn
71 r = fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, 71 r = svncommands.pull(ui, svn_url, hg_repo_path, stupid=stupid,
72 stupid=stupid, username=user, 72 username=user, password=passwd)
73 password=passwd)
74 assert not r or r == 0 73 assert not r or r == 0
75 # 4. Find the new head of the target branch 74 # 4. Find the new head of the target branch
76 repo = hg.repository(ui, hge.path) 75 repo = hg.repository(ui, hge.path)
77 oldtipctx = repo[oldtip] 76 oldtipctx = repo[oldtip]
78 replacement = [c for c in oldtipctx.children() if c not in old_children 77 replacement = [c for c in oldtipctx.children() if c not in old_children