mercurial

How to rebase in tortoisehg?

本小妞迷上赌 提交于 2020-04-14 03:57:19
问题 Often after committing changes, I do a pull, before pushing my changes, and someone has already committed changes. I could do another (merge) commit, but where possible I like to maintain linear history, as it makes things a bit easier to read. So how does one rebase a changeset using tortoisehg, without resorting to using the command line? 回答1: First enable rebase: File -> Settings -> Extensions Then (after restarting tortoisehg) Update to the changeset you want to rebase on to. Right click

SourceTree 3.1.3安装时跳过注册方法:非企业版本方法

做~自己de王妃 提交于 2020-04-12 11:41:02
经过测试能过滤掉3.X版本的注册问题 SourceTree 3.1.3 安装时跳过注册方法 SourceTree 3.1.3 版本跳过bitbucket注册方法,而不是网上所谓的SourcetreeEnterprise跳过bitbucket注册方法。 首先下载并安装好git程序。 接着下载并执行SourceTreeSetup-3.1.3.exe,会进入登录或注册bitbucket的界面。 我只是想用软件,并不想去注册账号。怎么办?请往下看。 关闭上述安装窗口,打开 %LocalAppData%\Atlassian\SourceTree 目录,创建并修改 accounts.json 文件,内容如下: [ { "$id": "1", "$type": "SourceTree.Api.Host.Identity.Model.IdentityAccount, SourceTree.Api.Host.Identity", "Authenticate": true, "HostInstance": { "$id": "2", "$type": "SourceTree.Host.Atlassianaccount.AtlassianAccountInstance, SourceTree.Host.AtlassianAccount", "Host": { "$id": "3", "$type":

“ERROR:root:code for hash md5 was not found” when using any hg mercurial commands

送分小仙女□ 提交于 2020-03-31 05:41:50
问题 When trying to use any hg Mercurial commands on the console, I keep getting this error. I installed Python using Homebrew and I am running Mac OS Catalina v. 10.15.1. Any reference would be appreciated. Here is the error I'm getting: hg commit --amend ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/local/Cellar/python@2/2.7.15_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get

hg forget和hg remove有什么区别?

混江龙づ霸主 提交于 2020-03-20 20:32:14
3 月,跳不动了?>>> 我希望mercurial从存储库的当前状态中删除多个文件。 但是,我希望文件存在于以前的历史记录中。 如何 forget 和 remove 不同,他们可以做我想要的吗? #1楼 从文档中,您显然可以使用任一命令将文件保留在项目历史记录中。 看起来你想删除,因为它也从工作目录中删除文件。 来自 http://hgbook.red-bean.com/read/上 的Mercurial书: 删除文件不会影响其历史记录。 重要的是要理解删除文件只有两个效果。 它从工作目录中删除当前版本的文件。 它阻止Mercurial从下次提交时开始跟踪对文件的更改。 删除文件不会以任何方式改变文件的历史记录。 手册页hg(1)说这是关于忘记: 标记指定的文件,以便在下次提交后不再跟踪它们。 这仅从当前分支中删除文件,而不是从整个项目历史记录中删除文件,并且不会从工作目录中删除它们。 这个关于删除: 安排指定的文件以从存储库中删除。 这仅从当前分支中删除文件,而不是从整个项目历史记录中删除。 #2楼 ' hg forget '只是' hg remove -Af '的缩写。 来自' hg remove '帮助: ...和-Af可用于从下一版本中删除文件而不从工作目录中删除它们。 底线:' remove '从磁盘上的工作副本中删除文件(除非您使用 -Af ),' forget '不会

Is it possible to turn off keyword substitution for 'svn export'?

时光毁灭记忆、已成空白 提交于 2020-02-28 02:09:23
问题 I would like to use svn export to export a bunch of files out of a Subversion repository. And I also wish to forgo keyword expansion on any of the keywords found in these files regardless of the svn:keywords property on this file. Is there a way to do this? I'm doing this because I want to compare the files in the repository against a set of those same files that are not in the repository and have unexpanded keywords. A long long time ago I had a repository in CVS. A long time ago I did a

悼 @宏哥

人盡茶涼 提交于 2020-02-26 17:11:41
今天我在大巴车上听到 @宏哥 走了的噩耗,2020年1月16日21时。大概是因为创业失败之事,顿时哽噎。 而后我的脑袋里就冒出和 @宏哥 这么多年来一些如白开水般的画面。 宏哥在 2010 年注册成为开源中国社区会员,他一直以言辞犀利,观点鲜明,积极活跃的风格混迹在 OSC 的每个角落。大家可能最有印象的是他坚定不移、十年如一日的喷 Java 、喷 MySQL ,喷各种他觉得该喷的技术。正因为这样,他惹恼了社区里这些技术的很多拥趸们,其中也包括我在内。作为一个“站长”,我更多只能劝其收敛,甚至曾因为他的几次言辞激烈而把他的账号关禁闭一段时间。有时候实在忍不住,我也曾开小号跟他互怼,不可开交,不亦乐乎。 一度有人认为宏哥是我搞出来的小号用来活跃气氛的。 很多人跟他对着呛,对社区影响真的挺不好的,所以忘了是哪一年,我主动示好,想邀请他来参加源创会晚宴,那时候他在上海。可能是因为我当时站长的身份对他真的不够友好,所以宏哥拒绝了。也是在那个时间加了微信,然后每次到上海办源创会,我都会邀请他来参加,都没有来。 好像是第四次邀请的时候,跟我说他开始创业了,并从上海搬去了杭州。于是我和宏哥的第一次见面就在杭州源创会的晚宴上,可是我已经具体忘了是哪一年了,得有好几年了。那是我印象非常深刻的一次源创会晚宴。 宏哥完全与我根据他在网站上表现所勾画出的脑海那个模样不一样,而且居然是我的福建老乡

如何克隆具有特定修订/变更集的git存储库?

半城伤御伤魂 提交于 2020-02-25 19:17:08
如何克隆具有特定修订版的git存储库,就像我通常在Mercurial中所做的那样: hg clone -r 3 /path/to/repository #1楼 $ git clone $URL $ cd $PROJECT_NAME $ git reset --hard $SHA1 再次回到最近的提交 $ git pull #2楼 您可以简单地使用 git checkout <commit hash> 按此顺序 bash git clone [URLTORepository] git checkout [commithash] 提交哈希看起来像这样“ 45ef55ac20ce2389c9180658fdba35f4a663d204” #3楼 TL; DR-只需针对要克隆的提交在源存储库中创建一个标签,然后在fetch命令中使用该标签。 您可以稍后从原始存储库中删除标签以进行清理。 好吧,它的2014年,以及查尔斯·贝利(Charles Bailey)从2010年开始接受的答案,现在看来已经完全过时了,其他大多数(所有?)答案都涉及克隆,这是许多人希望避免的。 以下解决方案实现了OP及其它许多人正在寻找的解决方案,这是一种创建存储库副本的方法,包括历史记录,但仅限于一定的提交。 以下是我在git版本2.1.2中使用的命令,用于将本地存储库(即另一个目录中的存储库)克隆到特定点: #

How to find all changsets where a reference to a function was modified?

a 夏天 提交于 2020-02-22 03:55:10
问题 I need to find all recent changes to our code that are related to the Save() method. I need a mercurial command to find every changeset/files in which a line that refers to the string "Save();" was added or modified. I need more that just the changesets, I need to review the files where the changes where made. 回答1: It seems like you're looking for something like hg grep --all 'Save();' That should give you every file change in the format <file path>:<revision>:+ or -:<line of code changed>

How do I do a pristine checkout with mercurial?

♀尐吖头ヾ 提交于 2020-02-03 12:43:45
问题 How do I get the working directory state back to what it would have been from a new clone of the repository (Obviously I could clone my repository, but that seems a bit savage.) With git I'd do: git clean -xdn (dry-run, to see what I'm about to destroy) git clean -xdf (force, to actually do it) And I'm assuming that there's probably a subtly different mercurial equivalent, but I can't find it. 回答1: Your git clean command remove untracked files from the working tree, including ignored files.

Version-controlling zipped files (docx, odt)

感情迁移 提交于 2020-01-30 16:26:38
问题 There are formats that are actually zip files in disguise, e.g. docx or odt. If I store them directly in version control, they are handled as binary files. My ideal solution would be have a hook that creates a foo.docx/ directory for each foo.docx files before commit, unzipping all files into it optionally, have a hook that reindents the xml files have a hook that recreates foo.docx from the stored files after update I don't want the docx files themselves to be version-controlled. (I am aware