In my project I have install openssh-server in clone image(using qemu) i want to update this change to my master image
Related
I have a repository which will be cloned.
I go to directory of the repository and type the following command to get the branches.
hg branches
As the reuslt I get the
blank 0:4d82003d3fc7
And also I get the size of the repository using
du -sh ./
It prints
312M ./
This repository containes the following.
ls -a
. .. dummy .hg .hglf
Now when I clone it using this command
hg clone /path/libname -r blank
I get the new repository, the size of which is only 52 kbts and it containes
. .. dummy .hg .hglf
I also clone it without -r blank option
hg clone /path/libname
And get the same result. I suppose if repository have 312M size, the cloned repository also should have a comparable size. Where is a problem ?
The original repository has a '.hglf' file. This indicates that (most likely) it uses 'largefiles'. Largefiles are stored on the server, and are only downloaded for a specific revision if you update to that revision. There are a few possibilities:
You are not on a revision that uses largefiles. Update to one that does and you'll see a larger size.
You don't have the 'largefiles extension' enabled. Enable it and try to clone again, you should see a difference. To enable largefiles, add to your .hgrc:
[extensions]
largefiles =
Starting with Mercurial 3.4 (not yet released as of this writing), the largefiles extension will be enabled automatically when cloning a repository with largefiles.
Let's say my development team has a central server where we all clone our repos from, and commit/push back to it.
Now let's say I create a new repo on my desktop, hg init, commit. How can I make this repo on my desktop become the "parent" repo in the central server? I know I can either clone or just copy the repo to the central server. But the key is, without me having to clone that repo to my desktop again? Its really big so that initial clone can take a long time. Isn't there a way I can just edit a file to make my repo think its a clone instead of being the "parent"?
Information from where repository is cloned is written in .hg/hgrc file in your repository.
Create that file (if it does not exist) and add following lines
[paths]
default = https://my.parent.repository
Similary, if you want repository to think it is not clone of any repository, just remove those lines if they exist.
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/localrepo/
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 :
Try to do a hg update in your new clone.
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.
I have two computer : the desktop in my company and the portable computer in my home.
Now I want to use the hg to synchronize the project between them using a "USB removable disk".
So I wonder how to implement it?
THe pro in my desktop is : D:\work\mypro.
I use the following command to init it:
hg init
Then I connect to the USB disk whose volume label is "H",and get a clone using:
cd H:
hg init
hg clone D:\work\mypro mypro-usb
ANd in my portable computer I use:
cd D:
hg clone H:\mypro-usb mypro-home
However I do not know how to do if I modify some files(remove or add and modify) in the mypro-home,how to make the mypro-usb changed synchronizely,also I want the mypro in my desktop synchronizely.
How to do it?
---------------The following is added after I get an answer from richj----------------
to richj:
Thanks for your reply.
The following is my practice: Pro-Com is the project(initialized as a repository) in my desktop, Pro-USB is the repository in my USB, the Pro-Home is the repository in my home computer.
When I make some change in the Pro-Com, I use the following command:
hg add
hg push Pro-USB
Then I change the directory to Pro-USB,using:
hg update
hg push Pro-Home
In my home computer I run:
hg update
(make some edition)
hg commit
hg push Pro-USB
Then the repository in the USB is the same as that of my home computer,I can push it to my desktop.
In my opinion,operation between repository can be done just by "hg push" and "hg pull",the other commands like "hg update" "hg import" just work between a working-copy and its repository.
Is my understanding right?
To push changes from your working repositories back to your USB drive:
hg push
To get the latest changes from your USB drive:
hg pull
hg update
These two commands can be combined together like this:
hg pull -u
If you want to see which change sets are available to be pushed or pulled use:
hg outgoing
hg incoming
respectively. Any changes that you make to your local file system must be committed to the repository using:
hg commit
before they can be pushed or pulled.
Using TortoiseHg Synchronize, clicking "Pull" pulls down the 2nd most recent revision.
At the bottom of the Synchronize interface is a button, "Update to branch tip." Clicking this button pulls down the most recent revision.
What is happening here?
Command line hg tells this:
$ hg help pull
...
Pull changes from a remote repository to a local one.
...
-R is specified). By default, this does not update the copy of the
project in the working directory.
vs.
$ hg help up
...
Update the repository's working directory to the specified
revision, or the tip of the current branch if none is specified.
If you are new to mercurial or want to know you havent missed any options, this is could be helpful:
http://blog.hanxiaogang.com/hg-guide/