[Bug 3522] New: hg tag leaves changed .hgtags if commit fails

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Mon Jul 2 08:50:50 CDT 2012


http://bz.selenic.com/show_bug.cgi?id=3522

          Priority: normal
            Bug ID: 3522
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: hg tag leaves changed .hgtags if commit fails
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: thomas at intevation.de
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.2.3
         Component: Mercurial
           Product: Mercurial

Related to bug 1559, but different:

When using "hg tag foo" to create a global tag, a commit of the changed .hgtags
is done. If this commit fails (mq patches applied, precommit hook, permission
problem) the .hgtags file still contains the changes done by 'hg tag'.

mercurial/localrepo.py localrepository._tag() contains the call to
self.commit(), where try/finally or try/except could be used to detect a failed
commit.

If .hgtags was added to the repository, it has to be forgotten.
If .hgtags was created, it has to be deleted.
If .hgtags was changed, it has to be restored from the repository data.

Alternatively just warn the user?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list