There's a lot of questions about bookmarks but none of them answers my question:
What should I do to allow for creating bookmarks while pushing to my hgweb server?
Here's what I'm getting while trying to push bookmark:
$ hg push -B feature1
pushing to http://local_server/hg/Project
searching for changes
no changes found
exporting bookmark feature1
updating bookmark feature1 failed!
Is there anything I should put into .hgrc or in hgweb config?
When bookmarks already exist in remote repo then they are updated, also creating bookmarks by push works on bitbucket so I'm sure it's possible.
Problem solved:
In system there were two Mercurial versions installed:
/usr/bin/hg == v1.4
/usr/local/bin/hg == v2.2
Although wchich hg prints /usr/local/bin/hg nginx was using /usr/bin/hg.
Thank you for your help.
Problem solved:
In system there were two Mercurial versions installed:
/usr/bin/hg == v1.4
/usr/local/bin/hg == v2.2
Although which hg shows /usr/local/bin/hg nginx was using /usr/bin/hg.
Related
I'm trying to do a hg clone on an Internet facing machine for later use on an offline build machine. Unfortunately mercurial is 3.9.1 on the Internet machine, but 1.4 on the offline machine.
I get the error abort: requirement 'generaldelta' not supported! and also abort: requirement 'dotencode' not supported!
I found this is becuase generaldelta feature was added in 1.9, and dotencode in 1.7. I've used instructions from the MissingRequirement wiki page to downgrade this repo using the following.
hg clone -U --config format.generaldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar
However the new repo at /tmp/bar still uses generaldelta, although dotencode require has gone. i.e.
cat /tmp/bar/.hg/requires
fncache
generaldelta <=== still there
revlogv1
store
store
How can I rewrite the repo with both generaldelta and dotencode disabled?
The config option should have been format.usegeneraldelta not format.generaldelta. i.e.
hg clone -U --config format.usegeneraldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar
Note the config. options are all config.use<feature-name> apart from config.dotencode see Mercurial format options. Beware as there is not any error checking either.
I am familiar with TFS and Vault, but having just started using Mercurial I seem to be getting into a bit of a mess.
Heres what I (think) I've done:
-Created a central repository on bitbucket.org
-On my desktop PC, cloned repository from bitbucket, added files, commit them, push them to bitbucket
-On my laptop, cloned repository from bitbucket, pulled files, added more files, commit them, push them to bitbucket
I've continued to add, edit etc on the different computers.
Now I've noticed that some files from each computer are not in the bitbucket repository, and therefore only in the local repository. No amount of pulling and pushing seems to get it into the bitbucket repository.
What is the most likely thing I've done wrong?
Is there a way to 'force' by changes up to the bitbucket repository?
Did they get into your local repository? I suspect not, i.e. they were new files that were not added to the commit. Use hg add to add them to the changeset before committing or whatever the equivalent is for whatever mercurial interface you're using.
Edit:
Here's the help from Mercurial:
C:\Users\Bert>hg add --help
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit. To undo an
add before that, see "hg forget".
If no names are given, add all files to the repository.
...
See Mercurial: The Definitive Guide (a.k.a. the hg "red book") for more info:
http://hgbook.red-bean.com/read/mercurial-in-daily-use.html
Telling Mercurial which files to track
Mercurial does not work with files in your repository unless you tell it to manage them. The hg status command will tell you which files Mercurial doesn't know about; it uses a “?” to display such files.
To tell Mercurial to track a file, use the hg add command. Once you have added a file, the entry in the output of hg status for that file changes from “?” to “A”.
$ hg init add-example
$ cd add-example
$ echo a > myfile.txt
$ hg status
? myfile.txt
$ hg add myfile.txt
$ hg status
A myfile.txt
$ hg commit -m 'Added one file'
$ hg status
use "hg -v help add" to show global options
I'm using "Mercurial Distributed SCM (version 1.1.2)" on my Ubuntu.
I'm new to mercurial, and just created a new project on sourceforge.net.
I added some code files, commited some changes, pulled & pushed.
I created some tags "0.1.1", "0.1.2" and "0.1.3" using "hg tag" and now I want to pack it all in a revision zip file.
A friend sent me a script that automatically picks a name and create the zip file using
hg parent --template "{node|short}\n{latesttag}\n{latesttagdistance}"
I executed this command but the {latesttag} & {latesttagdistance} doesn't seem to work. When I try:
hg log --template "{latesttag}{latesttagdistance}\n"
it just prints a bunch of empty lines.
Does anyone have any suggestions for why the templates don't work? Should I configure something in some hg configuration file? Does it have anything to do with the fact I don't use branches as I'm supposed to?
Any suggestions could help. I am new to mercurial so it's probably something basic that I don't understand.
Mercurial 1.1 is quite old. {latesttag} and {latesttagdistance} are only available since Mercurial 1.4. If you don't want to update Ubuntu (Ubuntu 10.10 comes with Mercurial 1.6), you can use a PPA repository.
If you have a Ubuntu-derivative, you can install the newest version from launchpad:
https://launchpad.net/~mercurial-ppa/+archive/releases
Sometimes I have to return to a really old branch when I depended on a ton of external libraries. Updating to the current branch removes the source files for those dependencies, but the artifacts are left there, as well as a few folders and such.
I would like to have a way to force a mercurial repo to be as if I had just cloned it from the remote (master) repository. I don't want to just nuke my repo and re-clone it, because that forces me to download hundreds of MB from the remote server.
Why don't you clone not from remote server, but from your local repository? After that you could nuke your repo with old untracked files.
hg clone path_to_your_local_repo your_new_repo
After this you could map your new repo to your remote server in hgrc file
You can use the purge extension, or if you are on an UNIX-like system: hg st -nu0 | xargs -0 rm.
I have installed mercurial and review board extension for mercurial on my Windows XP machine. In review board, I have added a repository say "MyRepo" which is on a central server.
I cloned "MyRepo" to my local machine, modified a file for testing and committed to my local repo. I haven't yet pushed it to my central repo.
Now I run "hg postreview" on my cloned local repo. I select "MyRepo" when postreview asks me to choose a repo.
I get a "File not found (207)" error after the command completion. Howver, my review request is uploaded to Review Board server but the diff file is not. Can you tell me what am I doing wrong or is there a patch or command I am not aware of?
I am a novice in DVCS and mercurial, so any help on this matter is really appreciated.
It sounds like you already pushed changes or did more than one commit to the clone (that diffs now more than one commit). Try this and refer to the changeset you created the clone from:
hg postreview -l -o --parent={changeset}
If you wan’t to submit further editings refer to the rewiewid and changeset your first postreview command submitted:
hg postreview -e {reviewid} -o --parent={changeset}