Character Limit for check-in comments
Moderator: SourceGear
Character Limit for check-in comments
Hi
Today I came across a really annoying 'feature' of Vault. After spending ages comparing two files and documenting the differences in my check-in comment, I wanted to go back to make a slight modification to the comment. Imagine my frustration when I saw that only a third of my comment had actually been written away to the Vault database. I confirmed this by trying to update the comment. The system allows you to enter more than the pre-defined limit without even so much as warning you that you will lose your comments. The limit seems to be around 2k (I managed to store 2292 characters). After taking a look at the underlying Vault tables I noticed that the fields used to store the comments are set to 2304 characters! Which explains my predicament.
Firstly, why has this been chosen as the limit given that some of the merge comments can easily break this, and secondly, why does the GUI allow you to enter the text without any warning that it will be lost after the 2292nd-ish character?
Thanks in advance
Today I came across a really annoying 'feature' of Vault. After spending ages comparing two files and documenting the differences in my check-in comment, I wanted to go back to make a slight modification to the comment. Imagine my frustration when I saw that only a third of my comment had actually been written away to the Vault database. I confirmed this by trying to update the comment. The system allows you to enter more than the pre-defined limit without even so much as warning you that you will lose your comments. The limit seems to be around 2k (I managed to store 2292 characters). After taking a look at the underlying Vault tables I noticed that the fields used to store the comments are set to 2304 characters! Which explains my predicament.
Firstly, why has this been chosen as the limit given that some of the merge comments can easily break this, and secondly, why does the GUI allow you to enter the text without any warning that it will be lost after the 2292nd-ish character?
Thanks in advance
It may be a bug. What version of Vault are you using?Firstly, why has this been chosen as the limit given that some of the merge comments can easily break this, and secondly, why does the GUI allow you to enter the text without any warning that it will be lost after the 2292nd-ish character?
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Version Information
Hi
Thanks for responding so quickly...
The Client and Server version is 3.1.0 (3494)
Thanks for responding so quickly...
The Client and Server version is 3.1.0 (3494)
I've also had comments truncated, and this message made me wonder about the limit.
I see the type "ulongcomment" defined to be an nvarchar of size 2304 as MDW says. I know that there is a limit imposed by SQL Server on the size of an nvarchar field, but I just looked it up and it seems to be 4000.
So I'd like to know why the limit of 2304 instead of 4000 as well.
Thanks,
Mike
I see the type "ulongcomment" defined to be an nvarchar of size 2304 as MDW says. I know that there is a limit imposed by SQL Server on the size of an nvarchar field, but I just looked it up and it seems to be 4000.
So I'd like to know why the limit of 2304 instead of 4000 as well.
Thanks,
Mike
SQL Server defines the max size of any row size in a table at 8060 bytes.
When the Vault Server retrieves some information from the database, temporary tables are used. The width of these temp tables eventually defined the size of ulongcomment at 2304 (2048 + 256).
I've logged a bug to not allow more than 2304 input characters in the change set comment dialogs.
When the Vault Server retrieves some information from the database, temporary tables are used. The width of these temp tables eventually defined the size of ulongcomment at 2304 (2048 + 256).
I've logged a bug to not allow more than 2304 input characters in the change set comment dialogs.
Last edited by jclausius on Tue Dec 20, 2005 11:11 am, edited 1 time in total.
Jeff Clausius
SourceGear
SourceGear
NTEXT instead?
Could you have not used an NTEXT field instead of a NVARCHAR? That way the limit of these comment fields is vastly increased. I think this would be a better solution as some of the merge comments reach the current limit.