diff --git a/.hgignore b/.hgignore
old mode 100644
new mode 100755
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
old mode 100644
new mode 100755
index 2dbc3310368d3cbf8f601c995627f76a64bb1f96..3150a99a214ecf23f488b61211b94f7be3496751
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -379,6 +379,11 @@ const std::string& LLInventoryItem::getDescription() const
 	return mDescription;
 }
 
+const std::string& LLInventoryItem::getActualDescription() const
+{
+	return mDescription;
+}
+
 time_t LLInventoryItem::getCreationDate() const
 {
 	return mCreationDate;
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
old mode 100644
new mode 100755
index a5cfe59bda347b615f674c351b6050cc362bf2af..44e7c0c34d512f76fb9b21fe56818a69cddbc173
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -160,6 +160,7 @@ public:
 	virtual const LLUUID& getCreatorUUID() const;
 	virtual const LLUUID& getAssetUUID() const;
 	virtual const std::string& getDescription() const;
+	virtual const std::string& getActualDescription() const; // Does not follow links
 	virtual const LLSaleInfo& getSaleInfo() const;
 	virtual LLInventoryType::EType getInventoryType() const;
 	virtual U32 getFlags() const;
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 7edba842b89813f83005898b778110d2381d77f8..d1ed82cc980df3c323f69c57d9be88579edd8e65 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -451,7 +451,7 @@ public:
 								item->getLinkedUUID(),
 								mDstCatID,
 								item->getName(),
-								item->LLInventoryItem::getDescription(),
+								item->getActualDescription(),
 								LLAssetType::AT_LINK,
 								new LLBoostFuncInventoryCallback(
 									boost::bind(&LLCallAfterInventoryBatchMgr::onOp,this,item_id,_1,LLTimer())));
@@ -1467,13 +1467,13 @@ void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LL
 		{
 			case LLAssetType::AT_LINK:
 			{
-				//LLInventoryItem::getDescription() is used for a new description 
+				//getActualDescription() is used for a new description 
 				//to propagate ordering information saved in descriptions of links
 				link_inventory_item(gAgent.getID(),
 									item->getLinkedUUID(),
 									dst_id,
 									item->getName(),
-									item->LLInventoryItem::getDescription(),
+									item->getActualDescription(),
 									LLAssetType::AT_LINK, cb);
 				break;
 			}
@@ -1718,7 +1718,7 @@ void LLAppearanceMgr::linkAll(const LLUUID& cat_uuid,
 							item->getLinkedUUID(),
 							cat_uuid,
 							item->getName(),
-							item->LLInventoryItem::getDescription(),
+							item->getActualDescription(),
 							LLAssetType::AT_LINK,
 							cb);
 
@@ -1910,7 +1910,7 @@ bool sort_by_description(const LLInventoryItem* item1, const LLInventoryItem* it
 		return true;
 	}
 
-	return item1->LLInventoryItem::getDescription() < item2->LLInventoryItem::getDescription();
+	return item1->getActualDescription() < item2->getActualDescription();
 }
 
 void item_array_diff(LLInventoryModel::item_array_t& full_list,
@@ -2486,6 +2486,33 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
 	return;
 }
 
+LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& item_id)
+{
+
+	LLInventoryModel::item_array_t result;
+	const LLViewerInventoryItem *vitem =
+		dynamic_cast<const LLViewerInventoryItem*>(gInventory.getItem(item_id));
+
+	if (vitem)
+	{
+		LLInventoryModel::cat_array_t cat_array;
+		LLInventoryModel::item_array_t item_array;
+		gInventory.collectDescendents(LLAppearanceMgr::getCOF(),
+									  cat_array,
+									  item_array,
+									  LLInventoryModel::EXCLUDE_TRASH);
+		for (S32 i=0; i<item_array.count(); i++)
+		{
+			const LLViewerInventoryItem* inv_item = item_array.get(i).get();
+			if (inv_item->getLinkedUUID() == vitem->getLinkedUUID())
+			{
+				result.put(item_array.get(i));
+			}
+		}
+	}
+	return result;
+}
+
 void LLAppearanceMgr::removeAllClothesFromAvatar()
 {
 	// Fetch worn clothes (i.e. the ones in COF).
@@ -2644,7 +2671,7 @@ void LLAppearanceMgr::updateIsDirty()
 
 			if (item1->getLinkedUUID() != item2->getLinkedUUID() || 
 				item1->getName() != item2->getName() ||
-				item1->LLInventoryItem::getDescription() != item2->LLInventoryItem::getDescription())
+				item1->getActualDescription() != item2->getActualDescription())
 			{
 				mOutfitIsDirty = true;
 				return;
@@ -2855,8 +2882,8 @@ struct WearablesOrderComparator
 			return true;
 		}
 		
