Commits

Jason R. Coombs committed f877391

auto versioning will no longer use the parent tag if the working copy has modifications

  • Participants
  • Parent commits 64ac6df

Comments (0)

Files changed (2)

 Changes
 *******
 
+0.6.7
+~~~~~
+
+* Auto-versioning will no longer use the parent tag if the working
+  copy has modifications.
+
 0.6.6
 ~~~~~
 

File hgtools/versioning.py

 		"""
 		Get the version of the local working set as a StrictVersion or
 		None if no viable tag exists. If the local working set is itself
-		the tagged commit and the tip, use the tag on the parent changeset.
+		the tagged commit and the tip and there are no local
+		modifications, use the tag on the parent changeset.
 		"""
 		tag = self.get_tag()
-		if tag == 'tip':
+		if tag == 'tip' and not self.is_modified():
 			ptag = self.get_parent_tag('tip')
 			if ptag:
 				tag = ptag
 		repository -- a tagged version, if present, or the next version
 		based on prior tagged releases.
 		"""
-		ver = self.get_tagged_version() or str(self.get_next_version(increment))+'dev'
+		ver = (
+			self.get_tagged_version()
+			or str(self.get_next_version(increment))+'dev'
+			)
 		return str(ver)
 
 	def get_next_version(self, increment=None):