# HG changeset patch
# User Andreas Färber <andreas.faerber@web.de>
# Date 1269174979 -3600
# Node ID 1830c98fd4540278d2931a6842eefde613242f77
# Parent 004cba5117a2c9ab35112ffe0b9c2d1e1d68538d
Retrieve SVN revision from hg log
diff -r 004cba5117a2 -r 1830c98fd454 build/jam/FileRules
a
|
b
|
|
315 | 315 | local gitIndex = <haiku-rootdir-git>index ; |
316 | 316 | SEARCH on $(gitIndex) = [ FDirName $(HAIKU_TOP) .git ] ; |
317 | 317 | Depends $(target) : $(gitIndex) ; |
| 318 | } else if [ Glob [ FDirName $(HAIKU_TOP) .hg ] : store ] { |
| 319 | local hgStore = <haiku-rootdir-hg>store ; |
| 320 | SEARCH on $(hgStore) = [ FDirName $(HAIKU_TOP) .hg ] ; |
| 321 | Depends $(target) : $(hgStore) ; |
318 | 322 | } |
319 | 323 | |
320 | 324 | HAIKU_INCLUDE_IN_IMAGE on $(target) |
… |
… |
|
342 | 346 | grep "git-svn-id:" | cut -d '@' -f 2 | |
343 | 347 | awk '{printf $1}'` |
344 | 348 | fi |
| 349 | if [ "$revision" = 0 -o "$revision" = "" ]; then |
| 350 | # Try searching hg log for last svn commit |
| 351 | # Extract from "(svn r12345) ..." line |
| 352 | revision=`(cd $(HAIKU_TOP) && |
| 353 | hg log --no-merges --template "{desc|firstline}\n") 2> /dev/null | |
| 354 | grep --max-count=1 "(svn r" | |
| 355 | sed -n -e 's,(svn r\(.*\)).*,\1,p'` |
| 356 | fi |
345 | 357 | if [ "$revision" = "" ]; then |
346 | 358 | revision=0 |
347 | 359 | fi |