Re: [PATCH v4 14/21] remote-hg: show more proper errors
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- May 27, 2013, 16:30 UTC
- Message-ID
- <CALWbr2wATbq8o4kcdyAq1zt_+fbvyxUQov04xHDTXuoKYecAQw@mail.gmail.com>
- In-Reply-To
- <1365682997-11329-15-git-send-email-felipe.contreras@gmail.com>
Hey Felipe, I know that has been integrated a while ago.
On Thu, Apr 11, 2013 at 2:23 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 16 quoted lines
> When cloning or pushing fails, we don't want to show a stack-trace.
>
> diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
> index ff89725..3ae3598 100755
> --- a/contrib/remote-helpers/git-remote-hg
> +++ b/contrib/remote-helpers/git-remote-hg
> @@ -284,11 +284,17 @@ def get_repo(url, alias):
> else:
> local_path = os.path.join(dirname, 'clone')
> if not os.path.exists(local_path):
> - peer, dstpeer = hg.clone(myui, {}, url, local_path, update=False, pull=True)
> + try:
> + peer, dstpeer = hg.clone(myui, {}, url, local_path, update=True, pull=True)
> + except:
> + die('Repository error')
> repo = dstpeer.local()Can you explain why "update" went from False to True ? That can be a problem if the repository is BIG (two working directories instead of one can raise space issues).
The commit message is not so helpful here ;)