开发者

how do i setup a local working directory to work with a local repo using Mercurial

开发者 https://www.devze.com 2023-02-14 03:57 出处:网络
Following is the scenario: I have a remote Mercurial repository at ssh://remotehost//dir/repo and I am able to clone it to a local host \"pandora\" in directory /home/user/localrepo/.

Following is the scenario: I have a remote Mercurial repository at ssh://remotehost//dir/repo and I am able to clone it to a local host "pandora" in directory /home/user/localrepo/.

Now, I have a superset of this remote repository, where I add my own testing framework, but do not want to merge to the main depot until I am certain it works. So I clone this "local" repo to /home/user/workingdir/ but when I issue the command to do so

$ hg clone /home/user/local开发者_开发知识库repo/

only the repository folder gets copied none of the files get copied.


I'm not sure what you mean when you say that "only the repo folders gets copied". So there's two things you can try :

  1. Try to do a hg update in your new clone.
  2. List the directory in /home/user/workingdir and if there is a directory name localrepo in it, this is actually your repository. To clone in the current directory, you must do hg clone /home/user/localrepo .


This sounds odd but try a few things:

First in the local repo that you cloned from do a

hg status -A

are all the files that you think should be in there in there? If not are you at the tip of the repo.

You can see what revision you are at with

hg parent

If you want to just go to the tip do hg update

If there still aren't any files listed in the repo do the same to check the one on the server.

If there aren't any files on the server you will need to add all of the files you want mercurial to track, mercurial doesn't automagically start tracking files in the repo location.

(Use hg add --all to add all of the file in the entire directory tree under the repo location.)

If there are files in the local repo, check the testing area and make sure that it is on the proper changeset.

0

精彩评论

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

关注公众号