开发者

Is there a way for Bazaar to automatically detect and apply changes made in a working directory?

Is there a way for Bazaar to be able to automatically detect changes (adds, removes, renames, etc.) made to part of the working directory and automatically apply them?

I have a directory tree in my repository which is generated by another process so I can't do all the bzr add, bzr delete开发者_开发百科, and bzr rename commands as the files are changing. Instead, I would like a way to have bzr notice all the changes and apply them after this process is run.

The only way I can think of doing this right now is running bzr status and then manually (or by writing a script) run bzr add and bzr delete on all the files listed. This will work but I am hoping there is an automated method that could also determine if a file was renamed (an added file has the same contents of a delete file).


You don't need to explicitly mark files as deleted. And bzr can detect renames (either with automv plugin or with builtin functionality):

bzr mv --auto

Note that if you moved the files to a new folder that you just created, you have to version it, but without adding its children (--no-recurse), othervise mv --auto might fail to detect renames:

bzr add --no-recurse newfolder

Then you need to add all files which are not part of renames:

bzr add subdir/


Could you just call bzr add * at the end of the process? Your subsequent commit should take care of all additions and removals. This will not detect if a file was renamed/moved by some process other than bzr mv (and I am unaware of any way to do so).


It looks like the automv plug-in will automatically detect renames and moves. This, along with bzr add * should do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