开发者

I am trying to use mercurial and the perfarce extension to check out and getting an error

开发者 https://www.devze.com 2023-01-10 04:50 出处:网络
I am trying to use the \"Perfarce\" extension to Mercurial to create an hg repository (working copy) that is managed by mercurial, with a link to check out and in to a central perforce server \"depot\

I am trying to use the "Perfarce" extension to Mercurial to create an hg repository (working copy) that is managed by mercurial, with a link to check out and in to a central perforce server "depot".

The help says to enter a command like this:

hg clone p4://hostname:portnumber/userid

When I do this, it creates a folder under my current working directory named with the userid name (so it seems sub-optimal way to pass the user name to the p4 url), and I get this error:

abort: p4: ... - must create client 'userid' to access local files.

The second try fails with destination is not empty error.

I have also tried specifying a destina开发者_JAVA技巧tion:

hg clone p4://hostname:portnumber/userid dest

This doesn't work either -- same error message about creating a client. I don't see a way to tell it about my WORKSPACE, if any, or which depot, on the particular hostname to check out.

I already having a WORKSPACE that p4 and p4v know about, and it's in a different folder than the place where I would like to have my hg+perfarce working copy. I suspect the p4 command line program might be confused by this.

Has anyone gotten the "perfarce" extension working with mercurial? What did you do exactly, and what am I doing wrong, and not understanding?


You must have a Perforce client created when using Perfarce. You then use the specified convention to access the perforce depot. As per Perfarce documentation

hg clone [--startrev REV] [-r REV] [p4://server/clientname] [dest]

Also, make sure you have the destination folder created on your machine. It must be the same as set in the client. If your client spec specifies d:\foo you must run the Perfarce command in d:\ and have an empty foo directory. Not using the optional dest Perfarce creates a directory using the client name.

If your Perforce client is using the default settings and using the read-only flag, you might want to use the MakeWriteable extension.


It looks like you have to type "p4 client", and then edit the resulting file which sets up access to various depots within the p4 server. Then the hg commands will work in this working folder.

Except that it dies with an abort, from p4 client run within the hg clone operation, with a missing file error, each time a different missing file.


I'm new to Perfarce, too, but I've found that I need to use p4 login, even though this is not otherwise required by my P4 server. Perfarce doesn't seem to recognize P4 settings files set up via P4CONFIG.

0

精彩评论

暂无评论...
验证码 换一张
取 消