hgrc

How to save username and password with Mercurial?

早过忘川 提交于 2019-12-17 05:16:32
问题 I used Mercurial in a personal project, and I have been typing my username and password every time I want to push something to the server. I tried adding the following to the .hgrc file in my home directory, but it seems to be completely ignored. [ui] username = MY_USER_NAME password = MY_PASSWORD How to do this the right way? 回答1: You can make an auth section in your .hgrc or Mercurial.ini file, like so: [auth] bb.prefix = https://bitbucket.org/repo/path bb.username = foo bb.password = foo

Kallithea does not use hooks defined in .hg/hgrc

青春壹個敷衍的年華 提交于 2019-12-12 03:39:33
问题 I want to allow pushing to the default branch only for certain users. Since Kallithea does not have this functionality built in my attempt was creating a hook that should provide that behavior. I know that Kallithea has a GUI for this but I wanted to use built in mercurial functionality and hgrc file in the repository. I have a hook defined in .hg/hgrc file in a repository that is served through Kallithea SCM [extensions] acl = [hooks] pretxnchangegroup.acl = python:hgext.acl.hook [acl]

Hg (Mercurial SCM) and Notify - How to get project name and edit email subject?

北慕城南 提交于 2019-12-11 16:16:10
问题 I'm using Hg(1.6.4) with Notify extension and I am trying to override the changeset template with project name on email subject. I read the "hg template help" and I not found a specific tag to get the project name. The {webroot} and {root} tags got all path and I wanted PROJECT name only, i.e: /home/USER/repo/PROJECT/rev Is it possible to extract only PROJECT name? Is there any tag or template to parser and to get the project name? 回答1: Uncomment the strip variable in hgrc file #If you want

Cannot commit in mercurial repo

北慕城南 提交于 2019-12-11 06:34:32
问题 I have a Mercuirial (3.6.1) project. Every time I try to commit I get the next error. (project)➜ project hg:(default) ✗ hg commit -m "TICK-190" subfolder/models.py ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] ** Mercurial Distributed SCM (version 3.6.1) ** Extensions loaded: Traceback (most recent call last): File "/home/django/project/bin/hg", line 43, in <module>

Checking hgrc file into Mercurial

我只是一个虾纸丫 提交于 2019-12-10 16:05:31
问题 I have a project using mercurial for version control, SCons to build, and google test to write unit tests. The hgrc file hooks pre-commit and runs SCons to build the project and and run unit tests. Is there a way to "check-in" a portion of the hgrc file so that newly checked out copies, and any merges with my version of the project automatically get an hgrc file that runs SCons when they try to commit? 回答1: You can't get people to automatically have entries in their .hg/hgrc when they clone -

How does one configure mercurial hg to not retain backups by default?

人走茶凉 提交于 2019-12-08 15:53:23
问题 I never use those .orig files, and I hate cleaning them up manually. Is there a way to configure hg revert to use the --no-backups option by default? I can't find it in the Mercurial manual Using a shell alias is possible but isn't desirable. 回答1: You can create an alias in your config file. More details on the config file at http://www.selenic.com/mercurial/hgrc.5.html Read the manual myself, and it looks like its changed somewhat since the last time I read it. I was going to suggest using

Get a 404 Error when clone, pull mercurial repository

北慕城南 提交于 2019-12-05 11:16:21
I have a repository in here http://repos.joomlaguruteam.com/ I using hgweb.cgi this is my hgweb.config file [web] baseurl = #allowpull = true allow_push = * push_ssl = false allow_archive = bz2 gz zip [paths] / = /home/repos/* I can browse it but I can't clone it. Every time I clone it I have this error hg clone http://repos.joomlaguruteam.com/hello destination directory: hello requesting all changes abort: HTTP Error 404: Not Found and the access log have that 115.5.95.59 - - [10/Feb/2011:04:20:33 -0600] "GET /hello?pairs=0000000000000000000000000000000000000000

creating new remote repository for existing project with Mercurial

谁说我不能喝 提交于 2019-12-04 04:47:30
I have a project with version.2 and i have to start working on it to develop a new version.3 . I want to create a new repo on a remote server (i.e. a mercurial-server) so that my team member could access that repo .I have my project file on my local machine . I have two concerned questions : How can I create it in /home/hg/repositories/private/project3 (Lets say new repo name would be project3) of remote mercurial-server with my project files. What steps should I follow to do this. How can I create a access permission (usrname/pword) so that my team will access this repo on http://dev

Load multiple .hgrc files - ie, some with machine-specific settings?

与世无争的帅哥 提交于 2019-12-01 03:12:09
I'd like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with "standard" settings (eg, username ), the other with machine-specific settings (eg, setting a graphical merge tool). How can I do this with hg? For example, this is how I do it with Vim: # ~/.vimrc syntax enable source ~/.vimrc.local Then: # ~/.vimrc.local let work_code = 'code/work/.*' if expand('%:p:h') =~ work_code ... fi There's a not-often used %include directive in mercurial 1.3 and later: From man hgrc : A line of the form %include file will include file into the current configuration file. The inclusion is

Can I set Mercurial config options programmatically?

梦想与她 提交于 2019-11-30 17:58:41
I'm looking for a way to set .hgrc configuration items without actually editing the text file. I'm trying to standardize the setup of the hgrc across multiple developers and I would like a command like hg --config ui.username=foo but which also saves that config change into the hgrc file. It seems like this should be something that should be supported directly in the vanilla hg command, but I can't find it anywhere. Someone -- either you or Mercurial -- will have to edit the configuration file if you want the config change to be saved :-) And if you can call Mercurial with hg --config ui