[pacman-dev] [PATCH] makepkg: bzr: update existing sources in srcdir without removing them first.

Allan McRae allan at archlinux.org
Thu Nov 13 07:10:56 UTC 2014


On 09/11/14 19:08, Allan McRae wrote:
> On 01/07/14 19:38, Lukáš Jirkovský wrote:
>> The local changes are discarded when updating. This matches the behaviour
>> when non-VCS sources are used. It also allows incremental builds.
>>
>> This changes semantics a bit. Previously using "bzr revno" would obtain
>> the revision of the working tree. After this change, it is necessary to use
>> "bzr revno --tree" to achieve the same result.
>>
>> The reasoning behind this change is that "bzr pull" that was previously used
>> actually altered the original clone, making it impossible to freely navigate
>> through the history when the internet connection wasn't available.
>>

After spending too much time on this stupid VCS...  this is what I have
figured out that actually works, gives the right 'bzr revno' and does
not alter the original copy.

Download:
bzr branch "$url" "$dir" --no-tree --use-existing-dir

Update:
bzr pull "$url"    (--overwrite ??)

Create local working copy at a given revision:
bzr checkout "$dir" -r "${revision[@]}"

Update local copy to given revision:
bzr pull "$dir" -q --overwrite -r 80
bzr clean-tree -q --detritus --force


I will adjust the patch from Lukáš to use these commands unless someone
tells me that I missed something.

Allan


More information about the pacman-dev mailing list