~racb/git-ubuntu:fix-empty-dir-symlink-traversal

Last commit made on 2017-06-21
Get this branch:
git clone -b fix-empty-dir-symlink-traversal https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
fix-empty-dir-symlink-traversal
Repository:
lp:~racb/git-ubuntu

Recent commits

801b71d... by Robie Basak

Fix empty directory handling symlink traversal

Fix the recursion to recurse only down real directories, not symlinks.

A symlink to a directory that has under the target directory an empty
directory fails the assertion in _create_replacement_tree_builder
because the provided entry is not a tree (a symlink entry is a blob).
This is non-sensical; we don't want to follow symlinks while traversing
for empty directories anyway.

Nish discovered this when importing websockify 0.5.1+dfsg1-1.

I had assumed that os.path.isdir() would not match on symlinks to
directories, but it does. Instead, use os.lstat() to check st_mode
directly.

aae07eb... by Robie Basak

Refactor queue sync

This was done in a spike. I don't think it's worth breaking it down for
this early stage script with only one known user (me). The changes
overlay each other significantly and I'm not confident the intermediate
commits are easy to get working anyway.

This adds --no-fetch, --source, --series, --parent, --orphan, --no-trim,
--new and --unapproved to modify the sync subcommand's behaviour. One
can now use this to pull queue tags into any git repository, which is
useful when working with package renames and similar.

I'm not sure it's appropriate for all of this functionality makes sense
to be in a command called "sync" any more; suggestions welcome.

eede33e... by Robie Basak

Add queue sync command

962212e... by Robie Basak

queue: handle KeyError on lookup_reference()

lookup_reference() raises KeyError rather than returning None, so handle
it this way instead.

Also explicitly document this behaviour in GitUbuntuRepository as we
rely on it.

01f294d... by Robie Basak

queue: correctly retrieve series list

We cannot use GitUbuntuSourceInformation because to construct one needs
a source package name, and when we start the loop we do not have one.
However, we do have an lp object and can simply retrieve all current
series names from there.

Further, we do actually want to include the development series, since
NEW packages may need processing from there, so we also drop the
"stable" filter.

24ffb44... by Robie Basak

queue: call fetch_base_remotes correctly

fetch_base_remotes() requires an argument called must_exist, so set it.
For now, we assume must_exist=True. In the future it makes sense for
queue handling to work even without an existing repository, for example
in the case of NEW. But for the moment we can get things working
without.

b0fbf3a... by Nish Aravamudan

snap: add git-{reconstruct,merge}-changelog(s)

LP: #1695552

c915799... by Nish Aravamudan

git ubuntu import: handle importing multiple orig tarballs

gbp-import-orig supports a --component option in 0.8.0 and on (Debian
bug 561071).

Since we now have made orig import failure a hard failure, we will
continue to fail when component tarballs are present but the version of
gbp does not support them.

LP: #1695539

ee3848b... by Nish Aravamudan

git ubuntu import/import-local: print exception message

f438e89... by Nish Aravamudan

git ubuntu import-local: move from --patches-applied to --skip-applied

This matches git ubuntu import.