patch

【腾讯Bugly干货分享】Android Patch 方案与持续交付

北慕城南 提交于 2020-10-30 07:47:08
本文来自于 腾讯bugly开发者社区 ,非经作者同意,请勿转载,原文地址: http://dev.qq.com/topic/57a31921ac3a1fb613dd40f3 Android 不仅系统版本众多,机型众多,而且各个市场都各有各的政策和审核速度,每次发布一个版本对于开发同学来讲都是一种漫长的煎熬。相比于 iOS 两三天就能达到 80% 的覆盖速度而言,Android 应用版本升级至少需要两周才能达到 80% 的升级率,严重阻碍了版本迭代速度。也导致 市场上 App 版本分散 ,处理 bug 和投诉等也越来越麻烦。 修复的 bug 需要等待下个版本发布窗口才能发布? 已经 ready 的需求排队上线,需要等待其他 Feature Team 合入代码? 老版本升级速度慢?频繁上线版本提醒用户升级,影响用户体验? 这几个问题是每个 App 开发同学都必然要面对的。那么有没有方法能在用户无感知的情况下 加速 bug 处理和版本迭代速度? 在这方面 PC 端 Chrome 浏览器的 patch 升级方案 给我们了一个很好的借鉴:当 Chrome 有版本升级的时候会自动下载 patch 文件。下次启动后,Chrome 就已经是新版本。 他山之石,可以攻玉 近一两年 Android 热补丁框架非常热门。从最初 360 动态下发 lua 脚本,到后来出现的各种方案,如雨后春笋般出现

Does git apply -p (leading slash removal) not work for renames?

我的梦境 提交于 2020-08-10 20:36:47
问题 Here is a simple diff file from git diff --no-index --no-prefix dir1 dir2 > dir.diff : diff --git dir1/file1.txt dir2/file1.txt index 45b983b..ce01362 100644 --- dir1/file1.txt +++ dir2/file1.txt @@ -1 +1 @@ -hi +hello diff --git dir1/file2.txt dir2/file2_rename.txt similarity index 100% rename from dir1/file2.txt rename to dir2/file2_rename.txt diff --git dir1/file3.txt dir1/file3.txt deleted file mode 100644 index b1a17ba..0000000 --- dir1/file3.txt +++ /dev/null @@ -1 +0,0 @@ -zzz diff -

Does git apply -p (leading slash removal) not work for renames?

老子叫甜甜 提交于 2020-08-10 20:31:36
问题 Here is a simple diff file from git diff --no-index --no-prefix dir1 dir2 > dir.diff : diff --git dir1/file1.txt dir2/file1.txt index 45b983b..ce01362 100644 --- dir1/file1.txt +++ dir2/file1.txt @@ -1 +1 @@ -hi +hello diff --git dir1/file2.txt dir2/file2_rename.txt similarity index 100% rename from dir1/file2.txt rename to dir2/file2_rename.txt diff --git dir1/file3.txt dir1/file3.txt deleted file mode 100644 index b1a17ba..0000000 --- dir1/file3.txt +++ /dev/null @@ -1 +0,0 @@ -zzz diff -

Is it possible to patch a submodule in Git from the parent project?

偶尔善良 提交于 2020-07-27 07:10:47
问题 I have a project main that contains a submodule foo . For this particular project, I would like to make a small change to foo that only applies to this particular project main . main/ + .git + main.c + lib/ | + bar.c + foo/ # My `foo` submodule + .git + config.h # The file I want to patch from `main` + ... A common solution would be to go down to my submodule, make a commit Applied patch for main on a new branch called main-project , then push it. Unfortunately, this is a very bad approach

Why does this patch applied with a fuzz of 1, and fail with fuzz of 0?

笑着哭i 提交于 2020-07-18 05:44:50
问题 $ vim patch Index: toPatch =================================================================== --- toPatch +++ toPatch @@ -2,4 +2,4 @@ */ -final public class XMLWriter { +public class XMLWriter { $ vim toPatch */ final public class XMLWriter { public static float CURRENT_VERSION=2.2f; $ patch -p0 -ui patch patching file toPatch Hunk #1 succeeded at 1 with fuzz 2 (offset -1 lines). Why the fuzz and the line offset? This is a demo case trying to understand diff and patch, since tools sometimes

memory exhausted : for large files using diff

你。 提交于 2020-07-06 09:39:27
问题 I am trying to create a patch using two large size folders (~7GB). Here is how I'm doing it : $ diff -Naurbw . ../other-folder > file.patch But maybe due to file sizes, patch is not getting created and giving an error: diff: memory exhausted I tried making space more than 15 GB but still the issue persists. Could someone help me out with the flags that I should use? 回答1: Recently I came across this too when I needed to diff two large files (>5Gb each). I tried to use 'diff' with different

memory exhausted : for large files using diff

随声附和 提交于 2020-07-06 09:38:41
问题 I am trying to create a patch using two large size folders (~7GB). Here is how I'm doing it : $ diff -Naurbw . ../other-folder > file.patch But maybe due to file sizes, patch is not getting created and giving an error: diff: memory exhausted I tried making space more than 15 GB but still the issue persists. Could someone help me out with the flags that I should use? 回答1: Recently I came across this too when I needed to diff two large files (>5Gb each). I tried to use 'diff' with different

divide NetLogo world into several random parts

狂风中的少年 提交于 2020-04-17 03:24:28
问题 I am trying to create a number of groups of agents on the NetLogo world. I hope each of the groups is located at a specific area without overlap. As I can think of, the easies way to achieve this might be dividing the world into several parts first. Each part consists of a number of patches (say 100 + random 10, which I can set) and is colored with a unique color. Then ask the newly created turtles to move to patches with different colors. Could anybody tell me how to achieve this or give any

Android-分辨率以及dip(dp)、dpi、ppi、px、sp、pt说明

你说的曾经没有我的故事 提交于 2020-04-12 17:43:43
dip(dp): device independent pixels(设备独立像素) dip,就是把屏幕的高分成480分,宽分成320分。比如你做一条160dip的横线,无论你在320还480的模拟器上,都是一半屏的长度。 dpi:dot per inch dpi=(√(横向分辨率^2+纵向分辨率^2))/屏幕尺寸) ppi:pixels per inch(跟dpi一样) 计算了一下小米手机屏幕的PPI,4.0英寸、分辨率854X480,PPI(DPI)   =√(854^2+480^2)/4=244.912……≈245. px:pixel sp: scaled pixels(放大像素), 主要用于字体显示。 pt: point,是一个标准的长度单位, 1pt=1/72英寸,用于印刷业。 平常所说的hdpi等划分方法(按DPI来划分): 关于分辨率适配: 一、细说 layout_weight 目前最为推荐的 Android 多屏幕自适应解决方案。 该属性的作用是决定控件在其父布局中的显示权重,一般用于线性布局中。 其值越小,则对应的layout_width或layout_height的优先级就越高,一般横向布局中,决定的是 layout_width 的优先级;纵向布局中,决定的是 layout_height 的优先级。 传统的 layout_weight 使用方法是将当前控件的