From: Antoine Pelisse Date: Tue, 06 Aug 2013 06:53:14 GMT Subject: Re: [PATCH] remote-hg: add shared repo upgrade Message-ID: In-Reply-To: <7vfvuniavq.fsf@alter.siamese.dyndns.org> On Tue, Aug 6, 2013 at 8:36 AM, Junio C Hamano wrote: > Antoine Pelisse writes: > Quoting that part I was asking about again: > >> + # check and upgrade old organization >> + hg_path = os.path.join(shared_path, '.hg') >> + if os.path.exists(shared_path) and not os.path.exists(hg_path): >> + repos = os.listdir(shared_path) >> + for x in repos: >> + local_hg = os.path.join(shared_path, x, 'clone', '.hg') >> + if not os.path.exists(local_hg): >> + continue >> + shutil.copytree(local_hg, hg_path) > > if you can have more than one 'x' such that OK, Sorry for the misunderstanding, I read "at least one", instead of "at most one". Yes, I think "break" is missing right after copytree().