Pydev and Mercurial

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Apr 30 00:27:53 CDT 2009


On Thu, Apr 30, 2009 at 2:59 AM, Siddharth Kalra <crulshorukh at gmail.com> wrote:
> Hi parren,
> Thanks for the reply. I was looking for a file called proj/hg but I don't
> see any such file in the Mercurial source. The only similar file I could
> find is the proj/mercurial/hg.py file, is that what you meant?
> Also, what do mean by "changing it manually"? Do mean going into
> .metadata/.plugins/org.python.pydev/.launches folder and altering the files
> in there?

When you use the chooser dialog, you can only select *.py files, so
you cannot see the "hg" file. But it's there. You can see it in the
project explorer. To work around this, you just select any *.py file,
for instance mercurial/dispatch.py. When you have selected it, it will
be listed in the "Main Module" text field:

  ${workspace_loc:my-proj/mercurial/dispatch.py}

Now you change this manually - by typing directly into the "Main
Module" field - to:

  ${workspace_loc:my-proj/hg}

> Also, would you mind elaborating a bit on your comment regarding setting up
> an appropriate working dir?

Well, you need to choose the working dir where the repository with
which you want to test hg is (unless you use one of the --cwd or
--repo options).

-parren

>
>
> On Tue, Apr 28, 2009 at 4:01 AM, Peter Arrenbrecht
> <peter.arrenbrecht at gmail.com> wrote:
>>
>> On Tue, Apr 28, 2009 at 5:38 AM, Siddharth Kalra <crulshorukh at gmail.com>
>> wrote:
>> > Greetings,
>> > I've been trying to setup Pydev to work with Mercurial's source so that
>> > I
>> > can debug it. I'm wondering whether somebody has been successful in
>> > doing
>> > that? If the answer is yes, then I'd love to know how they did it.
>> > My problem seems to be that debugging in Pydev requires that you specify
>> > a
>> > python file that is the main module. I'm not sure what the main module
>> > would
>> > be for Mercurial. I've tried looking through the source but haven't been
>> > able to find it. Would anybody know?
>>
>> I do this regularly. Simply choose any .py file (for example,
>> proj/mercurial/dispatch.py) as the debuggee. Then change this manually
>> to just proj/hg. You need to do this manually because PyDev filters
>> files not ending in .py in the select dialog.
>>
>> Also be sure to set an appropriate working dir.
>>
>> -parren
>
>



More information about the Mercurial-devel mailing list