usd tag --upload complains about unclean working tree

Bug #1687940 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Fix Released
Undecided
Unassigned

Bug Description

Hi,
I wanted to tag upload before opening the MP as we could in the worst case always still move it before merging. By that I found that something is odd (or my expectation wrong).

$ git status
On branch merge-artful
nothing to commit, working directory clean

$ usd tag --upload
05/03/2017 14:13:58 - INFO:Using git repository at /home/paelzer/work/dovecot/merge-artful/dovecot
05/03/2017 14:13:58 - ERROR:Working tree must be clean to continue.

What now - is it clean or not?
The other tags reconstruct, deconstruct, ... work via "usd tag"

Related branches

Revision history for this message
Nish Aravamudan (nacc) wrote :

diff --git a/usd/tag.py b/usd/tag.py
index ac7cb79..455c9e8 100644
--- a/usd/tag.py
+++ b/usd/tag.py
@@ -99,6 +99,7 @@ class USDTag:

         if len(self.local_repo.status()) != 0:
             logging.error('Working tree must be clean to continue.')
+ run(['git', 'status'], stdout=None)
             sys.exit(1)

         version, _ = self.local_repo.get_changelog_versions_from_treeish(self.changelog_commitish)

Apply this locally and see what it says?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Applied as this:

--- a/usd/tag.py
+++ b/usd/tag.py
@@ -3,6 +3,7 @@ import logging
 import os
 import sys
 from usd.git_repository import USDGitRepository, git_dep14_tag
+from usd.run import run

 class USDTag:
     def __init__(self):
@@ -99,8 +100,10 @@ class USDTag:

         if len(self.local_repo.status()) != 0:
             logging.error('Working tree must be clean to continue.')
+ run(['git', 'status'], stdout=None)
+ print(self.local_repo.status())
             sys.exit(1)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (5.1 KiB)

