Hello, I'm facing this too.
```d/watch version=4 options=uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a-z/,\ mode=git,gitmode=full,gitexport=all \ https://github.com/bcit-ci/CodeIgniter \ heads/master ``` Upstream's main branch is "develop". uscan takes this one instead of the requested "master" branch ```$ uscan --debug --safe uscan info: uscan (version 2.23.4) See uscan(1) for help uscan info: Scan watch files in . uscan debug: Found ./debian uscan info: Check debian/watch and debian/changelog in . uscan info: package="php-codeigniter-framework" version="0.0~git20230407.63d037565-1" (as seen in debian/changelog) uscan info: package="php-codeigniter-framework" version="0.0~git20230407.63d037565" (no epoch/revision) uscan info: ./debian/changelog sets package="php-codeigniter-framework" version="0.0~git20230407.63d037565" uscan info: Process watch file at: debian/watch package = php-codeigniter-framework version = 0.0~git20230407.63d037565 pkg_dir = . uscan debug: parse line options=uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a- z/,mode=git,gitmode=full,gitexport=all https://github.com/bcit-ci/CodeIgniter heads/master uscan info: opts: uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a- z/,mode=git,gitmode=full,gitexport=all uscan info: line: https://github.com/bcit-ci/CodeIgniter heads/master uscan info: Parsing uversionmangle=s/-?([^\d.]+)/~$1/;tr/A-Z/a-z/ uscan info: Parsing mode=git uscan info: Parsing gitmode=full uscan info: Parsing gitexport=all uscan info: line: https://github.com/bcit-ci/CodeIgniter heads/master uscan debug: $self->{'pgpmode'}=default, $self->{'pgpsigurlmangle'}=undef uscan info: Last orig.tar.* tarball version (from debian/changelog): 0.0~git20230407.63d037565 uscan info: Last orig.tar.* tarball version (dversionmangled): 0.0~git20230407.63d037565 uscan debug: watch file has: $base = https://github.com/bcit-ci/CodeIgniter $filepattern = heads/master $lastversion = 0.0~git20230407.63d037565 $action = mode = git pgpmode = default versionmode = newer $site = https://github.com/bcit-ci/CodeIgniter $basedir = uscan debug: line: search() uscan debug: Execute: git clone --quiet --bare https://github.com/bcit-ci/ CodeIgniter ../php-codeigniter-framework-temporary.2454317.git... uscan info: Looking at $base = https://github.com/bcit-ci/CodeIgniter with $filepattern = heads/master found $newfile = heads/master $newversion = 0.0~git20230407.63d037565 $lastversion = 0.0~git20230407.63d037565 uscan debug: line: get_upstream_url() uscan info: Upstream URL(+tag) to download is identified as https:// github.com/bcit-ci/CodeIgniter heads/master uscan debug: line: get_newfile_base() uscan info: Filename (filenamemangled) for downloaded file: php-codeigniter- framework-0.0~git20230407.63d037565.tar.xz uscan debug: line: cmp_versions() uscan info: Newest version of php-codeigniter-framework on remote site is 0.0~git20230407.63d037565, local version is 0.0~git20230407.63d037565 uscan info: => Package is up to date from: => https://github.com/bcit-ci/CodeIgniter heads/master uscan debug: line: download_file_and_sig() uscan debug: line: mkorigtargz() uscan debug: Keep git repo (../php-codeigniter-framework-temporary. 2454317.git) uscan info: Scan finished ``` Maybe the problem has something to do with this command? Execute: git clone --quiet --bare https://github.com/bcit-ci/CodeIgniter ../ php-codeigniter-framework-temporary.2454317.git... Regards Fab On Wed, 25 Aug 2021 22:15:42 +0200 Romain Porte <deb...@microjoe.org> wrote: > Package: devscripts > Version: 2.21.3 > Severity: important > X-Debbugs-Cc: deb...@microjoe.org > > Dear Maintainer, > > While trying to use uscan to scan for upstream commits on a specific > branch instead of the default on, I tried to use refs/heads/<branch> as > explained in the uscan man page. > > Here is the content of the d/watch file I am using: > > version=4 > opts="mode=git, gitmode=full, pgpmode=none, pretty=8.994+git%cd.%h, repack, compression=xz" \ > https://bitbucket.org/jpcgt/flatcam.git \ > refs/heads/Beta > > However when running uscan, the invocation fails with the following > message: > > uscan info: uscan (version 2.21.3) See uscan(1) for help > uscan info: Scan watch files in . > uscan info: Check debian/watch and debian/changelog in . > uscan info: package="flatcam" version="8.994+ds-1" (as seen in debian/ changelog) > uscan info: package="flatcam" version="8.994+ds" (no epoch/revision) > uscan info: ./debian/changelog sets package="flatcam" version="8.994+ds" > uscan info: Process watch file at: debian/watch > package = flatcam > version = 8.994+ds > pkg_dir = . > uscan info: opts: mode=git, gitmode=full, pgpmode=none, pretty=8.994+git%cd.%h, repack, compression=xz > uscan info: line: https://bitbucket.org/jpcgt/flatcam.git refs/heads/ Beta > uscan info: Parsing mode=git > uscan info: Parsing gitmode=full > uscan info: Parsing pgpmode=none > uscan info: Parsing pretty=8.994+git%cd.%h > uscan info: Parsing repack > uscan info: Parsing compression=xz > uscan info: line: https://bitbucket.org/jpcgt/flatcam.git refs/heads/ Beta > uscan warn: Tag pattern missing version delimiters () in debian/watch, skipping: > https://bitbucket.org/jpcgt/flatcam.git refs/heads/Beta > uscan info: Scan finished > > The scan fails because *tag pattern* is not found. But I am not looking > for tags but for the last commit of a branch (refs/heads/*). > > Quoting the man page: > > If matching-pattern is set to refs/heads/branch, uscan > downloads source from the named branch of the git repository. > > Expected behavior would be uscan to download the latest commit of the > branch, without any pattern required to be matched. > > Thanks. > > -- Package-specific info: > > --- /etc/devscripts.conf ---