[PATCH] localrepo: make it possible to pass multiple path elements to join and wjoin

Angel Ezquerra angel.ezquerra at gmail.com
Fri Aug 29 11:07:03 CDT 2014


On Fri, Aug 29, 2014 at 5:54 PM, Kevin Bullock
<kbullock+mercurial at ringworld.org> wrote:
> On Aug 29, 2014, at 5:13 PM, Angel Ezquerra <angel.ezquerra at gmail.com> wrote:
>
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra at gmail.com>
>> # Date 1409239385 -7200
>> #      Thu Aug 28 17:23:05 2014 +0200
>> # Node ID 1ab777ff5c4d58772ad6d849e6d94be1e4314515
>> # Parent  bdc0e04df243d3995c7266bf7d138fddd0449ba6
>> localrepo: make it possible to pass multiple path elements to join and wjoin
>>
>> This makes join and wjoin behave in the same way as os.path.join. That is, it
>> makes it possible to pass more than one path element to them.
>>
>> Note that the first path element is still required, as it was before this patch,
>> and as is the case for os.path.join.
>
> Is there a use case for this? Will anyone use the extra components?

I have a couple of extensions where I do:

repo.join(os.path.join('foo', 'bar', 'baz'))

Also, it seems that it would be nice to have the same behavior as os.path.join.

Cheers,

Angel


More information about the Mercurial-devel mailing list