Commits

anatoly techtonik committed 441f272

always pass url to run_svn_log, cleanup excess hgpullsvn code

  • Participants
  • Parent commits 6af1c0e

Comments (0)

Files changed (2)

File hgsvn/run/hgpullsvn.py

                "running hgpullsvn.")
         return 1
     svn_wc = "."
-    svn_peg_wc = svn_wc
-    if options.svn_peg:
-       svn_peg_wc += "@" + str(options.svn_peg)
 
     # Get SVN info
     svn_info = get_svn_info('.')
     repos_url = svn_info['repos_url']
     # e.g. u'svn://svn.twistedmatrix.com/svn/Twisted/branches/xmpp-subprotocols-2178-2'
     wc_url = svn_info['url']
-    if options.svn_peg:
-        svn_peg_wc = wc_url + "@" + str(options.svn_peg)
     assert wc_url.startswith(repos_url)
     # e.g. u'/branches/xmpp-subprotocols-2178-2'
     wc_base = wc_url[len(repos_url):]
     # Show incoming changes if in dry-run mode.
     if options.dryrun:
         ui.status("Incoming SVN revisions:")
-        for entry in run_svn_log(svn_peg_wc, next_rev, svn_greatest_rev, 100):
+        for entry in run_svn_log(wc_url, next_rev, svn_greatest_rev, 100):
             if entry["message"]:
                 msg = entry["message"].splitlines()[0].strip()
             else:
         run_hg(["update", "-C", "svn.%d" % current_rev])
 
     # Load SVN log starting from current rev
-    it_log_entries = iter_svn_log_entries(svn_peg_wc, next_rev, svn_greatest_rev, options.svnretry)
+    it_log_entries = iter_svn_log_entries(wc_url, next_rev, svn_greatest_rev, options.svnretry)
 
     try:
         try:

File hgsvn/svnclient.py

     args += [svn_url, checkout_dir]
     return run_svn(svn_checkout_args + args)
 
-def run_svn_log(svn_url_or_wc, rev_start, rev_end, limit, stop_on_copy=False):
+def run_svn_log(svn_url, rev_start, rev_end, limit, stop_on_copy=False):
     """
     Fetch up to 'limit' SVN log entries between the given revisions.
     """
         args = ['--stop-on-copy']
     else:
         args = []
-    args += ['-r', '%s:%s' % (rev_start, rev_end), '--limit', limit, svn_url_or_wc]
+    args += ['-r', '%s:%s' % (rev_start, rev_end), '--limit', limit, svn_url]
     xml_string = run_svn(svn_log_args + args)
     return parse_svn_log_xml(xml_string)