From users-return-27236-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Sun Jun 24 08:44:39 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A4E83180657 for ; Sun, 24 Jun 2018 08:44:38 +0200 (CEST) Received: (qmail 86177 invoked by uid 500); 24 Jun 2018 06:44:37 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 86161 invoked by uid 99); 24 Jun 2018 06:44:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Jun 2018 06:44:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 67C71CCC0B for ; Sun, 24 Jun 2018 06:44:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 5S35DPYg3nGO for ; Sun, 24 Jun 2018 06:44:35 +0000 (UTC) Received: from einhorn-mail.in-berlin.de (einhorn-mail.in-berlin.de [217.197.80.20]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5DC905F3FF for ; Sun, 24 Jun 2018 06:44:35 +0000 (UTC) X-Envelope-From: stsp@elego.de Received: from ted.stsp.name (ted.stsp.name [217.197.84.34]) by einhorn.in-berlin.de with ESMTP id w5O6i9Um016342 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 24 Jun 2018 08:44:09 +0200 Received: from localhost (ted.stsp.name [local]) by ted.stsp.name (OpenSMTPD) with ESMTPA id f1669e70; Sun, 24 Jun 2018 08:44:08 +0200 (CEST) Date: Sun, 24 Jun 2018 08:44:08 +0200 From: Stefan Sperling To: =?iso-8859-1?Q?Jean-Fran=E7ois?= Doyon , users@subversion.apache.org Subject: Re: svn_client_get_wc_root() issues (Python) Message-ID: <20180624064408.GJ79457@ted.stsp.name> Mail-Followup-To: =?iso-8859-1?Q?Jean-Fran=E7ois?= Doyon , users@subversion.apache.org References: <20180624064007.GI79457@ted.stsp.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180624064007.GI79457@ted.stsp.name> User-Agent: Mutt/1.9.4 (2018-02-28) On Sun, Jun 24, 2018 at 08:40:07AM +0200, Stefan Sperling wrote: > On Sat, Jun 23, 2018 at 10:08:31PM -0400, Jean-Fran�ois Doyon wrote: > > Hi all, > > > > Apparently this function should return the local abs path to the root of > > the WC, given a path to a file/dir within said WC. > > > > It however seems to only work on the root itself, anything below raises an > > error. > > > > Note the first example below works ('content' the root of the WC), and the > > second, for a file within it ('index.html'), fails! > > > > Yes, the WC is clean and in good state, .svn is there, things are > > committed, TortoiseSVN shows the illustrated icons, etc. > > > > libsvn and bindings are directly from VisualSVN, on Windows obviously. > > > > Do I need to setup my context further? Or is this a bug? (Did not see > > anything in the issue tracker) > > Try this: > > >>> from svn import core, client > >>> path = core.svn_dirent_internal_style('D:\\Users\\JF\\Documents\\content') > >>> ctx = client.svn_client_create_context2(None) > >>> wcrootpath = client.svn_client_get_wc_root(path, ctx) Forgot to mention: If your script needs wcrootpath as a windows-style path, the internal style can be converted back like this: >>> wcrootpath = core.svn_dirent_local_style(wcrootpath)