Hello, First time poster to the list, please be gentle! I installed the mercurial bundle from svn and it is a wonderful tool, however some parts do not work correctly. For example, viewing the status of a repo does not work, I get the following error message:
Traceback (most recent call last):
Revert
Diff File "/opt/local/bin/hg", line 12, in ?
Revert
Diff commands.run()
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 3000, in run
Revert
Diff sys.exit(dispatch(sys.argv[1:]))
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 3223, in dispatch
Revert
Diff return d()
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 3182, in <lambda>
Revert
Diff d = lambda: func(u, repo, *args, **cmdoptions)
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/commands.py", line 2371, in status
Revert
Diff files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts)
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 139, in matchpats
Revert
Diff opts.get('exclude'), head)
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/util.py", line 367, in cmdmatcher
Revert
Diff return _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src)
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/util.py", line 454, in _matcher
Revert
Diff name = canonpath(canonroot, cwd, name)
Revert
Diff File "/opt/local/lib/python2.4/site-packages/mercurial/util.py", line 348, in canonpath
Revert
Diff name = os.path.join(*rel) TypeError: join() takes at least 1 argument (0 given)
Any clues?
Thanks, Yi
On 2/14/07, Yi Qiang yqiang@gmail.com wrote:
Hello, First time poster to the list, please be gentle! I installed the mercurial bundle from svn and it is a wonderful tool, however some parts do not work correctly. For example, viewing the status of a repo does not work, I get the following error message:
Traceback (most recent call last):
(...)
I worked on the Mercurial bundle, but I can't see what's wrong by looking at the traceback. Even if Mercurial is written in python, I parse everything in ruby. Maybe not ideal, but it's all I can do.
First a few questions:
Do you have a recent version of Mercurial and is it working fine in the Terminal? Did you install the support folder from svn too? Is the repo local or on a shared volume? What's your system?
According to Yi Qiang:
To: textmate@lists.macromates.com From: Yi Qiang yqiang@gmail.com Date: Tue, 13 Feb 2007 23:00:40 -0800 X-Mailer: Apple Mail (2.752.3) Subject: [TxMt] some parts mercurial bundle does not work for me Reply-To: TextMate users textmate@lists.macromates.com Errors-To: textmate-bounces@lists.macromates.com
Hello, First time poster to the list, please be gentle! I installed the mercurial bundle from svn and it is a wonderful tool, however some parts do not work correctly. For example, viewing the status of a repo does not work, I get the following error message:
Hmmm, the traceback is not really easy to read. Could you please use the paste site from Allan[1] to show us?
What is your version of mercurial? ----- [1] http://pastie.textmate.org/pastes/create
On Feb 14, 2007, at 4:33 AM, Fred B wrote:
On 2/14/07, Yi Qiang yqiang@gmail.com wrote:
Hello, First time poster to the list, please be gentle! I installed the mercurial bundle from svn and it is a wonderful tool, however some parts do not work correctly. For example, viewing the status of a repo does not work, I get the following error message:
Traceback (most recent call last):
(...)
I worked on the Mercurial bundle, but I can't see what's wrong by looking at the traceback. Even if Mercurial is written in python, I parse everything in ruby. Maybe not ideal, but it's all I can do.
I agree, the pasting is terrible from that window.
First a few questions:
Do you have a recent version of Mercurial and is it working fine in the Terminal?
Yes, everything works dandy in the terminal. I am using mercurial 0.9.3, which is AFAIK the latest version.
Did you install the support folder from svn too?
Yes, I followed the instructions from the wiki.
Is the repo local or on a shared volume?
Local
What's your system?
I don't know what that means. I am using a Macbook Pro (C2D).
Here is the "nicer" version of the paste:
http://pastie.textmate.org/40247
From the traceback it looks like it might be a problem with how hg is called, but I am not sure.
Thanks, Yi
On 2/14/07, Yi Qiang yqiang@gmail.com wrote:
What's your system?
I don't know what that means. I am using a Macbook Pro (C2D).
I was asking for the OS X version. Guess it's 10.4.
Here is the "nicer" version of the paste:
http://pastie.textmate.org/40247
From the traceback it looks like it might be a problem with how hg is called, but I am not sure.
I don't understand where is the problem. Maybe a python guru could help us.
The difference I can see between my setup and yours are: - I'm using python 2.3.5. - My Mercurial is in ~/bin and ~/lib/python/.
Could you try to make and run a new command with this:
✂------✂------✂------✂------✂------✂------✂ require_cmd "${TM_HG:=hg}" "If you have installed hg, then you need to either update your <tt>PATH</tt> or set the <tt>TM_HG</tt> shell variable (e.g. in Preferences / Advanced)"
if [[ -d "$TM_PROJECT_DIRECTORY" ]] then export WorkPath="$TM_PROJECT_DIRECTORY"; cd "$TM_PROJECT_DIRECTORY" else export WorkPath="$TM_DIRECTORY"; cd "$TM_DIRECTORY" fi
# show it... "$TM_HG" status --debug "$WorkPath" ✂------✂------✂------✂------✂------✂------✂
Input: none Output: Create new document
This will bypass all the parsing and linking made in the bundle.
On Feb 14, 2007, at 1:53 PM, Fred B wrote:
Could you try to make and run a new command with this:
<snip>
This produces exactly the same error:
Traceback (most recent call last): File "/opt/local/bin/hg", line 12, in ? commands.run() File "/opt/local/lib/python2.4/site-packages/ mercurial/commands.py", line 3000, in run sys.exit(dispatch(sys.argv [1:])) File "/opt/local/lib/python2.4/site-packages/mercurial/ commands.py", line 3223, in dispatch return d() File "/opt/local/lib/ python2.4/site-packages/mercurial/commands.py", line 3182, in d = lambda: func(u, repo, *args, **cmdoptions) File "/opt/local/lib/ python2.4/site-packages/mercurial/commands.py", line 2371, in status files, matchfn, anypats = cmdutil.matchpats(repo, pats, opts) File "/ opt/local/lib/python2.4/site-packages/mercurial/cmdutil.py", line 139, in matchpats opts.get('exclude'), head) File "/opt/local/lib/ python2.4/site-packages/mercurial/util.py", line 367, in cmdmatcher return _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src) File "/opt/local/lib/python2.4/site-packages/mercurial/util.py", line 454, in _matcher name = canonpath(canonroot, cwd, name) File "/opt/ local/lib/python2.4/site-packages/mercurial/util.py", line 348, in canonpath name = os.path.join(*rel) TypeError: join() takes at least 1 argument (0 given)
I think I found the problem though. This works fine:
"$TM_HG" --debug status (versus "$TM_HG" --debug status "$WorkerPath")
i.e. do not pass it $WorkPath. I am not sure why it gets passed anyways since your $PWD is already $WorkPath. It doesn't seem to be necessary, but then again I am quite naive about these things.
Yi
On Feb 14, 2007, at 1:53 PM, Fred B wrote:
I don't understand where is the problem. Maybe a python guru could help us.
Well, not a python guru, but this is apparently a mercurial bug.
http://www.selenic.com/pipermail/mercurial-devel/2006-October/ 000140.html
It has to do with symbolic links, maybe we will get a fix from the mercurial guys soon :)
Yi
On 2/15/07, Yi Qiang yqiang@gmail.com wrote:
On Feb 14, 2007, at 1:53 PM, Fred B wrote:
Could you try to make and run a new command with this:
<snip>
This produces exactly the same error:
(...)
Which means the problem doesn't come from the bundle. Weird you don't get the same error on the CLI... Thinking of it you probably just use "hg status" and not "hg status xxx" in the Terminal.
I think I found the problem though. This works fine:
"$TM_HG" --debug status (versus "$TM_HG" --debug status "$WorkerPath")
i.e. do not pass it $WorkPath. I am not sure why it gets passed anyways since your $PWD is already $WorkPath. It doesn't seem to be necessary, but then again I am quite naive about these things.
You're right, I don't remember why I made it like that... I plan to work on the bundle as soon as I have some time anyway, I'll check this. Glad it's working for you for now. There is not a lot of people using the hg bundle, so it doesn't get much testing beside myself, it would be nice if you could test it when I'll make changes.
Well, not a python guru, but this is apparently a mercurial bug.
http://www.selenic.com/pipermail/mercurial-devel/2006-October/ 000140.html
It has to do with symbolic links, maybe we will get a fix from the mercurial guys soon :)
Nice catch!
On Feb 15, 2007, at 4:16 AM, Fred B wrote:
There is not a lot of people using the hg bundle, so it doesn't get much testing beside myself, it would be nice if you could test it when I'll make changes.
I would be more than happy to :) It's a shame not many people are using it, mercurial is a fantastic scm.
Yi