Changes between Initial Version and Version 1 of Ticket #10884, comment 2
- Timestamp:
- Feb 16, 2014, 4:03:31 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10884, comment 2
initial v1 1 1 Here is the typical command line I use: 2 3 # trac-admin /srv/trac/E05058SB repository resync "" 54294 2 {{{ 3 # trac-admin /srv/trac/E05058SB repository resync "" 5429 4 }}} 5 5 so in the ticket I used a generalized description. 6 6 7 7 Without the patch, the command you suggest (sync) fails with the same error: 8 {{{ 9 # trac-admin /srv/trac/E05058SB repository sync "" 5429 10 }}} 11 produces the output: `TypeError: int argument required` 8 12 9 #trac-admin /srv/trac/E05058SB repository sync "" 5429 13 If you look more closely at the source code (`cache.py` / `sync_changeset`), it's rather easy to understand this error message: 10 14 11 produces the output: TypeError: int argument required 12 13 If you look more closely at the source code (cache.py / sync_changeset), it's rather easy to understand this error message: 14 15 the rev parameter that's passed to _insert_changeset() is a unicode string when it should be an int - _insert_changeset() fails at line 289 (cache.py) when calling db_rev(rev) from class SvnCachedRepository (svn_fs.py line 237): 15 the rev parameter that's passed to `_insert_changeset()` is a unicode string when it should be an int - `_insert_changeset()` fails at line 289 (`cache.py`) when calling `db_rev(rev)` from class `SvnCachedRepository` (`svn_fs.py` line 237): 16 16 17 17 … … 23 23 So you see an int is expected. 24 24 25 That's why the patch I attached uses the normalize_rev()function so as to convert the revision to an int.25 That's why the patch I attached uses the `normalize_rev()` function so as to convert the revision to an int. 26 26 27 27 When this type error is fixed, the revision and node_change tables are updated correctly, but the repository table still has not the lastest revision, therefore the remaining lines of the patch update the repository table and delete the metadata so it gets updated too. 28 28 29 I don't know the T RACmodules enough to be sure this patch is optimum but for sure it does work when it is applied: the cache seems correctly updated because the changeset can then be displayed and the timeline shows the revision that was missing.29 I don't know the Trac modules enough to be sure this patch is optimum but for sure it does work when it is applied: the cache seems correctly updated because the changeset can then be displayed and the timeline shows the revision that was missing.