Always use revision hash when updating temporary working copy.
Although temporary working copy is a clone of original, revision number may
differ (for example when original repository contains secret changesets, history
has been rewritten, etc). Using hash is always safe except case where changesets
has been stripped.
--- a/mercurial/HGPackageWorkingCopy.st Sun Jul 06 18:58:42 2014 +0200
+++ b/mercurial/HGPackageWorkingCopy.st Wed Jul 09 10:06:32 2014 +0100
@@ -232,27 +232,20 @@
| cs r |
- r := rev.
- r revno isNil ifTrue:[
- cs := self repository changesetWithId: rev.
- r := cs id.
- ].
-
+ cs := self repository changesetWithId: rev.
+ r := cs id.
+
self ensureTemporaryWorkingCopy.
(r revno ~~ -1) ifTrue:[
- r revno notNil ifTrue:[
- wc update:r revno printString.
- ] ifFalse:[
- wc update:r printString.
- ].
+ wc update:r hexPrintString.
"Update branch to match branch of master working copy"
wc branch: repository workingCopy branch name.
].
"Created: / 28-11-2012 / 09:38:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 22-01-2013 / 20:49:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 09-07-2014 / 09:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!HGPackageWorkingCopy class methodsFor:'documentation'!