$ usd tag --upload
05/03/2017 16:21:42 - INFO:Using git repository at /home/paelzer/work/dovecot/merge-artful/dovecot
05/03/2017 16:21:42 - ERROR:Working tree must be clean to continue.
On branch merge-artful
nothing to commit, working directory clean
{'pigeonhole/tests/extensions/body/errors/': 16384, 'pigeonhole/tests/extensions/variables/errors/': 16384, 'pigeonhole/src/lib-sieve/plugins/copy/': 16384, 'pigeonhole/tests/extensions/editheader/errors/': 16384, 'pigeonhole/src/testsuite/': 16384, 'pigeonhole/tests/extensions/subaddress/': 16384, 'pigeonhole/src/lib-sieve/plugins/vnd.dovecot/debug/': 16384, 'pigeonhole/src/lib-sieve/plugins/metadata/': 16384, 'pigeonhole/src/lib-sieve/plugins/relational/': 16384, 'pigeonhole/src/plugins/lda-sieve/': 16384, 'pigeonhole/src/lib-sieve/plugins/date/': 16384, 'pigeonhole/src/lib-sieve/plugins/comparator-i-ascii-numeric/': 16384, 'pigeonhole/tests/deprecated/imapflags/errors/': 16384, 'pigeonhole/src/lib-sieve/plugins/mime/': 16384, 'pigeonhole/tests/extensions/environment/': 16384, 'pigeonhole/src/lib-sieve/plugins/regex/': 16384, 'pigeonhole/examples/': 16384, 'pigeonhole/src/lib-sieve-tool/': 16384, 'pigeonhole/src/lib-sieve/plugins/notify/': 16384, 'pigeonhole/tests/extensions/vacation/execute/': 16384, 'pigeonhole/src/lib-sieve/plugins/vnd.dovecot/environment/': 16384, 'pigeonhole/tests/plugins/extprograms/filter/errors/': 16384, 'pigeonhole/src/lib-sieve/plugins/editheader/': 16384, 'pigeonhole/src/lib-sieve/storage/dict/': 16384, 'pigeonhole/m4/': 16384, 'pigeonhole/tests/extensions/mime/execute/': 16384, 'pigeonhole/src/lib-sieve/plugins/spamvirustest/': 16384, 'pigeonhole/tests/extensions/metadata/errors/': 16384, 'pigeonhole/tests/extensions/enotify/errors/': 16384, 'pigeonhole/doc/locations/': 16384, 'pigeonhole/src/lib-sieve/plugins/enotify/mailto/': 16384, 'pigeonhole/src/plugins/doveadm-sieve/': 16384, 'pigeonhole/tests/compile/warnings/': 16384, 'pigeonhole/src/lib-sieve/plugins/ihave/': 16384, 'pigeonhole/src/lib-sieve/util/': 16384, 'pigeonhole/src/sieve-tools/': 16384, 'pigeonhole/tests/comparators/': 16384, 'pigeonhole/src/lib-sieve/plugins/imap4flags/': 16384, 'pigeonhole/src/lib-sieve/plugins/subaddress/': 16384, 'pigeonhole/tests/extensions/enotify/execute/': 16384, 'pigeonhole/tests/extensions/include/errors/': 16384, 'pigeonhole/tests/compile/errors/': 16384, 'pigeonhole/src/plugins/sieve-extprograms/': 16384, 'pigeonhole/src/lib-sieve/plugins/index/': 16384, 'pigeonhole/tests/extensions/date/': 16384, 'pigeonhole/tests/extensions/mailbox/': 16384, 'pigeonhole/src/lib-sieve/storage/ldap/': 16384, 'pigeonhole/doc/plugins/': 16384, 'pigeonhole/src/lib-sieve/plugins/mailbox/': 16384, 'pigeonhole/src/lib-sieve/plugins/vnd.dovecot/report/': 16384, 'pigeonhole/tests/extensions/reject/execute/': 16384, 'pigeonhole/tests/extensions/imap4flags/multiscript/': 16384, 'pigeonhole/tests/extensions/include/included-global/': 16384, 'pigeonhole/tests/execute/actions/': 16384, 'pigeonhole/src/lib-sieve/plugins/variables/': 16384, 'pigeonhole/src/lib-sieve/storage/file/': 16384, 'pigeonhole/tests/extensions/vnd.dovecot/report/errors/': 16384, 'pigeonhole/tests/extensions/ihave/execute/': 1638...

Read more...

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1687940] Re: usd tag --upload complains about unclean working tree

Per libgit2 16384 (2^14) is GIT_STATUS_IGNORED.

Did the merge result in there being a .gitignore file?

On Wed, May 3, 2017 at 7:22 AM, ChristianEhrhardt
<email address hidden> wrote:
> Applied as this:
>
> --- a/usd/tag.py
> +++ b/usd/tag.py
> @@ -3,6 +3,7 @@ import logging
> import os
> import sys
> from usd.git_repository import USDGitRepository, git_dep14_tag
> +from usd.run import run
>
> class USDTag:
> def __init__(self):
> @@ -99,8 +100,10 @@ class USDTag:
>
> if len(self.local_repo.status()) != 0:
> logging.error('Working tree must be clean to continue.')
> + run(['git', 'status'], stdout=None)
> + print(self.local_repo.status())
> sys.exit(1)
>
> --
> You received this bug notification because you are a member of Ubuntu
> Server Dev import team, which is subscribed to usd-importer.
> https://bugs.launchpad.net/bugs/1687940
>
> Title:
> usd tag --upload complains about unclean working tree
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/usd-importer/+bug/1687940/+subscriptions

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

git status --ignored is also clean and there is no .gitignore in the current branch (merge-artful)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

We found that push/pop'ing the patches in debian/patches adds emtpy directories.
And that is what is then objected about.

Revision history for this message
Nish Aravamudan (nacc) wrote :

Can you re-test this with the current snap? I believe this is fixed by using `git status` directly.

Changed in usd-importer:
status: New → Incomplete
milestone: none → 1.0
Nish Aravamudan (nacc)
Changed in usd-importer:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.