6hP SrSSKJr SSKrSSKrSSKrSSKJr SSKJ r J r SSK J r J r JrJrJrJrJrJrJrJrJrJrJrJr SSKJrJrJr 0r\R>"\5rSr Sr!S r"S r#\"\RH0r%S r&S r'S r(Sr)Sr*Sr+Sr,Sr-Sr.Sr/Sr0"SS\Rb"SS55r2"SS5r3Sr4\"SSS/\ RjVs/sHoS\4;dM UPM sn-S \RlS!9S"5r7gs snf)#ztrack previous positions of bookmarks (EXPERIMENTAL) This extension adds a new command: `hg journal`, which shows you where bookmarks were previously located. ) annotationsN)_)binhex) bookmarkscmdutildispatchencodingerror extensionshg localrepolock logcmdutilmergepycompat registrarutil)dateutilprocutil stringutilsships-with-hg-coresbookmarks wdirparentcS[l[R"[S[ 5 [R"[ RS[5 [R"[RS[5 [R"[S[5 [R"[S[5 g)NF runcommand_writedirstate postshare copystore)rMAYBE_USE_RUST_UPDATEr wrapfunctionr rrbmstorerecordbookmarks wrapfilecacherlocalrepository wrapdirstater wrappostshareunsharejournal)uis //usr/lib/python3/dist-packages/hgext/journal.pyextsetupr)Gsu"'EHlJ?I--xI!!; B ];B ^<cUR5(aX[U5UlURR S5 [ R "US5up#U(a [X5 ggg)N namejournalr)localjournalstoragejournal_wlockfreeprefixaddr isfilecached_setupdirstate)r'repodirstatecacheds r( reposetupr7RsY zz||%d+  !!.1$11$ D  4 *  r*c<[R"U6 U"XX4/UQ76$)z;Track the command line options for recording in the journal)r. recordcommand)origluir4cmdfullargsargss r(rr_s"  (+ 3 04 00r*cRURUlURS[5 gNjournal)r/r.addparentchangecallbackrecorddirstateparents)r4r5s r(r3r3es"llH $$Z1FGr*cNU"U5n[US5(a [X5 U$)z5Make journal storage available to the dirstate objectr/)hasattrr3)r:r4r5s r(r$r$ks%DzHtYt& Or*c&[U5n[U5n[US5(ajUSURR:XaUSSOUnUSURR:XaUSSOUnURR [ SX45 gg)z3Records all dirstate parent changes in the journal.r.N.)listrE_nodeconstantsnullidr.recordwdirparenttype)r5oldnew oldhashes newhashess r(rCrCss s)C s)Cx)**"1v)@)@)G)GGCGS "1v)@)@)G)GGCGS && D) +r*cURn[US5(a[R"U5nUR 5VVs1sHupVUiM nnnUR SUR 555 [ U5HanURXR5n URXR5n X:wdM@URR[XU 5 Mc U"X5$s snnf)z,Records all bookmark changes in the journal.r/c3*# UH upUv M g7fN).0bns r( "recordbookmarks..s5}tq}s) _reporErr itemsupdatesortedgetrKr/rL bookmarktype) r:storefpr4oldmarksrWrX all_marksmarkvalueoldvalues r(r!r!s ;;DtY$$T*#+>>#34#341Q#3 45u{{}559%DIIdKK0E||D++6H  ##L$%H & ?5sC6c[URRS5R55$![a [5s$f=f)z,A set of shared features for this repositoryshared)setvfsread splitlinesFileNotFoundError)r4s r(_readsharedfeaturesros>488==+66899 u s14A  A c/# URS[5nUVs/sHn[U5PM nn0n[U5HupS[ U5XS/XE'M U(a8U"UR 55upenUv [ U5XES'U(aM7ggs snf![ a Mkf=f![ a XE N/f=f7f)zGiven a set of sorted iterables, yield the next entry in merged order Note that by default entries go from most recent to oldest. orderrN)popmaxiter enumeratenext StopIterationvalues) iterableskwargsrqit iterable_mapkeyrfs r(_mergeentriesiterr~s JJw $E$-.IbbII. LY' !%b3 3L ( |2245B  "#'8L a ,/    "! "s]CBCB(C?B0CC B-)C,B--C0 B?<C>B??Cc UR5 U"X40UD6 URSS5nURS5 SSS5 SSS5 g!,(df  N=f!,(df  g=f)z# UH,n[RUR5T;dM(Uv M. g7frT)sharednamespacesr_ namespace)rVesharedfeaturess r(rY!unsharejournal..s1JA#'' 4FJs'7 7)r)rq)pathsharedrEr sharedreposourcerorkexistsjoinrrenamer/_openr~minr) r:r'r4repopath sharedrepo journalpathstorager-rentryrs @r(r&r&s yyH743K3K((. ,T2 .J<7xx~.."hhmmN;  Kw)>?llGMM#5E"E z~~EJF +5Dtxx/E ( ##r*cR\rSrSrSr\S5rSr\R"\5r Sr g) journalentrya|Individual journal entry * timestamp: a mercurial (time, timezone) tuple * user: the username that ran the command * namespace: the entry namespace, an opaque string * name: the name of the changed item, opaque string with meaning in the namespace * command: the hg command that triggered this record * oldhashes: a tuple of one or more binary hashes for the old location * newhashes: a tuple of one or more binary hashes for the new location Handles serialisation from and to the storage format. Fields are separated by newlines, hashes are written out in hex separated by commas, timestamp and timezone are separated by a space. c $URS5unnnnnnnUR5up[U 5[U 5p[SURS555n[SURS555nU"X4UUUUUU5$)N c38# UHn[U5v M g7frTrrVhashs r(rY+journalentry.fromstorage..F0E#d))0E,c38# UHn[U5v M g7frTrrs r(rYrrr)splitfloatinttuple) clslinetimeusercommandrnamerPrQ timestamptzs r( fromstoragejournalentry.fromstorages JJu         i(#b'2F 0EFF F 0EFF  O        r*c SR[[RUR55nSRUR Vs/sHn[ U5PM sn5nSRURVs/sHn[ U5PM sn5nSRUURURURURUU45$s snfs snf)z bytes representation for storage rr) rmaprbytestrrrPrrQrrrr)selfrrrPrQs r( __bytes__journalentry.__bytes__ syyX--t~~>?IIT^^D^Ts4y^DE IIT^^D^Ts4y^DE zz      EDs CC#rUN) __name__ __module__ __qualname____firstlineno____doc__ classmethodrrr strmethod__str____static_attributes__rUr*r(rrs2 "  0 "  +Gr*rz9timestamp user command namespace name oldhashes newhashescx\rSrSrSrSrSrSr\S5r \ S5r Sr S r S rS rSS jrS rSSjrSrg)r.ia=Storage for journal entries Entries are divided over two files; one with entries that pertain to the local working copy *only*, and one with entries that are shared across multiple working copies when shared using the share extension. Entries are stored with NUL bytes as separators. See the journalentry class for the per-entry structure. The file format starts with an integer version, delimited by a NUL. This storage uses a dedicated lock; this makes it easier to avoid issues with adding entries that added when the regular wlock is unlocked (e.g. the dirstate). rUNcJ[R"5UlURUlURUlS=UlUlUR5(aD[U5n[R"U5nUbSU;aURUlX lggggr@) rgetuserrr'rkr sharedvfsrror r)rr4featuresrs r(__init__journalstorage.__init__2s$$& ''88043dn ;;==*40H,,T2J%**@!+&.#+A% r*cSR[[R[R 55nSU;aUR S5SS-nU$)Nrrrs ...)rrr shellquoter._currentcommand partition)r commandstrs r(rjournalstorage.commandAsPYY ##^%C%C D  J #--e4Q7'AJr*cXlg)z:Set the current hg arguments, stored with recorded entriesN)r)rr=s r(r9journalstorage.recordcommandKs 'r*cFUcgU"5nUbUR(dgU$)z_Returns the lock if it's held, or None if it's not. (This is copied from the localrepo class) N)held)rlockrefls r( _currentlockjournalstorage._currentlockRs& ? I 9AFFr*c |URUR5b[R"[ S55e[ S5UR -n[ R "USSUS9n[R"U5UlU$![RanURR[ S5X$R4-5 [ R "USURRSS 5US9nURR[ S 5UR-5 SnANSnAff=f) z"Create a lock for the journal fileNs%journal lock does not support nestings journal of %ssnamejournal.lockr)descs"waiting for lock on %s held by %r suistimeoutsgot lock after %s seconds )r_lockrefr AbortrbaserLockHeldr'warnlocker configintdelayweakrefref)rrkrrinsts r(jlockjournalstorage.jlock^s   T]] + 7++a HIJ J!"SXX- F #2ADAA A ~~ F GGLL89T;;> % ##I.$2E2EEnn Cr*czURU5 U"SSS9nURS[R5 UR S5R S5SnU(aFUS[ -:wa9URR[S5U-5 SSS5 SSS5 gU(dURS[ -S-5 URS[R5 UR[U5S-5 SSS5 SSS5 g!,(df  N=f!,(df  g=f) Nr,sa+b)moder%ds&unsupported journal file version '%s' ) rseekosSEEK_SETrlrstorageversionr'rrrSEEK_ENDbytes)rrkrfversions r(rjournalstorage._writes ZZ_^&1Qq"++&&&)--e4Q7w%.*@@ GGLLDEO2_ GGU^3u<=q"++&e u,-%2_11_s0D,BDD,+AD D, D) %D,, D:c## Ub[R"U5SnUb[R"U5SnUH?nUbU"UR5(dMUbU"UR5(dM;Uv MA g7f)a-Yield all journal entries with the given namespace or name Both the namespace and the name are optional; if neither is given all entries in the journal are produced. Matching supports regular expressions by using the `re:` prefix (use `literal:` to match names or namespaces that start with `re:`) N)r stringmatcherrr)rrrrs r(filteredjournalstorage.filteredsz  "00;B?I  ++D1"5DE$Yu-G-GUZZ(8(8K sA?Bc^TRTR5nTRcU$U4SjTRTR55n[X5$)z\Iterate over the storage Yields journalentry instances for each contained journal record. c3># UH6n[RUR5TR;dM2Uv M8 g7frT)rr_rr)rVrrs r(rY*journalstorage.__iter__..s7 /##AKK0D4G4GG A/s 1A A)rrkrr~)rr-rs` r(__iter__journalstorage.__iter__sO  488$ >> !L ZZ/  !//r*c## URU5(dgU"U5nUR5nSSS5 WRS5nU=(a USnUS[-:wa6U=(d [ S5n[ R "[ S5U-5eUSSnU(a [U5nUH#nU(dM [RU5v M% g!,(df  N=f7f)Nrrrs not availables!unknown journal file version '%s'rG) rrlrrrr rreversedrr) rrkrrrrawlinesrrs r(rjournalstorage._openszz(##  ]a&&(C % $E!H en, ,4#3!4G++a DEOP P ab  UOED**40 0]s C/CB+C/ C,(C/)rrrr'rrk)NN)r,T)rrrrrrrrpropertyrrr9rrrLrrrrrrUr*r(r.r.sd"OH /'' ," H..*0(1r*r.)s no-mergessgraphrA)r*allNsshow history for all names)ccommitsNsshow commit metadatarGs[OPTION]... [BOOKMARKNAME]) helpcategoryc ^[R"U5nSnURS5(a(U(a[R"[ S55eSnU(aUSnUR SU5mU4SjnURS5S :wa1Uc [ S 5nOS U-nUR[ S 5U-5 [R"U5nSnURS5 [URRUS 95GHupX:Xa GOTR5 TRUR SSU"UR"55 TR%SSU"UR&55 TRUR SSUR(5 TRURS5=(d UR+S5SSUR,5 TRUR SSTR/UR0S55 TR%SSUR25 URS5(dGMJTR55(a[R6"XU5n O%[R8"XTR;S5US9n UR&Hn Xn U R=U 5 M U RE5 GM TRG5 UcUR[ S 55 gg![R>a3n TRAS[RB"U 5-5 Sn A MSn A ff=f)!a6show the previous position of bookmarks and the working copy The journal is used to see the previous commits that bookmarks and the working copy pointed to. By default the previous locations for the working copy. Passing a bookmark name will show all the previous positions of that bookmark. Use the --all switch to show previous locations for all bookmarks and the working copy; each line will then include the bookmark name, or '.' for the working copy, as well. If `name` starts with `re:`, the remainder of the name is treated as a regular expression. To match a name that actually starts with `re:`, use the prefix `literal:`. By default hg journal only shows the commit hash and the command that was running at that time. -v/--verbose will show the prior hash, the user, and the time at which it happened. Use -c/--commits to output log information on each commit hash; at this point you can use the usual `--patch`, `--git`, `--stat` and `--template` switches to alter the log output for these. `hg journal -T json` can be used to produce machine readable output. rHr s/You can't combine --all and filtering on a nameNrrAcN>TR[TRU5SSS9$)Nsnoder)rsep) formatlistrhexfunc)nodesfms r( formatnodesjournal..formatnodes&s#}}SU3't}LLr*stemplatesjsonsthe working copy and bookmarkss'%s'sprevious locations of %s: )rsoldnodess%s -> snewnodess%ssusers %-8ssre:snames %-8ssdates %ss%Y-%m-%d %H:%M %1%2scommands %s rs changesets)diffoptss%s sno recorded locations )$r byteskwargsr_r rr formatterstatusrgetlimitpagerrur/r startitem condwriteverboserPrrQr startswithr formatdaterrisplainchangesetdisplayerchangesetformatternestedshowRepoLookupErrorplainrcloseend)r'r4r>optsrr displaynamelimitrcount displayerrctxrrs @r(r/r/sF    %D D xx ++DE  Aw j$ 'BM xx ' <=>K!D.K !23kAB    %E EHHZ!$,,"7"7T"7"BC  >   JJ Y EOO0L  e[%AB RZZ(EJJ? HHV  7 7   JJ   JJ   MM%//+A B  Y 6 88J  zz||&99"DI &99bii 6 >*CNN3'( OO UDXFFH } !./0 ,,>HHY)9)9!)<<==>s9LM*(MM)8r __future__r collectionsrrmercurial.i18nrmercurial.noderr mercurialrrr r r r r rrrrrrrmercurial.utilsrrrcmdtabler testedwithrr`rMsharedbookmarksrr)r7rr3r$rCr!ror~r%r& namedtuplerr. _ignoreoptslogoptsCATEGORY_CHANGE_ORGANIZATIONr/)opts0r(rBsU#       H % #  "$$ = +1 H     ":#$6A,CA,HQ1Q1l'  :9ooCosQ{)BsoC D "55 b1 b1 Ds  D $D