Patchwork [15,of,20] mq: directly use repo.vfs.join

login
register
mail settings
Submitter Pierre-Yves David
Date March 12, 2017, 2:45 p.m.
Message ID <70f3c8089b655f927eca.1489329949@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19160/
State Accepted
Headers show

Comments

Pierre-Yves David - March 12, 2017, 2:45 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1489020736 28800
#      Wed Mar 08 16:52:16 2017 -0800
# Node ID 70f3c8089b655f927ecae985e1633835c83bcdb8
# Parent  e8bd0e7c33ae6744f72c0c8fdf5788275355194d
# EXP-Topic vfs.cleanup
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 70f3c8089b65
mq: directly use repo.vfs.join

The 'repo.join' method is about to be deprecated.

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2920,7 +2920,7 @@  def push(ui, repo, patch=None, **opts):
     opts = fixkeepchangesopts(ui, opts)
     if opts.get('merge'):
         if opts.get('name'):
-            newpath = repo.join(opts.get('name'))
+            newpath = repo.vfs.join(opts.get('name'))
         else:
             newpath, i = lastsavename(q.path)
         if not newpath:
@@ -2960,7 +2960,7 @@  def pop(ui, repo, patch=None, **opts):
     opts = fixkeepchangesopts(ui, opts)
     localupdate = True
     if opts.get('name'):
-        q = queue(ui, repo.baseui, repo.path, repo.join(opts.get('name')))
+        q = queue(ui, repo.baseui, repo.path, repo.vfs.join(opts.get('name')))
         ui.warn(_('using patch queue: %s\n') % q.path)
         localupdate = False
     else:
@@ -3314,9 +3314,9 @@  def qqueue(ui, repo, name=None, **opts):
 
     def _queuedir(name):
         if name == 'patches':
-            return repo.join('patches')
+            return repo.vfs.join('patches')
         else:
-            return repo.join('patches-' + name)
+            return repo.vfs.join('patches-' + name)
 
     def _validname(name):
         for n in name:
@@ -3339,7 +3339,8 @@  def qqueue(ui, repo, name=None, **opts):
                 continue
             fh.write('%s\n' % (queue,))
         fh.close()
-        util.rename(repo.join('patches.queues.new'), repo.join(_allqueues))
+        util.rename(repo.vfs.join('patches.queues.new'),
+                    repo.vfs.join(_allqueues))
 
     if not name or opts.get('list') or opts.get('active'):
         current = _getcurrent()
@@ -3392,7 +3393,8 @@  def qqueue(ui, repo, name=None, **opts):
                 else:
                     fh.write('%s\n' % (queue,))
             fh.close()
-            util.rename(repo.join('patches.queues.new'), repo.join(_allqueues))
+            util.rename(repo.vfs.join('patches.queues.new'),
+                        repo.vfs.join(_allqueues))
             _setactivenocheck(name)
         elif opts.get('delete'):
             _delete(name)