Mercurial qfold ALL patches?

半世苍凉 提交于 2019-12-10 15:59:47

问题


Turns out there is no hg qfold -a.

I tried hg qfold $(hg qunapp) and hg qunapp | xargs hg qfold but couldn't get it to work. Any ideas?


回答1:


With your xargs approach, did you remember that qfold only folds unapplied patches into an applied patch? This worked for me (Windows) to fold all patches into the first patch:

hg qpop -a    # remove all patches
hg qpush      # apply first one
for /f %i in ('hg qunapplied') do hg qfold %i  # fold remaining patches



回答2:


Hmm... we could add a -a flag... But until we do, I would use the histedit or collapse extensions or maybe just do it myself:

$ hg update qparent
$ hg revert --all --rev qtip
$ hg commit -m 'Everything in one commit'
$ hg qpop -a

You then need to remove the patches -- perhaps you can just remove .hg/patches entirely, or you can delete some of them and edit .hg/patches/series to match.




回答3:


hg qunapp | xargs -I'{}' hg qfold '{}'


来源:https://stackoverflow.com/questions/3715016/mercurial-qfold-all-patches

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!