qclone: add a few comment and blank line
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 18 Jan 2012 17:11:27 +0100
changeset 15921 92e455f2866c
parent 15920 885e0c71db9b
child 15922 23921c17299a
qclone: add a few comment and blank line This help readability.
hgext/mq.py
--- a/hgext/mq.py	Wed Jan 18 17:06:59 2012 +0100
+++ b/hgext/mq.py	Wed Jan 18 17:11:27 2012 +0100
@@ -2055,13 +2055,18 @@
     Return 0 on success.
     '''
     def patchdir(repo):
+        """compute a patch repo url from a repo object"""
         url = repo.url()
         if url.endswith('/'):
             url = url[:-1]
         return url + '/.hg/patches'
+
+    # main repo (destination and sources)
     if dest is None:
         dest = hg.defaultdest(source)
     sr = hg.repository(hg.remoteui(ui, opts), ui.expandpath(source))
+
+    # patches repo (source only)
     if opts.get('patches'):
         patchespath = ui.expandpath(opts.get('patches'))
     else:
@@ -2084,16 +2089,19 @@
             qbase = sr.lookup('qbase')
         except error.RepoError:
             pass
+
     ui.note(_('cloning main repository\n'))
     sr, dr = hg.clone(ui, opts, sr.url(), dest,
                       pull=opts.get('pull'),
                       rev=destrev,
                       update=False,
                       stream=opts.get('uncompressed'))
+
     ui.note(_('cloning patch repository\n'))
     hg.clone(ui, opts, opts.get('patches') or patchdir(sr), patchdir(dr),
              pull=opts.get('pull'), update=not opts.get('noupdate'),
              stream=opts.get('uncompressed'))
+
     if dr.local():
         if qbase:
             ui.note(_('stripping applied patches from destination '