我在Bitbucket上有一个现有的Django应用程序,我可以部署到Heroku whithhg-git.每当我想在我的app文件夹中运行一些heroku命令时,我会收到以下错误:
$ heroku ps
! No app specified.
! Run this command from an app folder or specify which app to use with --app <app name>
$ heroku logs
! No app specified.
! Run this command from an app folder or specify which app to use with --app <app name>
etc.
Run Code Online (Sandbox Code Playgroud)
目前的解决方法是指定应用程序名称:heroku ps --app <app name>但我正在寻找一种方法将我的存储库名称链接到远程Heroku应用程序名称,就像使用git完成它一样.
我现在无法将我的应用程序移动到github.
我想使用hg-gitpython pip 安装扩展,但我不确定是否应该使用pip(Python2)或pip3(Python3)。
hg version给出这个:
$ hg version
Mercurial Distributed SCM (version 4.8.2)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2018 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Enabled extensions:
fetch internal
graphlog internal
histedit internal
strip internal
mq internal
purge internal
rebase internal
record internal
$
Run Code Online (Sandbox Code Playgroud)
我先尝试了一下pip3 install hg-git,安装后没用。然后我就用了 …
当我处理Git存储库克隆时,远程内容发生了变化:
$ hg push
...
abort: refs/heads/master changed on the server, please pull and merge
before pushing
Run Code Online (Sandbox Code Playgroud)
除了合并以外,我还希望将提交从本地副本推送到其他远程分支。我该怎么做呢?
我有一个跟踪 git 存储库的 Mercurial 存储库。它在 Windows 10 上运行正常。现在我将它作为目录移动到 Mac,然后运行hg reset -Ca只是为了清理它。现在我正在尝试运行hg pull它会导致如下错误:
% hg --traceback --verbose pull 255 ?
pulling from git+https://someserver/somerepo.git
Traceback (most recent call last):
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/scmutil.py", line 154, in callcatch
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/mercurial/dispatch.py", line 314, in _runcatchfunc
.....
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/dulwich/pack.py", line 1004, in __init__
File "/Users/user/.pyenv/versions/2.7.14/lib/python2.7/site-packages/dulwich/file.py", line 90, in GitFile
IOError: [Errno 24] Too many open files: '/Users/user/Projects/somerepo/.hg/git/objects/pack/pack-c03bf69ae597535d876f0dd30ddd6458f2c3f1ff.pack'
abort: Too many open files: /Users/user/Projects/somerepo/.hg/git/objects/pack/pack-c03bf69ae597535d876f0dd30ddd6458f2c3f1ff.pack
Run Code Online (Sandbox Code Playgroud)
我检查了一下,看起来我有最新版本的hg-git和dulwich
dulwich (0.18.6)
hg-git (0.8.10)
Run Code Online (Sandbox Code Playgroud)
Mercurial 也是最新的 …
我想将 mercurial repo 转换为 git repo。其实我做了,但我没有看到分支。转换 repo 后,我只能看到一个分支(作为 master),我看不到任何其他分支,但我可以看到历史(所有更改)是正确的。单击任何提交时,我可以看到以下信息:
Date: 19 Nisan 2019 Cuma 15:14:37
Committer: sevgi.cakmak
Change dialog header
--HG--
branch : sevgi-2.0.0
Run Code Online (Sandbox Code Playgroud)
但我看不到左侧的 sevgi-2.0.0 分支(我正在使用 sourcetree)。
我的步骤:
mercurial.ini 文件:
[extensions]
strip =
histedit =
rebase =
hggit = C:\Users\sevgi.cakmak\Desktop\hg-git\hggit
hgext.bookmarks =
[git]
intree = True
Run Code Online (Sandbox Code Playgroud)
hg bookmark -r 2.0.0 master(也试过这样hg bookmark -r default master:)然后我从 cmd 处理了这一行
hg gexport --debug //this line converting all revision
Run Code Online (Sandbox Code Playgroud)
在这一行工作后,我的输出是这样的:
converting revision a318482e0769e2fceb13a1545cb477d60a00b434
converting revision e444655d161131f9ed1676f6c175813097fd18g8
converting revision 0ab06d22eaf4ff4ecb96caba343fdcc3a85e367k
converting …Run Code Online (Sandbox Code Playgroud) 是否有任何现有工具能够在保留提交哈希的情况下将Merurial存储库导出到git存储库?
我知道hg-git或fast-export.git,但是它们使用新的哈希创建新的提交(而且似乎没有任何选项可以配置它)。我们在Bitbucket上托管了数百个Mercurial存储库,其中包含大量的挂钩,下载链接等,具体取决于确切的哈希值。能够保留哈希值将为我们节省更新所有外部资源所需的大量工作。
我正在使用 hggit 将我们的 mercurial 存储库导出到 git。我正在关注这里的教程:http : //arr.gr/blog/2011/10/bitbucket-converting-hg-repositories-to-git/ 但是这会错过所有未合并到默认值的分支。我想这是因为单个书签(hg bookmark -r default master)。我是否需要分别为每个开放的分支添加书签?hggit 能否以某种方式选择所有打开的分支(因为我们可能有很多分支)?
几年前,Mercurial | TortoiseHG 可以轻松地与至少 2 位“老大哥”进行双向数据交换:
当前(6.0版本家族)状态-普通用户没有:
hgsubversion: 6a6ce9d9da35 2019-04-19(从我的 中提取TortoiseHg\extension-versions.txt),外部 SVN 绑定仅适用于 Python 2.7(而 Mercurial 内的 py3-movement是活跃的)pip不是正确的方式(tm)对于如何做到这一点,是否有任何评论、补充、澄清、建议(如果我所做的事情是错误的)?
经过一些测试后添加:来自 Matt Harbison 的特殊版本tortoisehg-6.0hggit-x64.msi至少允许使用 hg-git 与 ssh-transport (还不是 http),并且可以推荐普通用户日常使用。
hg-git ×9
mercurial ×8
git ×4
python ×2
bitbucket ×1
deployment ×1
django ×1
dulwich ×1
heroku ×1
hgsubversion ×1
macos ×1
tortoisehg ×1