-		const std::string& desc1 = item1->LLInventoryItem::getDescription();
-		const std::string& desc2 = item2->LLInventoryItem::getDescription();
+		const std::string& desc1 = item1->getActualDescription();
+		const std::string& desc2 = item2->getActualDescription();
 		
 		bool item1_valid = (desc1.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc1[0]);
 		bool item2_valid = (desc2.size() == mControlSize) && (ORDER_NUMBER_SEPARATOR == desc2[0]);
@@ -2914,7 +2941,7 @@ void LLAppearanceMgr::updateClothingOrderingInfo(LLUUID cat_id, bool update_base
 			if (!item) continue;
 
 			std::string new_order_str = build_order_string((LLWearableType::EType)type, i);
-			if (new_order_str == item->LLInventoryItem::getDescription()) continue;
+			if (new_order_str == item->getActualDescription()) continue;
 
 			item->setDescription(new_order_str);
 			item->setComplete(TRUE);
@@ -3179,8 +3206,8 @@ bool LLAppearanceMgr::moveWearable(LLViewerInventoryItem* item, bool closer_to_b
 	closer_to_body ? --it : ++it;
 	LLViewerInventoryItem* swap_item = *it;
 	if (!swap_item) return false;
-	std::string tmp = swap_item->LLInventoryItem::getDescription();
-	swap_item->setDescription(item->LLInventoryItem::getDescription());
+	std::string tmp = swap_item->getActualDescription();
+	swap_item->setDescription(item->getActualDescription());
 	item->setDescription(tmp);
 
 
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 31dbce892a42efcc8287b06a479a22e6e8f29751..01a2d4145892432474668ac25c7d6c735eed9a92 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -132,6 +132,9 @@ public:
 	void addCOFItemLink(const LLUUID& item_id, bool do_update = true, LLPointer<LLInventoryCallback> cb = NULL);
 	void addCOFItemLink(const LLInventoryItem *item, bool do_update = true, LLPointer<LLInventoryCallback> cb = NULL);
 
+	// Find COF entries referencing the given item.
+	LLInventoryModel::item_array_t findCOFItemLinks(const LLUUID& item_id);
+	
 	// Remove COF entries
 	void removeCOFItemLinks(const LLUUID& item_id);
 	void removeCOFLinksOfType(LLWearableType::EType type);
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
old mode 100644
new mode 100755
index 606e78bd580f7129b6123c717d5dc725607a2177..cca3b90329976afb76b6a6506df3ce0f1b61c853
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1065,7 +1065,27 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
         }
         else
         {
-                gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+			LLInventoryModel::item_array_t links =
+				LLAppearanceMgr::instance().findCOFItemLinks(mWearablePtr->getItemID());
+			if (links.size()>0)
+			{
+				// Make another copy of this link, with the same description.
+				LLInventoryItem *item = links.get(0).get();
+				if (item)
+				{
+					const std::string description = item->getIsLinkType() ? item->getActualDescription() : "";
+					link_inventory_item( gAgent.getID(),
+										 item->getLinkedUUID(),
+										 LLAppearanceMgr::instance().getCOF(),
+										 item->getName(),
+										 description,
+										 LLAssetType::AT_LINK,
+										 NULL);
+					gInventory.purgeObject(item->getUUID());
+				}
+			}
+			gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+
         }
 }