My favorites | Sign in
Project Home Wiki Issues Source
Checkout   Browse   Changes  
Changes to /wiki/MercurialFAQ.wiki
r455 vs. r456 Compare: vs.  Format:
Revision r456
Go to: 
Project members, sign in to write a code review
/wiki/MercurialFAQ.wiki   r455 /wiki/MercurialFAQ.wiki   r456
1 #summary Frequently asked questions about Mercurial. 1 #summary Frequently asked questions about Mercurial.
2 #labels Mercurial 2 #labels Mercurial
3 3
4 <wiki:toc max_depth="1"/>
5
4 === Why do I get "HTTP Error 405: Method Not Allowed" from the Mercurial client? === 6 === Why do I get "HTTP Error 405: Method Not Allowed" from the Mercurial client? ===
5 7
6 {{{ 8 {{{
7 $ hg push 9 $ hg push
8 pushing to http://... 10 pushing to http://...
9 searching for changes 11 searching for changes
10 abort: HTTP Error 405: Method Not Allowed 12 abort: HTTP Error 405: Method Not Allowed
11 }}} 13 }}}
12 14
13 You must push over *https* rather than *http*, e.g. `hg push https://MYREPO.googlecode.com/hg`. If you clone via *https* initially, then a plain `hg push` will work. 15 You must push over *https* rather than *http*, e.g. `hg push https://MYREPO.googlecode.com/hg`. If you clone via *https* initially, then a plain `hg push` will work.
14 16
15 === How can I avoid typing my password in for each `hg push`? === 17 === How can I avoid typing my password in for each `hg push`? ===
16 18
17 You can enter a default push URL in your `hgrc` configuration file, and include the username and password in the URL. The Mercurial FAQ has an [http://www.selenic.com/mercurial/wiki/FAQ#FAQ.2BAC8-CommonProblems.How_can_I_store_my_HTTP_login_once_and_for_all_.3F entry on this]. If you do this, make sure your `hgrc` isn't readable by others! 19 You can enter a default push URL in your `hgrc` configuration file, and include the username and password in the URL. The Mercurial FAQ has an [http://www.selenic.com/mercurial/wiki/FAQ#FAQ.2BAC8-CommonProblems.How_can_I_store_my_HTTP_login_once_and_for_all_.3F entry on this]. If you do this, make sure your `hgrc` isn't readable by others!
18 20
19 === Why isn't my username/password accepted? === 21 === Why isn't my username/password accepted? ===
20 22
21 If you enter your username as part of the URL, you have to encode the "@" sign as "%40" to avoid confusing Mercurial. If you're on windows, % is an escape character in the command prompt, so you have to encode the "@" sign as "%%40". 23 If you enter your username as part of the URL, you have to encode the "@" sign as "%40" to avoid confusing Mercurial. If you're on windows, % is an escape character in the command prompt, so you have to encode the "@" sign as "%%40".
22 24
23 The above instructions are only relevant to non-gmail users; gmail users can use the username part of their email address, the part preceding the "@" sign, as their Google Code username. 25 The above instructions are only relevant to non-gmail users; gmail users can use the username part of their email address, the part preceding the "@" sign, as their Google Code username.
24 26
25 === How do I reset my repository? === 27 === How do I reset my repository? ===
26 28
27 Project owners can click the "reset" link at the bottom of the checkout page. This is useful if you accidentally committed sensitive information to the repository or if you want to push from an unrelated repository. 29 Project owners can click the "reset" link at the bottom of the checkout page. This is useful if you accidentally committed sensitive information to the repository or if you want to push from an unrelated repository.
28 30
29 === How do I remove sensitive information from my repository? === 31 === How do I remove sensitive information from my repository? ===
30 32
31 There is no way to change the contents of a revision without changing the identifier of that revision and all subsequent ones. So you can't silently change history; the best you can do is convince other project participants to forget about the old revisions and accept your replacement revisions. 33 There is no way to change the contents of a revision without changing the identifier of that revision and all subsequent ones. So you can't silently change history; the best you can do is convince other project participants to forget about the old revisions and accept your replacement revisions.
32 34
33 With those caveats stated, the basic process is to prepare a new repository locally, reset the repository on Google Code, and push your new repository. The following external pages give some pointers on how to prepare a local repository that eliminates a given sensitive revision or file: 35 With those caveats stated, the basic process is to prepare a new repository locally, reset the repository on Google Code, and push your new repository. The following external pages give some pointers on how to prepare a local repository that eliminates a given sensitive revision or file:
34 * http://mercurial.selenic.com/guide/#removing_history (basic procedure) 36 * http://mercurial.selenic.com/guide/#removing_history (basic procedure)
35 * http://mercurial.selenic.com/wiki/EditingHistory (advanced procedure using the "mq" extension) 37 * http://mercurial.selenic.com/wiki/EditingHistory (advanced procedure using the "mq" extension)
36 * http://mercurial.selenic.com/wiki/TransplantExtension (alternative procedure using the "transplant" command) 38 * http://mercurial.selenic.com/wiki/TransplantExtension (alternative procedure using the "transplant" command)
37 39
38 === Why should I create a server-side clone? === 40 === Why should I create a server-side clone? ===
39 41
40 Personal user clones are a copy of a project's repository and can be created by anyone that wants to contribute to a project. They are particularly useful because they do not require the project owner's permission, but confer the same abilities that owners have over the project's repository (e.g. commit, push, etc.). 42 Personal user clones are a copy of a project's repository and can be created by anyone that wants to contribute to a project. They are particularly useful because they do not require the project owner's permission, but confer the same abilities that owners have over the project's repository (e.g. commit, push, etc.).
41 43
42 Personal user clones are also useful for publishing changes to a public location and sharing them with other developers, before they are committed to the main project's repository. Once changes in a user clone have been reviewed, they are usually merged back into the mainline project with the aid of the canonical project's contributors. 44 Personal user clones are also useful for publishing changes to a public location and sharing them with other developers, before they are committed to the main project's repository. Once changes in a user clone have been reviewed, they are usually merged back into the mainline project with the aid of the canonical project's contributors.
43 45
44 User clones aren't forks, in the traditional sense, where a fork has little intention to contribute back to the original project. Rather, the entire purpose of a user clone is to allow users to contribute to projects without requiring official commit access permissions. Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers. 46 User clones aren't forks, in the traditional sense, where a fork has little intention to contribute back to the original project. Rather, the entire purpose of a user clone is to allow users to contribute to projects without requiring official commit access permissions. Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers.
Powered by Google Project Hosting