comparison svncommand.py @ 6:1a5bb173170b

Fixes for win32 compatibility. Changes suggested by Shun-ichi GOTO, with some alterations by me.
author Augie Fackler <durin42@gmail.com>
date Thu, 02 Oct 2008 09:13:08 -0500
parents f2636cfed115
children 9c481cae0428
comparison
equal deleted inserted replaced
5:0548662e2f34 6:1a5bb173170b
2 import pickle 2 import pickle
3 import stat 3 import stat
4 4
5 from mercurial import hg 5 from mercurial import hg
6 from mercurial import node 6 from mercurial import node
7 from mercurial import util as merc_util
7 8
8 import svnwrap 9 import svnwrap
9 import hg_delta_editor 10 import hg_delta_editor
10 import util 11 import util
11 from util import register_subcommand, svn_subcommands 12 from util import register_subcommand, svn_subcommands
99 assert repo.status(ignored=True, 100 assert repo.status(ignored=True,
100 unknown=True) == ([], [], [], [], [], [], []) 101 unknown=True) == ([], [], [], [], [], [], [])
101 rev = int(args[0]) 102 rev = int(args[0])
102 wc_path = os.path.dirname(repo.path) 103 wc_path = os.path.dirname(repo.path)
103 svn_url = open(os.path.join(repo.path, 'svn', 'url')).read() 104 svn_url = open(os.path.join(repo.path, 'svn', 'url')).read()
104 svn = svnwrap.SubversionRepo(svn_url) 105 svn = svnwrap.SubversionRepo(svn_url, username=merc_util.getuser())
105 util.wipe_all_files(wc_path) 106 util.wipe_all_files(wc_path)
106 if update(ui, args, repo, clean=True) == 0: 107 if update(ui, args, repo, clean=True) == 0:
107 util.wipe_all_files(wc_path) 108 util.wipe_all_files(wc_path)
108 br = repo.dirstate.branch() 109 br = repo.dirstate.branch()
109 if br == 'default': 110 if br == 'default':