mercurial-subrepos

Mercurial: Windows script to add subrepository automatically

这一生的挚爱 提交于 2019-12-05 06:11:17
RyanWilcox had posted a script at here , that can use the following command to add subrepository automatically: $ cd $TOP_OF_HG_PROJECT $ addsubrepo.sh $URL_TO_HG_PROJECT relative_path/you/want_to/put_the_subrepo How to translate it into Windows batch or powershell script? Here is a quick and dirty translation. Haven't tested as I got no Mercury around. The initial script seems to be easy enough to translate into Powershell. # Project and relative paths as script parameters param([string]$project, [string]$relPath) # Let's see if there is an item .hg. If not, report error and quit if((test

Migrate SVN to HG, splitting it into subrepos in the way (but keeping combined log)

佐手、 提交于 2019-12-04 19:52:00
I have an SVN repository which contains a number of loosely-related subfolders in its trunk. I would like to convert it into HG repository, turning each of these subfolders into a separate HG subrepo. At the same time, I would like to access combined change log of all subrepos in the top level repo. So I created an empty HG repo, some empty subrepos, linked their names and locations by .hgsub , checked that I can clone this repo together wth its subrepos to another comp ... Then I tried to make partial SVN clones to subrepos (specifying SVN URL with .../trunk/subfolder for each subrepo). But

How to fix a Mercurial repo that fails updating because points to missing revision in subrepo?

混江龙づ霸主 提交于 2019-12-03 17:48:01
问题 Our mercurial repository gets stuck when trying to update to an old branch which has a subrepo / revision pair that doesn't exist anymore. abort: unknown revision '22e9bb6a6cd98be85b995f632b2f72d6298f9354'! Is there any way to tell Mercurial to update to a revision or branch but not attempt to update the subrepos? 回答1: Does the subrepo still exist somewhere else? You can change the pointer to it using the [subpaths] section, which provides a translation layer atop the locations in .hgsub . If

How to fix a Mercurial repo that fails updating because points to missing revision in subrepo?

自古美人都是妖i 提交于 2019-12-03 06:36:54
Our mercurial repository gets stuck when trying to update to an old branch which has a subrepo / revision pair that doesn't exist anymore. abort: unknown revision '22e9bb6a6cd98be85b995f632b2f72d6298f9354'! Is there any way to tell Mercurial to update to a revision or branch but not attempt to update the subrepos? Does the subrepo still exist somewhere else? You can change the pointer to it using the [subpaths] section, which provides a translation layer atop the locations in .hgsub . If it really doesn't exist anywhere you could so some deep magic like: hg debugsetparent REVISION_YOU_WANT cat

Mercurial (hg) update error, abort: No such file or directory

混江龙づ霸主 提交于 2019-12-01 21:32:05
问题 I am unable to update mercurial repos on my machine. I get the following error when I do an update hg up --traceback : Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 679, in _dispatch cmdpats, cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 454, in runcommand ret = _runcommand(ui, options, cmd, d)

Mercurial (hg) update error, abort: No such file or directory

99封情书 提交于 2019-12-01 20:45:06
I am unable to update mercurial repos on my machine. I get the following error when I do an update hg up --traceback : Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 679, in _dispatch cmdpats, cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 454, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 733, in _runcommand return checkargs()

Mercurial subrepository from a non-nested / sibling directory?

落爺英雄遲暮 提交于 2019-12-01 09:50:27
问题 Is it possible to create a subrepository using a sibling path? Subversion is our "chosen" VCS here, but I've already had quite a few issues with out of date commits. It's much more convenient for me to dual version my files under Hg and SVN, and I have had great success with it. However, I've got a few other co-workers using Hg, and we've had no problems there except for one they probably haven't noticed. Our SVN layout looks like this Area/ trunk/ Program1/ Program2/ ... Services/

Mercurial Subrepositories: Prevent accidental recursive commits and pushes

假装没事ソ 提交于 2019-11-30 14:40:26
问题 I work on a team where we have a code in a mercurial repository with several subrepositories: main/ main/subrepo1/ main/subrepo1/subrepo2/ The default behavior of Mercurial is that when a hg commit is performed in "main", any outstanding changes in the subrepositories "subrepo1" and "subrepo2" will also be committed. Similarly, when "main" is pushed, any outgoing commits in "subrepo1" and "subrepo2" will also be pushed. We find that people frequently inadvertently commit and push changes in

How to use mercurial subrepos for shared components and dependencies?

China☆狼群 提交于 2019-11-30 12:59:00
We develop .NET Enterprise Software in C#. We are looking to improve our version control system. I have used mercurial before and have been experimenting using it at our company. However, since we develop enterprise products we have a big focus on reusable components or modules. I have been attempting to use mercurial's sub-repos to manage components and dependencies but am having some difficulties. Here are the basic requirements for source control/dependency management: Reusable components Shared by source (for debugging) Have dependencies on 3rd party binaries and other reusable components

Mercurial Subrepositories: Prevent accidental recursive commits and pushes

亡梦爱人 提交于 2019-11-30 11:21:36
I work on a team where we have a code in a mercurial repository with several subrepositories: main/ main/subrepo1/ main/subrepo1/subrepo2/ The default behavior of Mercurial is that when a hg commit is performed in "main", any outstanding changes in the subrepositories "subrepo1" and "subrepo2" will also be committed. Similarly, when "main" is pushed, any outgoing commits in "subrepo1" and "subrepo2" will also be pushed. We find that people frequently inadvertently commit and push changes in their subrepositories (because they forgot they had made changes, and hg status by default does not show