擅长:python、mysql、java
<p>如果要将文件从本地驱动器克隆到本地驱动器或从本地驱动器克隆到本地驱动器,则这不是您想要的。当我阅读他们的“文档”时,几行没什么,这只是Mercurial的一个小扩展。如果您只想复制一个目录,您应该这样做:</p>
<pre><code>import shutil
shutil.copytree(sour, desti) # copy dirs
# use shutil.copy() to copy files
</code></pre>
<p>为了回答您最初的问题,ui是Mercurial的用户界面类。你知道吗</p>
<blockquote>
<p>Here, ui and repo are the user interface and repository arguments
passed into an extension function as standard (see WritingExtensions
for more details). If you are not calling the Mercurial command
functions from an extension, you will need to create suitable ui and
repo objects yourself. The ui object can be instantiated from the ui
class in mercurial.ui; the repo object can either be a
localrepository, a httprepository, an sshrepository or a
statichttprepository (each defined in their own modules), though it
will most often be a localrepository.</p>
</blockquote>