mercurial

How to get a list of the latest revision number for each file in a Mercurial repository?

半腔热情 提交于 2019-12-23 09:19:51
问题 I have made a build system for my web application that's rewriting all resource url's to include the file's revision number (to improve client caching). As of today I'm running this command for each file to get the revision number: hg log --template '{rev}\n' path-to-file Executing hg for each file is really time consuming. Is there a fast way to list all files in a repository with the latest revision number? 回答1: This will do it, but please see my comment above as to why using this anywhere

Do I have to 'git add' a file each time it gets committed?

故事扮演 提交于 2019-12-23 08:38:52
问题 I've used Mercurial before but plan on switching to Git in the near future. All of the tutorials I've seen that explain how Git works show that files are added to the stage ('git add') before each commit, regardless of whether they have been tracked before. Mercurial also has a command that works in a similar way ('hg add'), but from what I remember, you only need to do 'add' once. For example, the steps for a new repository look something like this: hg init hg add . hg commit "Initial commit

what does 'skipping ancestor revision' mean when using 'graft'?

时间秒杀一切 提交于 2019-12-23 08:38:27
问题 I'm using the graft command to pull 4 changesets from a BranchA into BranchB. When I do, some are grafted and some are not: PS D:\Dev\ProjectAlpha> hg graft 5f403abb2b24 skipping ancestor revision 15911 PS D:\Dev\ProjectAlpha> hg graft 535ff712c5a3 grafting revision 15925 PS D:\Dev\ProjectAlpha> hg graft cf42b7113e02 grafting revision 15931 PS D:\Dev\ProjectAlpha> hg graft 6920922ee602 skipping ancestor revision 15910 I can't find anything documented that explains this. I can find the source,

How to auto-merge 2 heads with mercurial

末鹿安然 提交于 2019-12-23 08:28:31
问题 We just changed over to mercurial from subversion and there is one thing that is taking up more time than expected; merging heads. We love the fact that it keeps merges independent from the 2 commits (compared to subversion) but we end up on a regular basis merging 2 heads for unrelated changes. Simple scenario. Both me and Bob are up to date. We both have ou repo up to date on default (aka main) branch and do improvement in different files. We commit and only one will be able to push to the

How to auto-merge 2 heads with mercurial

风流意气都作罢 提交于 2019-12-23 08:28:28
问题 We just changed over to mercurial from subversion and there is one thing that is taking up more time than expected; merging heads. We love the fact that it keeps merges independent from the 2 commits (compared to subversion) but we end up on a regular basis merging 2 heads for unrelated changes. Simple scenario. Both me and Bob are up to date. We both have ou repo up to date on default (aka main) branch and do improvement in different files. We commit and only one will be able to push to the

Convert cvs to mercurial

自闭症网瘾萝莉.ら 提交于 2019-12-23 08:00:43
问题 I'm trying to convert a CVS repository to mercurial but can't get it to work. I start with a clean checkout: cvs -d :sspi;username=xxx;hostname=yyy.local:/cvsrepos checkout repo Which works fine I then do: hg convert . But it fails with: assuming destination .-hg initializing destination .-hg repository connecting to :sspi;username=xxx;hostname=yyy.local:/cvsrepos abort: unexpected response from CVS server (expected "Valid-requests", but got 'E cvs [server aborted]: Root :sspi;username=xxx

Can I move my Mercurial working directory to another location?

百般思念 提交于 2019-12-23 07:55:58
问题 I am new to Mercurial and version control in general, so I'm sure this is a pretty basic question but I have, as yet, been unable to find the answer. I am working on a small project which is under Mercurial version control. The project and the .hg repository are currently on my local drive (C:\MyProject.hg), however I would like to move the whole lot to another location (in this case a network drive) which is backed up every night. I would want this new location to become my working directory

Mercurial and SVN side by side in same working directory?

隐身守侯 提交于 2019-12-23 07:51:37
问题 Our environment currently uses SVN. I would like to commit alot more often, but I don't want to break any of the main branches. Personally I love mercurial much much more than SVN. If I hg init a repository in my SVN working copy would any issues arise if I just commit into the mercurial repository on a regular basis and committed working revisions into the SVN branch? Our environment is not currently setup such that each developer has their own SVN branch, and so this is not a viable

Uninstall Mercurial on a Mac

試著忘記壹切 提交于 2019-12-23 07:48:34
问题 I installed Mercurial, only to realize that it's not supported yet with MonoDevelop, and then realized that I have no clue how to properly uninstall it. I've googled around and can't find anything to support uninstalling it. 回答1: MonoDevelop's support for version control is lagging, and only basic support for Git will be added in version 2.6. I would suggest keeping Hg installed and use the command line. You shouldn't dismiss using a great DVCS just because your IDE doesn't integrate with it.

Mercurial gives “invalid pattern” error for simple GLOB syntax

一个人想着一个人 提交于 2019-12-23 07:47:22
问题 I have the following in my .hgignore file: syntax: glob obj/* bin/* *.suo *.user *.ncb If I comment out the *. filters, the filtering works fine filtering out the files in the bin and obj folder, however, if I keep those filters in I receive the following error: abort: c:\temp\.hgignore: invalid pattern (relre): *.suo Note: The file is encoded in UTF-8 回答1: The error message from Mercurial tells us that your syntax: glob line is not read by Mercurial. Patterns in ignore files default to