2012-07-06 02:18:09 +04:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [phases]
|
|
|
|
> # public changeset are not obsolete
|
|
|
|
> publish=false
|
2014-07-04 21:52:39 +04:00
|
|
|
> [ui]
|
2017-01-06 15:50:16 +03:00
|
|
|
> logtemplate="{rev}:{node|short} ({phase}{if(troubles, ' {troubles}')}) [{tags} {bookmarks}] {desc|firstline}\n"
|
2012-07-06 02:18:09 +04:00
|
|
|
> EOF
|
2012-06-07 21:15:23 +04:00
|
|
|
$ mkcommit() {
|
|
|
|
> echo "$1" > "$1"
|
|
|
|
> hg add "$1"
|
|
|
|
> hg ci -m "add $1"
|
|
|
|
> }
|
|
|
|
$ getid() {
|
2015-02-28 09:12:54 +03:00
|
|
|
> hg log -T "{node}\n" --hidden -r "desc('$1')"
|
2012-06-07 21:15:23 +04:00
|
|
|
> }
|
|
|
|
|
2012-07-24 23:20:56 +04:00
|
|
|
$ cat > debugkeys.py <<EOF
|
|
|
|
> def reposetup(ui, repo):
|
|
|
|
> class debugkeysrepo(repo.__class__):
|
|
|
|
> def listkeys(self, namespace):
|
|
|
|
> ui.write('listkeys %s\n' % (namespace,))
|
|
|
|
> return super(debugkeysrepo, self).listkeys(namespace)
|
|
|
|
>
|
|
|
|
> if repo.local():
|
|
|
|
> repo.__class__ = debugkeysrepo
|
|
|
|
> EOF
|
2012-06-07 21:15:23 +04:00
|
|
|
|
|
|
|
$ hg init tmpa
|
|
|
|
$ cd tmpa
|
2012-07-28 15:19:06 +04:00
|
|
|
$ mkcommit kill_me
|
|
|
|
|
|
|
|
Checking that the feature is properly disabled
|
|
|
|
|
|
|
|
$ hg debugobsolete -d '0 0' `getid kill_me` -u babar
|
2014-10-15 00:20:31 +04:00
|
|
|
abort: creating obsolete markers is not enabled on this repo
|
2012-07-28 15:19:06 +04:00
|
|
|
[255]
|
|
|
|
|
|
|
|
Enabling it
|
|
|
|
|
2014-10-15 00:34:25 +04:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [experimental]
|
|
|
|
> evolution=createmarkers,exchange
|
2012-07-28 15:19:06 +04:00
|
|
|
> EOF
|
2012-06-07 21:15:23 +04:00
|
|
|
|
|
|
|
Killing a single changeset without replacement
|
|
|
|
|
2012-07-30 21:26:05 +04:00
|
|
|
$ hg debugobsolete 0
|
|
|
|
abort: changeset references must be full hexadecimal node identifiers
|
|
|
|
[255]
|
|
|
|
$ hg debugobsolete '00'
|
|
|
|
abort: changeset references must be full hexadecimal node identifiers
|
|
|
|
[255]
|
2012-06-07 21:15:23 +04:00
|
|
|
$ hg debugobsolete -d '0 0' `getid kill_me` -u babar
|
2012-06-07 21:20:44 +04:00
|
|
|
$ hg debugobsolete
|
2014-08-14 10:42:36 +04:00
|
|
|
97b7c2d76b1845ed3eb988cd612611e72406cef0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'babar'}
|
2013-01-22 14:39:14 +04:00
|
|
|
|
|
|
|
(test that mercurial is not confused)
|
|
|
|
|
|
|
|
$ hg up null --quiet # having 0 as parent prevents it to be hidden
|
|
|
|
$ hg tip
|
2014-07-04 21:52:39 +04:00
|
|
|
-1:000000000000 (public) [tip ]
|
2013-01-22 14:39:14 +04:00
|
|
|
$ hg up --hidden tip --quiet
|
2014-08-15 01:59:42 +04:00
|
|
|
|
|
|
|
Killing a single changeset with itself should fail
|
|
|
|
(simple local safeguard)
|
|
|
|
|
|
|
|
$ hg debugobsolete `getid kill_me` `getid kill_me`
|
|
|
|
abort: bad obsmarker input: in-marker cycle with 97b7c2d76b1845ed3eb988cd612611e72406cef0
|
|
|
|
[255]
|
|
|
|
|
2012-06-07 21:15:23 +04:00
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Killing a single changeset with replacement
|
2014-10-15 23:52:10 +04:00
|
|
|
(and testing the format option)
|
2012-06-07 21:15:23 +04:00
|
|
|
|
|
|
|
$ hg init tmpb
|
|
|
|
$ cd tmpb
|
|
|
|
$ mkcommit a
|
|
|
|
$ mkcommit b
|
|
|
|
$ mkcommit original_c
|
|
|
|
$ hg up "desc('b')"
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ mkcommit new_c
|
|
|
|
created new head
|
2012-08-04 22:20:48 +04:00
|
|
|
$ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
|
2014-10-27 18:19:18 +03:00
|
|
|
$ hg debugobsolete --config format.obsstore-version=0 --flag 12 `getid original_c` `getid new_c` -d '121 120'
|
2012-08-04 22:20:48 +04:00
|
|
|
$ hg log -r 'hidden()' --template '{rev}:{node|short} {desc}\n' --hidden
|
|
|
|
2:245bde4270cd add original_c
|
2014-04-15 07:27:31 +04:00
|
|
|
$ hg debugrevlog -cd
|
2014-08-30 13:57:46 +04:00
|
|
|
# rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
|
|
|
|
0 -1 -1 0 59 0 0 0 0 58 58 0 1 0
|
|
|
|
1 0 -1 59 118 59 59 0 0 58 116 0 1 0
|
2014-11-12 08:41:12 +03:00
|
|
|
2 1 -1 118 193 118 118 59 0 76 192 0 1 0
|
|
|
|
3 1 -1 193 260 193 193 59 0 66 258 0 2 0
|
2012-06-07 21:20:44 +04:00
|
|
|
$ hg debugobsolete
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2012-06-07 21:15:23 +04:00
|
|
|
|
2014-10-15 23:52:10 +04:00
|
|
|
(check for version number of the obsstore)
|
|
|
|
|
|
|
|
$ dd bs=1 count=1 if=.hg/store/obsstore 2>/dev/null
|
|
|
|
\x00 (no-eol) (esc)
|
|
|
|
|
2012-06-07 21:15:23 +04:00
|
|
|
do it again (it read the obsstore before adding new changeset)
|
|
|
|
|
|
|
|
$ hg up '.^'
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ mkcommit new_2_c
|
|
|
|
created new head
|
|
|
|
$ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
|
2012-06-07 21:20:44 +04:00
|
|
|
$ hg debugobsolete
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2012-06-07 21:15:23 +04:00
|
|
|
|
|
|
|
Register two markers with a missing node
|
|
|
|
|
|
|
|
$ hg up '.^'
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ mkcommit new_3_c
|
|
|
|
created new head
|
|
|
|
$ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
|
|
|
|
$ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
|
2012-06-07 21:20:44 +04:00
|
|
|
$ hg debugobsolete
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2012-06-07 21:21:59 +04:00
|
|
|
|
2016-03-23 20:50:24 +03:00
|
|
|
Test the --index option of debugobsolete command
|
|
|
|
$ hg debugobsolete --index
|
|
|
|
0 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
|
|
|
1 cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
|
|
|
2 ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
3 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
|
|
|
|
2012-10-15 02:12:06 +04:00
|
|
|
Refuse pathological nullid successors
|
|
|
|
$ hg debugobsolete -d '9001 0' 1337133713371337133713371337133713371337 0000000000000000000000000000000000000000
|
|
|
|
transaction abort!
|
|
|
|
rollback completed
|
|
|
|
abort: bad obsolescence marker detected: invalid successors nullid
|
|
|
|
[255]
|
|
|
|
|
2012-07-04 19:29:49 +04:00
|
|
|
Check that graphlog detect that a changeset is obsolete:
|
|
|
|
|
2013-11-22 22:14:17 +04:00
|
|
|
$ hg log -G
|
2014-07-04 21:52:39 +04:00
|
|
|
@ 5:5601fb93a350 (draft) [tip ] add new_3_c
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 1:7c3bad9141dc (draft) [ ] add b
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (draft) [ ] add a
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
|
|
|
2013-01-08 23:02:53 +04:00
|
|
|
check that heads does not report them
|
|
|
|
|
|
|
|
$ hg heads
|
2014-07-04 21:52:39 +04:00
|
|
|
5:5601fb93a350 (draft) [tip ] add new_3_c
|
2013-01-08 23:02:53 +04:00
|
|
|
$ hg heads --hidden
|
2014-07-04 21:52:39 +04:00
|
|
|
5:5601fb93a350 (draft) [tip ] add new_3_c
|
|
|
|
4:ca819180edb9 (draft) [ ] add new_2_c
|
|
|
|
3:cdbce2fbb163 (draft) [ ] add new_c
|
|
|
|
2:245bde4270cd (draft) [ ] add original_c
|
2013-01-08 23:02:53 +04:00
|
|
|
|
|
|
|
|
|
|
|
check that summary does not report them
|
|
|
|
|
|
|
|
$ hg init ../sink
|
|
|
|
$ echo '[paths]' >> .hg/hgrc
|
|
|
|
$ echo 'default=../sink' >> .hg/hgrc
|
|
|
|
$ hg summary --remote
|
|
|
|
parent: 5:5601fb93a350 tip
|
|
|
|
add new_3_c
|
|
|
|
branch: default
|
|
|
|
commit: (clean)
|
|
|
|
update: (current)
|
2015-05-29 23:23:58 +03:00
|
|
|
phases: 3 draft
|
2013-01-08 23:02:53 +04:00
|
|
|
remote: 3 outgoing
|
|
|
|
|
|
|
|
$ hg summary --remote --hidden
|
|
|
|
parent: 5:5601fb93a350 tip
|
|
|
|
add new_3_c
|
|
|
|
branch: default
|
|
|
|
commit: (clean)
|
|
|
|
update: 3 new changesets, 4 branch heads (merge)
|
2015-05-29 23:23:58 +03:00
|
|
|
phases: 6 draft
|
2013-01-08 23:02:53 +04:00
|
|
|
remote: 3 outgoing
|
|
|
|
|
2013-01-16 08:21:11 +04:00
|
|
|
check that various commands work well with filtering
|
|
|
|
|
|
|
|
$ hg tip
|
2014-07-04 21:52:39 +04:00
|
|
|
5:5601fb93a350 (draft) [tip ] add new_3_c
|
2013-01-16 08:21:11 +04:00
|
|
|
$ hg log -r 6
|
|
|
|
abort: unknown revision '6'!
|
|
|
|
[255]
|
|
|
|
$ hg log -r 4
|
2014-10-18 02:25:32 +04:00
|
|
|
abort: hidden revision '4'!
|
|
|
|
(use --hidden to access hidden revisions)
|
2013-01-16 08:21:11 +04:00
|
|
|
[255]
|
2014-10-19 11:48:33 +04:00
|
|
|
$ hg debugrevspec 'rev(6)'
|
|
|
|
$ hg debugrevspec 'rev(4)'
|
2015-01-08 17:05:45 +03:00
|
|
|
$ hg debugrevspec 'null'
|
|
|
|
-1
|
2013-01-16 08:21:11 +04:00
|
|
|
|
2012-07-04 19:29:49 +04:00
|
|
|
Check that public changeset are not accounted as obsolete:
|
|
|
|
|
2013-01-08 23:37:37 +04:00
|
|
|
$ hg --hidden phase --public 2
|
2013-11-22 22:14:17 +04:00
|
|
|
$ hg log -G
|
2017-01-06 15:50:16 +03:00
|
|
|
@ 5:5601fb93a350 (draft bumped) [tip ] add new_3_c
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-07-04 19:29:49 +04:00
|
|
|
|
|
|
|
|
2012-10-19 02:39:06 +04:00
|
|
|
And that bumped changeset are detected
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
If we didn't filtered obsolete changesets out, 3 and 4 would show up too. Also
|
|
|
|
note that the bumped changeset (5:5601fb93a350) is not a direct successor of
|
|
|
|
the public changeset
|
|
|
|
|
|
|
|
$ hg log --hidden -r 'bumped()'
|
2017-01-06 15:50:16 +03:00
|
|
|
5:5601fb93a350 (draft bumped) [tip ] add new_3_c
|
2012-10-19 02:39:06 +04:00
|
|
|
|
2012-10-19 02:50:12 +04:00
|
|
|
And that we can't push bumped changeset
|
|
|
|
|
2012-12-17 20:00:24 +04:00
|
|
|
$ hg push ../tmpa -r 0 --force #(make repo related)
|
2012-12-01 00:47:04 +04:00
|
|
|
pushing to ../tmpa
|
|
|
|
searching for changes
|
2012-12-17 20:27:12 +04:00
|
|
|
warning: repository is unrelated
|
2012-12-01 00:47:04 +04:00
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files (+1 heads)
|
2012-10-19 02:50:12 +04:00
|
|
|
$ hg push ../tmpa
|
|
|
|
pushing to ../tmpa
|
|
|
|
searching for changes
|
|
|
|
abort: push includes bumped changeset: 5601fb93a350!
|
|
|
|
[255]
|
|
|
|
|
2012-10-19 02:41:53 +04:00
|
|
|
Fixing "bumped" situation
|
|
|
|
We need to create a clone of 5 and add a special marker with a flag
|
|
|
|
|
2015-12-14 22:19:48 +03:00
|
|
|
$ hg summary
|
2017-01-06 16:35:22 +03:00
|
|
|
parent: 5:5601fb93a350 tip (bumped)
|
2015-12-14 22:19:48 +03:00
|
|
|
add new_3_c
|
|
|
|
branch: default
|
|
|
|
commit: (clean)
|
|
|
|
update: 1 new changesets, 2 branch heads (merge)
|
|
|
|
phases: 1 draft
|
2016-01-12 05:00:29 +03:00
|
|
|
bumped: 1 changesets
|
2012-10-19 02:41:53 +04:00
|
|
|
$ hg up '5^'
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg revert -ar 5
|
|
|
|
adding new_3_c
|
|
|
|
$ hg ci -m 'add n3w_3_c'
|
|
|
|
created new head
|
|
|
|
$ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
|
|
|
|
$ hg log -r 'bumped()'
|
|
|
|
$ hg log -G
|
2014-07-04 21:52:39 +04:00
|
|
|
@ 6:6f9641995072 (draft) [tip ] add n3w_3_c
|
2012-10-19 02:41:53 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-10-19 02:41:53 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-10-19 02:41:53 +04:00
|
|
|
|
|
|
|
|
2015-04-08 17:30:02 +03:00
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Revision 0 is hidden
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
$ hg init rev0hidden
|
|
|
|
$ cd rev0hidden
|
|
|
|
|
|
|
|
$ mkcommit kill0
|
|
|
|
$ hg up -q null
|
|
|
|
$ hg debugobsolete `getid kill0`
|
|
|
|
$ mkcommit a
|
|
|
|
$ mkcommit b
|
|
|
|
|
|
|
|
Should pick the first visible revision as "repo" node
|
|
|
|
|
|
|
|
$ hg archive ../archive-null
|
|
|
|
$ cat ../archive-null/.hg_archival.txt
|
|
|
|
repo: 1f0dee641bb7258c56bd60e93edfa2405381c41e
|
|
|
|
node: 7c3bad9141dcb46ff89abf5f61856facd56e476c
|
|
|
|
branch: default
|
|
|
|
latesttag: null
|
|
|
|
latesttagdistance: 2
|
|
|
|
changessincelatesttag: 2
|
2012-10-19 02:41:53 +04:00
|
|
|
|
|
|
|
|
2012-06-07 21:21:59 +04:00
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Exchange Test
|
|
|
|
============================
|
|
|
|
|
|
|
|
Destination repo does not have any data
|
|
|
|
---------------------------------------
|
|
|
|
|
2013-01-28 16:56:11 +04:00
|
|
|
Simple incoming test
|
2012-06-07 21:21:59 +04:00
|
|
|
|
|
|
|
$ hg init tmpc
|
|
|
|
$ cd tmpc
|
2013-01-28 16:56:11 +04:00
|
|
|
$ hg incoming ../tmpb
|
|
|
|
comparing with ../tmpb
|
2014-07-04 21:52:39 +04:00
|
|
|
0:1f0dee641bb7 (public) [ ] add a
|
|
|
|
1:7c3bad9141dc (public) [ ] add b
|
|
|
|
2:245bde4270cd (public) [ ] add original_c
|
|
|
|
6:6f9641995072 (draft) [tip ] add n3w_3_c
|
2013-01-28 16:56:11 +04:00
|
|
|
|
|
|
|
Try to pull markers
|
|
|
|
(extinct changeset are excluded but marker are pushed)
|
|
|
|
|
2012-06-07 21:21:59 +04:00
|
|
|
$ hg pull ../tmpb
|
|
|
|
pulling from ../tmpb
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2012-07-13 16:38:49 +04:00
|
|
|
added 4 changesets with 4 changes to 4 files (+1 heads)
|
2015-05-27 14:21:39 +03:00
|
|
|
5 new obsolescence markers
|
2012-06-07 21:21:59 +04:00
|
|
|
(run 'hg heads' to see heads, 'hg merge' to merge)
|
|
|
|
$ hg debugobsolete
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2012-07-04 04:21:04 +04:00
|
|
|
|
|
|
|
Rollback//Transaction support
|
|
|
|
|
|
|
|
$ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
|
|
$ hg debugobsolete
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:22:20 1970 +0000) {'user': 'test'}
|
2012-07-04 04:21:04 +04:00
|
|
|
$ hg rollback -n
|
2012-07-13 16:38:49 +04:00
|
|
|
repository tip rolled back to revision 3 (undo debugobsolete)
|
2012-07-04 04:21:04 +04:00
|
|
|
$ hg rollback
|
2012-07-13 16:38:49 +04:00
|
|
|
repository tip rolled back to revision 3 (undo debugobsolete)
|
2012-07-04 04:21:04 +04:00
|
|
|
$ hg debugobsolete
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2012-06-07 21:21:59 +04:00
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
2013-01-28 16:44:44 +04:00
|
|
|
Try to push markers
|
2012-06-07 21:21:59 +04:00
|
|
|
|
|
|
|
$ hg init tmpd
|
|
|
|
$ hg -R tmpb push tmpd
|
|
|
|
pushing to tmpd
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2012-07-10 03:32:18 +04:00
|
|
|
added 4 changesets with 4 changes to 4 files (+1 heads)
|
2015-05-27 14:21:39 +03:00
|
|
|
5 new obsolescence markers
|
2014-08-21 06:47:35 +04:00
|
|
|
$ hg -R tmpd debugobsolete | sort
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2014-08-21 06:47:35 +04:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2012-07-25 21:02:35 +04:00
|
|
|
|
2012-07-24 23:20:56 +04:00
|
|
|
Check obsolete keys are exchanged only if source has an obsolete store
|
|
|
|
|
|
|
|
$ hg init empty
|
|
|
|
$ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
|
|
|
|
pushing to tmpd
|
2014-07-31 06:26:47 +04:00
|
|
|
listkeys phases
|
2014-08-16 05:39:39 +04:00
|
|
|
listkeys bookmarks
|
2012-07-24 23:20:56 +04:00
|
|
|
no changes found
|
|
|
|
listkeys phases
|
|
|
|
[1]
|
|
|
|
|
2012-07-25 21:02:35 +04:00
|
|
|
clone support
|
|
|
|
(markers are copied and extinct changesets are included to allow hardlinks)
|
|
|
|
|
|
|
|
$ hg clone tmpb clone-dest
|
|
|
|
updating to branch default
|
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg -R clone-dest log -G --hidden
|
2014-07-04 21:52:39 +04:00
|
|
|
@ 6:6f9641995072 (draft) [tip ] add n3w_3_c
|
2012-07-25 21:02:35 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
| x 5:5601fb93a350 (draft) [ ] add new_3_c
|
|
|
|
|/
|
|
|
|
| x 4:ca819180edb9 (draft) [ ] add new_2_c
|
|
|
|
|/
|
|
|
|
| x 3:cdbce2fbb163 (draft) [ ] add new_c
|
|
|
|
|/
|
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-07-25 21:02:35 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-07-25 21:02:35 +04:00
|
|
|
|
|
|
|
$ hg -R clone-dest debugobsolete
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2012-06-07 21:21:59 +04:00
|
|
|
|
|
|
|
|
|
|
|
Destination repo have existing data
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
On pull
|
|
|
|
|
|
|
|
$ hg init tmpe
|
|
|
|
$ cd tmpe
|
2014-08-21 06:42:33 +04:00
|
|
|
$ hg debugobsolete -d '1339 0' 1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00
|
2012-06-07 21:21:59 +04:00
|
|
|
$ hg pull ../tmpb
|
|
|
|
pulling from ../tmpb
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2012-07-13 16:38:49 +04:00
|
|
|
added 4 changesets with 4 changes to 4 files (+1 heads)
|
2015-05-27 14:21:39 +03:00
|
|
|
5 new obsolescence markers
|
2012-06-07 21:21:59 +04:00
|
|
|
(run 'hg heads' to see heads, 'hg merge' to merge)
|
|
|
|
$ hg debugobsolete
|
2014-08-21 06:42:33 +04:00
|
|
|
1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2012-06-07 21:21:59 +04:00
|
|
|
|
2012-07-06 02:18:09 +04:00
|
|
|
|
2012-06-07 21:21:59 +04:00
|
|
|
On push
|
|
|
|
|
|
|
|
$ hg push ../tmpc
|
|
|
|
pushing to ../tmpc
|
|
|
|
searching for changes
|
|
|
|
no changes found
|
2015-05-27 14:21:39 +03:00
|
|
|
1 new obsolescence markers
|
2012-06-07 21:21:59 +04:00
|
|
|
[1]
|
|
|
|
$ hg -R ../tmpc debugobsolete
|
2014-08-14 10:42:36 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-14 10:42:36 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2014-08-21 06:42:33 +04:00
|
|
|
1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
|
|
detect outgoing obsolete and unstable
|
|
|
|
---------------------------------------
|
|
|
|
|
2012-07-13 16:38:49 +04:00
|
|
|
|
2013-11-22 22:14:17 +04:00
|
|
|
$ hg log -G
|
2014-07-04 21:52:39 +04:00
|
|
|
o 3:6f9641995072 (draft) [tip ] add n3w_3_c
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-07-06 02:18:09 +04:00
|
|
|
|
2012-10-19 02:41:53 +04:00
|
|
|
$ hg up 'desc("n3w_3_c")'
|
2012-07-13 16:38:49 +04:00
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2012-07-06 02:18:09 +04:00
|
|
|
$ mkcommit original_d
|
2012-07-13 16:38:49 +04:00
|
|
|
$ mkcommit original_e
|
2014-08-20 11:43:08 +04:00
|
|
|
$ hg debugobsolete --record-parents `getid original_d` -d '0 0'
|
|
|
|
$ hg debugobsolete | grep `getid original_d`
|
|
|
|
94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
|
2012-07-13 16:38:49 +04:00
|
|
|
$ hg log -r 'obsolete()'
|
2014-07-04 21:52:39 +04:00
|
|
|
4:94b33453f93b (draft) [ ] add original_d
|
2015-12-14 22:19:48 +03:00
|
|
|
$ hg summary
|
2017-01-06 16:35:22 +03:00
|
|
|
parent: 5:cda648ca50f5 tip (unstable)
|
2015-12-14 22:19:48 +03:00
|
|
|
add original_e
|
|
|
|
branch: default
|
|
|
|
commit: (clean)
|
|
|
|
update: 1 new changesets, 2 branch heads (merge)
|
|
|
|
phases: 3 draft
|
2016-01-12 05:00:29 +03:00
|
|
|
unstable: 1 changesets
|
2013-11-22 22:14:17 +04:00
|
|
|
$ hg log -G -r '::unstable()'
|
2017-01-06 15:50:16 +03:00
|
|
|
@ 5:cda648ca50f5 (draft unstable) [tip ] add original_e
|
2012-07-13 16:38:49 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
x 4:94b33453f93b (draft) [ ] add original_d
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 3:6f9641995072 (draft) [ ] add n3w_3_c
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-07-06 02:18:09 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-07-06 02:18:09 +04:00
|
|
|
|
2012-07-13 16:38:49 +04:00
|
|
|
|
|
|
|
refuse to push obsolete changeset
|
|
|
|
|
|
|
|
$ hg push ../tmpc/ -r 'desc("original_d")'
|
|
|
|
pushing to ../tmpc/
|
|
|
|
searching for changes
|
2012-10-19 02:46:39 +04:00
|
|
|
abort: push includes obsolete changeset: 94b33453f93b!
|
2012-07-13 16:38:49 +04:00
|
|
|
[255]
|
|
|
|
|
|
|
|
refuse to push unstable changeset
|
|
|
|
|
2012-07-10 03:39:03 +04:00
|
|
|
$ hg push ../tmpc/
|
|
|
|
pushing to ../tmpc/
|
|
|
|
searching for changes
|
2012-10-19 02:46:39 +04:00
|
|
|
abort: push includes unstable changeset: cda648ca50f5!
|
2012-07-10 03:39:03 +04:00
|
|
|
[255]
|
2012-07-06 21:34:09 +04:00
|
|
|
|
|
|
|
Test that extinct changeset are properly detected
|
|
|
|
|
|
|
|
$ hg log -r 'extinct()'
|
2012-07-13 16:38:49 +04:00
|
|
|
|
|
|
|
Don't try to push extinct changeset
|
|
|
|
|
|
|
|
$ hg init ../tmpf
|
|
|
|
$ hg out ../tmpf
|
|
|
|
comparing with ../tmpf
|
|
|
|
searching for changes
|
2014-07-04 21:52:39 +04:00
|
|
|
0:1f0dee641bb7 (public) [ ] add a
|
|
|
|
1:7c3bad9141dc (public) [ ] add b
|
|
|
|
2:245bde4270cd (public) [ ] add original_c
|
|
|
|
3:6f9641995072 (draft) [ ] add n3w_3_c
|
|
|
|
4:94b33453f93b (draft) [ ] add original_d
|
2017-01-06 15:50:16 +03:00
|
|
|
5:cda648ca50f5 (draft unstable) [tip ] add original_e
|
2012-07-13 16:38:49 +04:00
|
|
|
$ hg push ../tmpf -f # -f because be push unstable too
|
|
|
|
pushing to ../tmpf
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 6 changesets with 6 changes to 6 files (+1 heads)
|
2015-05-27 14:21:39 +03:00
|
|
|
7 new obsolescence markers
|
2012-07-13 16:38:49 +04:00
|
|
|
|
|
|
|
no warning displayed
|
|
|
|
|
|
|
|
$ hg push ../tmpf
|
|
|
|
pushing to ../tmpf
|
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
[1]
|
2012-07-17 19:59:29 +04:00
|
|
|
|
|
|
|
Do not warn about new head when the new head is a successors of a remote one
|
|
|
|
|
2013-11-22 22:14:17 +04:00
|
|
|
$ hg log -G
|
2017-01-06 15:50:16 +03:00
|
|
|
@ 5:cda648ca50f5 (draft unstable) [tip ] add original_e
|
2012-07-17 19:59:29 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
x 4:94b33453f93b (draft) [ ] add original_d
|
2012-07-17 19:59:29 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 3:6f9641995072 (draft) [ ] add n3w_3_c
|
2012-07-17 19:59:29 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
2012-07-17 19:59:29 +04:00
|
|
|
|
|
2014-07-04 21:52:39 +04:00
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
2012-07-17 19:59:29 +04:00
|
|
|
|
2012-10-19 02:41:53 +04:00
|
|
|
$ hg up -q 'desc(n3w_3_c)'
|
2012-07-17 19:59:29 +04:00
|
|
|
$ mkcommit obsolete_e
|
|
|
|
created new head
|
|
|
|
$ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
|
2013-01-28 16:56:11 +04:00
|
|
|
$ hg outgoing ../tmpf # parasite hg outgoing testin
|
|
|
|
comparing with ../tmpf
|
|
|
|
searching for changes
|
2014-07-04 21:52:39 +04:00
|
|
|
6:3de5eca88c00 (draft) [tip ] add obsolete_e
|
2012-07-17 19:59:29 +04:00
|
|
|
$ hg push ../tmpf
|
|
|
|
pushing to ../tmpf
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 1 changes to 1 files (+1 heads)
|
2015-05-27 14:21:39 +03:00
|
|
|
1 new obsolescence markers
|
2012-07-28 15:05:25 +04:00
|
|
|
|
2014-08-20 10:22:44 +04:00
|
|
|
test relevance computation
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Checking simple case of "marker relevance".
|
|
|
|
|
|
|
|
|
|
|
|
Reminder of the repo situation
|
|
|
|
|
|
|
|
$ hg log --hidden --graph
|
|
|
|
@ 6:3de5eca88c00 (draft) [tip ] add obsolete_e
|
|
|
|
|
|
|
|
|
| x 5:cda648ca50f5 (draft) [ ] add original_e
|
|
|
|
| |
|
|
|
|
| x 4:94b33453f93b (draft) [ ] add original_d
|
|
|
|
|/
|
|
|
|
o 3:6f9641995072 (draft) [ ] add n3w_3_c
|
|
|
|
|
|
|
|
|
| o 2:245bde4270cd (public) [ ] add original_c
|
|
|
|
|/
|
|
|
|
o 1:7c3bad9141dc (public) [ ] add b
|
|
|
|
|
|
|
|
|
o 0:1f0dee641bb7 (public) [ ] add a
|
|
|
|
|
|
|
|
|
|
|
|
List of all markers
|
|
|
|
|
|
|
|
$ hg debugobsolete
|
2014-08-21 06:42:33 +04:00
|
|
|
1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-08-20 10:22:44 +04:00
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-20 10:22:44 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
2015-05-10 16:48:08 +03:00
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
2014-08-20 10:22:44 +04:00
|
|
|
94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
|
|
|
|
cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
|
|
|
|
|
|
|
|
List of changesets with no chain
|
|
|
|
|
|
|
|
$ hg debugobsolete --hidden --rev ::2
|
|
|
|
|
|
|
|
List of changesets that are included on marker chain
|
|
|
|
|
|
|
|
$ hg debugobsolete --hidden --rev 6
|
|
|
|
cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
|
|
|
|
|
|
|
|
List of changesets with a longer chain, (including a pruned children)
|
|
|
|
|
|
|
|
$ hg debugobsolete --hidden --rev 3
|
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-08-21 06:42:33 +04:00
|
|
|
1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-20 10:22:44 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
|
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
|
|
|
|
|
|
|
List of both
|
|
|
|
|
|
|
|
$ hg debugobsolete --hidden --rev 3::6
|
|
|
|
1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-08-21 06:42:33 +04:00
|
|
|
1339133913391339133913391339133913391339 ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:19 1970 +0000) {'user': 'test'}
|
2014-10-27 18:19:18 +03:00
|
|
|
245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f C (Thu Jan 01 00:00:01 1970 -0002) {'user': 'test'}
|
2014-08-20 10:22:44 +04:00
|
|
|
5601fb93a350734d935195fee37f4054c529ff39 6f96419950729f3671185b847352890f074f7557 1 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
|
|
|
|
ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 (Thu Jan 01 00:22:18 1970 +0000) {'user': 'test'}
|
|
|
|
cda648ca50f50482b7055c0b0c4c117bba6733d9 3de5eca88c00aa039da7399a220f4a5221faa585 0 (*) {'user': 'test'} (glob)
|
|
|
|
cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 (Thu Jan 01 00:22:17 1970 +0000) {'user': 'test'}
|
|
|
|
|
2016-08-15 10:07:55 +03:00
|
|
|
List of all markers in JSON
|
|
|
|
|
|
|
|
$ hg debugobsolete -Tjson
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"date": [1339.0, 0],
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "1339133913391339133913391339133913391339",
|
|
|
|
"succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [1339.0, 0],
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "1337133713371337133713371337133713371337",
|
|
|
|
"succnodes": ["5601fb93a350734d935195fee37f4054c529ff39"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [121.0, 120],
|
|
|
|
"flag": 12,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "245bde4270cd1072a27757984f9cda8ba26f08ca",
|
|
|
|
"succnodes": ["cdbce2fbb16313928851e97e0d85413f3f7eb77f"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [1338.0, 0],
|
|
|
|
"flag": 1,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "5601fb93a350734d935195fee37f4054c529ff39",
|
|
|
|
"succnodes": ["6f96419950729f3671185b847352890f074f7557"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [1338.0, 0],
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "ca819180edb99ed25ceafb3e9584ac287e240b00",
|
|
|
|
"succnodes": ["1337133713371337133713371337133713371337"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [1337.0, 0],
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "cdbce2fbb16313928851e97e0d85413f3f7eb77f",
|
|
|
|
"succnodes": ["ca819180edb99ed25ceafb3e9584ac287e240b00"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": [0.0, 0],
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"parentnodes": ["6f96419950729f3671185b847352890f074f7557"],
|
|
|
|
"precnode": "94b33453f93bdb8d457ef9b770851a618bf413e1",
|
|
|
|
"succnodes": []
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": *, (glob)
|
|
|
|
"flag": 0,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "cda648ca50f50482b7055c0b0c4c117bba6733d9",
|
|
|
|
"succnodes": ["3de5eca88c00aa039da7399a220f4a5221faa585"]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
Template keywords
|
|
|
|
|
|
|
|
$ hg debugobsolete -r6 -T '{succnodes % "{node|short}"} {date|shortdate}\n'
|
|
|
|
3de5eca88c00 ????-??-?? (glob)
|
|
|
|
$ hg debugobsolete -r6 -T '{join(metadata % "{key}={value}", " ")}\n'
|
|
|
|
user=test
|
|
|
|
$ hg debugobsolete -r6 -T '{metadata}\n'
|
|
|
|
'user': 'test'
|
|
|
|
$ hg debugobsolete -r6 -T '{flag} {get(metadata, "user")}\n'
|
|
|
|
0 test
|
|
|
|
|
2015-04-14 18:44:04 +03:00
|
|
|
Test the debug output for exchange
|
|
|
|
----------------------------------
|
|
|
|
|
2016-08-03 16:52:11 +03:00
|
|
|
$ hg pull ../tmpb --config 'experimental.obsmarkers-exchange-debug=True' # bundle2
|
2015-04-14 18:44:04 +03:00
|
|
|
pulling from ../tmpb
|
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
obsmarker-exchange: 346 bytes received
|
|
|
|
|
2013-01-16 21:39:22 +04:00
|
|
|
check hgweb does not explode
|
|
|
|
====================================
|
|
|
|
|
|
|
|
$ hg unbundle $TESTDIR/bundles/hgweb+obs.hg
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 62 changesets with 63 changes to 9 files (+60 heads)
|
|
|
|
(run 'hg heads .' to see heads, 'hg merge' to merge)
|
|
|
|
$ for node in `hg log -r 'desc(babar_)' --template '{node}\n'`;
|
|
|
|
> do
|
|
|
|
> hg debugobsolete $node
|
|
|
|
> done
|
|
|
|
$ hg up tip
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
2017-01-08 22:37:44 +03:00
|
|
|
#if serve
|
|
|
|
|
2013-01-16 21:39:22 +04:00
|
|
|
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
|
|
|
|
$ cat hg.pid >> $DAEMON_PIDS
|
|
|
|
|
2013-01-16 17:19:28 +04:00
|
|
|
check changelog view
|
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'shortlog/'
|
2013-01-16 17:19:28 +04:00
|
|
|
200 Script output follows
|
2013-01-16 21:39:22 +04:00
|
|
|
|
2013-01-16 17:22:43 +04:00
|
|
|
check graph view
|
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'graph'
|
2013-01-16 17:22:43 +04:00
|
|
|
200 Script output follows
|
|
|
|
|
2013-01-16 21:39:22 +04:00
|
|
|
check filelog view
|
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'log/'`hg log -r . -T "{node}"`/'babar'
|
2013-01-16 21:39:22 +04:00
|
|
|
200 Script output follows
|
2013-01-31 22:56:55 +04:00
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'rev/68'
|
2013-01-31 22:56:55 +04:00
|
|
|
200 Script output follows
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
|
2013-02-02 01:21:47 +04:00
|
|
|
404 Not Found
|
2013-01-31 22:56:55 +04:00
|
|
|
[1]
|
|
|
|
|
|
|
|
check that web.view config option:
|
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ killdaemons.py hg.pid
|
2013-01-31 22:56:55 +04:00
|
|
|
$ cat >> .hg/hgrc << EOF
|
|
|
|
> [web]
|
|
|
|
> view=all
|
|
|
|
> EOF
|
|
|
|
$ wait
|
|
|
|
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'rev/67'
|
2013-01-31 22:56:55 +04:00
|
|
|
200 Script output follows
|
2015-06-08 22:44:30 +03:00
|
|
|
$ killdaemons.py hg.pid
|
2013-01-16 21:39:22 +04:00
|
|
|
|
2012-07-31 17:57:50 +04:00
|
|
|
Checking _enable=False warning if obsolete marker exists
|
2012-07-28 15:05:25 +04:00
|
|
|
|
2014-10-15 00:34:25 +04:00
|
|
|
$ echo '[experimental]' >> $HGRCPATH
|
|
|
|
$ echo "evolution=" >> $HGRCPATH
|
2012-07-28 15:05:25 +04:00
|
|
|
$ hg log -r tip
|
2013-01-16 21:39:22 +04:00
|
|
|
obsolete feature not enabled but 68 markers found!
|
2014-07-04 21:52:39 +04:00
|
|
|
68:c15e9edfca13 (draft) [tip ] add celestine
|
2013-02-06 11:55:29 +04:00
|
|
|
|
|
|
|
reenable for later test
|
|
|
|
|
2014-10-15 00:34:25 +04:00
|
|
|
$ echo '[experimental]' >> $HGRCPATH
|
|
|
|
$ echo "evolution=createmarkers,exchange" >> $HGRCPATH
|
2013-02-06 11:55:29 +04:00
|
|
|
|
2017-01-08 22:37:44 +03:00
|
|
|
$ rm hg.pid access.log errors.log
|
2013-02-06 11:55:29 +04:00
|
|
|
#endif
|
|
|
|
|
2017-01-06 17:48:22 +03:00
|
|
|
Several troubles on the same changeset (create an unstable and bumped changeset)
|
|
|
|
|
|
|
|
$ hg debugobsolete `getid obsolete_e`
|
|
|
|
$ hg debugobsolete `getid original_c` `getid babar`
|
|
|
|
$ hg log --config ui.logtemplate= -r 'bumped() and unstable()'
|
|
|
|
changeset: 7:50c51b361e60
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
trouble: unstable, bumped
|
|
|
|
summary: add babar
|
|
|
|
|
|
|
|
|
2017-01-06 15:50:16 +03:00
|
|
|
test the "troubles" templatekw
|
|
|
|
|
|
|
|
$ hg log -r 'bumped() and unstable()'
|
|
|
|
7:50c51b361e60 (draft unstable bumped) [ ] add babar
|
|
|
|
|
2017-01-06 15:50:52 +03:00
|
|
|
test the default cmdline template
|
|
|
|
|
|
|
|
$ hg log -T default -r 'bumped()'
|
|
|
|
changeset: 7:50c51b361e60
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
trouble: unstable, bumped
|
|
|
|
summary: add babar
|
|
|
|
|
|
|
|
|
2017-01-06 16:35:22 +03:00
|
|
|
test summary output
|
|
|
|
|
|
|
|
$ hg up -r 'bumped() and unstable()'
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg summary
|
|
|
|
parent: 7:50c51b361e60 (unstable, bumped)
|
|
|
|
add babar
|
|
|
|
branch: default
|
2017-01-08 22:37:44 +03:00
|
|
|
commit: (clean)
|
2017-01-06 16:35:22 +03:00
|
|
|
update: 2 new changesets (update)
|
|
|
|
phases: 4 draft
|
|
|
|
unstable: 2 changesets
|
|
|
|
bumped: 1 changesets
|
|
|
|
|
2013-02-06 11:55:29 +04:00
|
|
|
Test incoming/outcoming with changesets obsoleted remotely, known locally
|
|
|
|
===============================================================================
|
|
|
|
|
|
|
|
This test issue 3805
|
|
|
|
|
|
|
|
$ hg init repo-issue3805
|
|
|
|
$ cd repo-issue3805
|
2015-12-10 01:22:57 +03:00
|
|
|
$ echo "base" > base
|
|
|
|
$ hg ci -Am "base"
|
|
|
|
adding base
|
2013-02-06 11:55:29 +04:00
|
|
|
$ echo "foo" > foo
|
|
|
|
$ hg ci -Am "A"
|
|
|
|
adding foo
|
|
|
|
$ hg clone . ../other-issue3805
|
|
|
|
updating to branch default
|
2015-12-10 01:22:57 +03:00
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2013-02-06 11:55:29 +04:00
|
|
|
$ echo "bar" >> foo
|
|
|
|
$ hg ci --amend
|
|
|
|
$ cd ../other-issue3805
|
|
|
|
$ hg log -G
|
2015-12-10 01:22:57 +03:00
|
|
|
@ 1:29f0c6921ddd (draft) [tip ] A
|
|
|
|
|
|
|
|
|
o 0:d20a80d4def3 (draft) [ ] base
|
2013-02-06 11:55:29 +04:00
|
|
|
|
|
|
|
$ hg log -G -R ../repo-issue3805
|
2015-12-10 01:22:57 +03:00
|
|
|
@ 3:323a9c3ddd91 (draft) [tip ] A
|
|
|
|
|
|
|
|
|
o 0:d20a80d4def3 (draft) [ ] base
|
2013-02-06 11:55:29 +04:00
|
|
|
|
|
|
|
$ hg incoming
|
2013-02-13 15:35:57 +04:00
|
|
|
comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
|
2013-02-06 11:55:29 +04:00
|
|
|
searching for changes
|
2015-12-10 01:22:57 +03:00
|
|
|
3:323a9c3ddd91 (draft) [tip ] A
|
2013-02-06 11:55:29 +04:00
|
|
|
$ hg incoming --bundle ../issue3805.hg
|
2013-02-13 15:35:57 +04:00
|
|
|
comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
|
2013-02-06 11:55:29 +04:00
|
|
|
searching for changes
|
2015-12-10 01:22:57 +03:00
|
|
|
3:323a9c3ddd91 (draft) [tip ] A
|
2013-02-06 11:55:29 +04:00
|
|
|
$ hg outgoing
|
2013-02-13 15:35:57 +04:00
|
|
|
comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
|
2013-02-06 11:55:29 +04:00
|
|
|
searching for changes
|
2015-12-03 03:12:15 +03:00
|
|
|
1:29f0c6921ddd (draft) [tip ] A
|
2013-02-06 11:55:29 +04:00
|
|
|
|
|
|
|
#if serve
|
|
|
|
|
|
|
|
$ hg serve -R ../repo-issue3805 -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
|
|
|
|
$ cat hg.pid >> $DAEMON_PIDS
|
|
|
|
|
|
|
|
$ hg incoming http://localhost:$HGPORT
|
|
|
|
comparing with http://localhost:$HGPORT/
|
|
|
|
searching for changes
|
2015-12-10 01:22:57 +03:00
|
|
|
2:323a9c3ddd91 (draft) [tip ] A
|
2013-02-06 11:55:29 +04:00
|
|
|
$ hg outgoing http://localhost:$HGPORT
|
|
|
|
comparing with http://localhost:$HGPORT/
|
|
|
|
searching for changes
|
2015-12-03 03:12:15 +03:00
|
|
|
1:29f0c6921ddd (draft) [tip ] A
|
2013-02-06 11:55:29 +04:00
|
|
|
|
2015-06-08 22:55:40 +03:00
|
|
|
$ killdaemons.py
|
2013-02-06 11:55:29 +04:00
|
|
|
|
2013-01-30 22:40:07 +04:00
|
|
|
#endif
|
2013-02-09 21:54:01 +04:00
|
|
|
|
|
|
|
This test issue 3814
|
|
|
|
|
|
|
|
(nothing to push but locally hidden changeset)
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg init repo-issue3814
|
|
|
|
$ cd repo-issue3805
|
2015-12-10 01:22:57 +03:00
|
|
|
$ hg push -r 323a9c3ddd91 ../repo-issue3814
|
2013-02-09 21:54:01 +04:00
|
|
|
pushing to ../repo-issue3814
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2015-12-10 01:22:57 +03:00
|
|
|
added 2 changesets with 2 changes to 2 files
|
2015-05-27 14:21:39 +03:00
|
|
|
2 new obsolescence markers
|
2013-02-09 21:54:01 +04:00
|
|
|
$ hg out ../repo-issue3814
|
|
|
|
comparing with ../repo-issue3814
|
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
[1]
|
|
|
|
|
2014-03-19 05:10:33 +04:00
|
|
|
Test that a local tag blocks a changeset from being hidden
|
2013-02-09 21:54:01 +04:00
|
|
|
|
2015-12-10 01:22:57 +03:00
|
|
|
$ hg tag -l visible -r 1 --hidden
|
2014-03-19 05:10:33 +04:00
|
|
|
$ hg log -G
|
2015-12-10 01:22:57 +03:00
|
|
|
@ 3:323a9c3ddd91 (draft) [tip ] A
|
|
|
|
|
|
|
|
|
| x 1:29f0c6921ddd (draft) [visible ] A
|
|
|
|
|/
|
|
|
|
o 0:d20a80d4def3 (draft) [ ] base
|
2014-03-19 05:10:33 +04:00
|
|
|
|
2014-06-29 15:52:35 +04:00
|
|
|
Test that removing a local tag does not cause some commands to fail
|
|
|
|
|
|
|
|
$ hg tag -l -r tip tiptag
|
|
|
|
$ hg tags
|
2015-12-10 01:22:57 +03:00
|
|
|
tiptag 3:323a9c3ddd91
|
|
|
|
tip 3:323a9c3ddd91
|
|
|
|
visible 1:29f0c6921ddd
|
2014-06-29 15:52:35 +04:00
|
|
|
$ hg --config extensions.strip= strip -r tip --no-backup
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg tags
|
2015-12-10 01:22:57 +03:00
|
|
|
visible 1:29f0c6921ddd
|
|
|
|
tip 1:29f0c6921ddd
|
2014-10-02 04:26:33 +04:00
|
|
|
|
bundlerepo: disable filtering of changelog while constructing revision text
This avoids the following error that happened if base revision of bundle file
was hidden. bundlerevlog needs it to construct revision texts from bundle
content as revlog.revision() does.
File "mercurial/context.py", line 485, in _changeset
return self._repo.changelog.read(self.rev())
File "mercurial/changelog.py", line 319, in read
text = self.revision(node)
File "mercurial/bundlerepo.py", line 124, in revision
text = self.baserevision(iterrev)
File "mercurial/bundlerepo.py", line 160, in baserevision
return changelog.changelog.revision(self, nodeorrev)
File "mercurial/revlog.py", line 1041, in revision
node = self.node(rev)
File "mercurial/changelog.py", line 211, in node
raise error.FilteredIndexError(rev)
mercurial.error.FilteredIndexError: 1
2015-04-29 13:47:37 +03:00
|
|
|
Test bundle overlay onto hidden revision
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg init repo-bundleoverlay
|
|
|
|
$ cd repo-bundleoverlay
|
|
|
|
$ echo "A" > foo
|
|
|
|
$ hg ci -Am "A"
|
|
|
|
adding foo
|
|
|
|
$ echo "B" >> foo
|
|
|
|
$ hg ci -m "B"
|
|
|
|
$ hg up 0
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ echo "C" >> foo
|
|
|
|
$ hg ci -m "C"
|
|
|
|
created new head
|
|
|
|
$ hg log -G
|
|
|
|
@ 2:c186d7714947 (draft) [tip ] C
|
|
|
|
|
|
|
|
|
| o 1:44526ebb0f98 (draft) [ ] B
|
|
|
|
|/
|
|
|
|
o 0:4b34ecfb0d56 (draft) [ ] A
|
|
|
|
|
|
|
|
|
|
|
|
$ hg clone -r1 . ../other-bundleoverlay
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 2 changesets with 2 changes to 1 files
|
|
|
|
updating to branch default
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ cd ../other-bundleoverlay
|
|
|
|
$ echo "B+" >> foo
|
|
|
|
$ hg ci --amend -m "B+"
|
|
|
|
$ hg log -G --hidden
|
|
|
|
@ 3:b7d587542d40 (draft) [tip ] B+
|
|
|
|
|
|
|
|
|
| x 2:eb95e9297e18 (draft) [ ] temporary amend commit for 44526ebb0f98
|
|
|
|
| |
|
|
|
|
| x 1:44526ebb0f98 (draft) [ ] B
|
|
|
|
|/
|
|
|
|
o 0:4b34ecfb0d56 (draft) [ ] A
|
|
|
|
|
|
|
|
|
|
|
|
$ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
|
|
|
|
comparing with ../repo-bundleoverlay
|
|
|
|
searching for changes
|
|
|
|
1:44526ebb0f98 (draft) [ ] B
|
|
|
|
2:c186d7714947 (draft) [tip ] C
|
|
|
|
$ hg log -G -R ../bundleoverlay.hg
|
|
|
|
o 4:c186d7714947 (draft) [tip ] C
|
|
|
|
|
|
|
|
|
| @ 3:b7d587542d40 (draft) [ ] B+
|
|
|
|
|/
|
|
|
|
o 0:4b34ecfb0d56 (draft) [ ] A
|
|
|
|
|
|
|
|
|
2015-02-19 14:32:06 +03:00
|
|
|
#if serve
|
|
|
|
|
|
|
|
Test issue 4506
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg init repo-issue4506
|
|
|
|
$ cd repo-issue4506
|
|
|
|
$ echo "0" > foo
|
|
|
|
$ hg add foo
|
|
|
|
$ hg ci -m "content-0"
|
|
|
|
|
|
|
|
$ hg up null
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo "1" > bar
|
|
|
|
$ hg add bar
|
|
|
|
$ hg ci -m "content-1"
|
|
|
|
created new head
|
|
|
|
$ hg up 0
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ hg graft 1
|
|
|
|
grafting 1:1c9eddb02162 "content-1" (tip)
|
|
|
|
|
|
|
|
$ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
|
|
|
|
|
|
|
|
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
|
|
|
|
$ cat hg.pid >> $DAEMON_PIDS
|
|
|
|
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'rev/1'
|
2015-02-19 14:32:06 +03:00
|
|
|
404 Not Found
|
|
|
|
[1]
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'file/tip/bar'
|
2015-02-19 14:32:06 +03:00
|
|
|
200 Script output follows
|
2015-06-08 22:44:30 +03:00
|
|
|
$ get-with-headers.py --headeronly localhost:$HGPORT 'annotate/tip/bar'
|
2015-02-19 14:32:06 +03:00
|
|
|
200 Script output follows
|
|
|
|
|
2015-06-08 22:55:40 +03:00
|
|
|
$ killdaemons.py
|
2015-02-19 14:32:06 +03:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2015-05-26 22:09:04 +03:00
|
|
|
Test heads computation on pending index changes with obsolescence markers
|
|
|
|
$ cd ..
|
|
|
|
$ cat >$TESTTMP/test_extension.py << EOF
|
|
|
|
> from mercurial import cmdutil
|
|
|
|
> from mercurial.i18n import _
|
|
|
|
>
|
|
|
|
> cmdtable = {}
|
|
|
|
> command = cmdutil.command(cmdtable)
|
|
|
|
> @command("amendtransient",[], _('hg amendtransient [rev]'))
|
|
|
|
> def amend(ui, repo, *pats, **opts):
|
|
|
|
> def commitfunc(ui, repo, message, match, opts):
|
|
|
|
> return repo.commit(message, repo['.'].user(), repo['.'].date(), match)
|
|
|
|
> opts['message'] = 'Test'
|
|
|
|
> opts['logfile'] = None
|
|
|
|
> cmdutil.amend(ui, repo, commitfunc, repo['.'], {}, pats, opts)
|
2016-03-15 12:51:42 +03:00
|
|
|
> ui.write('%s\n' % repo.changelog.headrevs())
|
2015-05-26 22:09:04 +03:00
|
|
|
> EOF
|
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
|
|
|
> testextension=$TESTTMP/test_extension.py
|
|
|
|
> EOF
|
|
|
|
$ hg init repo-issue-nativerevs-pending-changes
|
|
|
|
$ cd repo-issue-nativerevs-pending-changes
|
|
|
|
$ mkcommit a
|
|
|
|
$ mkcommit b
|
|
|
|
$ hg up ".^"
|
|
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ echo aa > a
|
|
|
|
$ hg amendtransient
|
|
|
|
[1, 3]
|
2015-06-13 10:51:43 +03:00
|
|
|
|
2016-01-21 00:43:01 +03:00
|
|
|
Check that corrupted hidden cache does not crash
|
|
|
|
|
|
|
|
$ printf "" > .hg/cache/hidden
|
|
|
|
$ hg log -r . -T '{node}' --debug
|
|
|
|
corrupted hidden cache
|
|
|
|
8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
|
|
|
|
$ hg log -r . -T '{node}' --debug
|
|
|
|
8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
|
|
|
|
|
2016-01-21 05:56:37 +03:00
|
|
|
#if unix-permissions
|
2016-01-21 00:43:01 +03:00
|
|
|
Check that wrong hidden cache permission does not crash
|
|
|
|
|
|
|
|
$ chmod 000 .hg/cache/hidden
|
|
|
|
$ hg log -r . -T '{node}' --debug
|
|
|
|
cannot read hidden cache
|
|
|
|
error writing hidden changesets cache
|
|
|
|
8fd96dfc63e51ed5a8af1bec18eb4b19dbf83812 (no-eol)
|
2016-01-21 05:56:37 +03:00
|
|
|
#endif
|
2016-01-21 00:43:01 +03:00
|
|
|
|
2015-06-13 10:51:43 +03:00
|
|
|
Test cache consistency for the visible filter
|
|
|
|
1) We want to make sure that the cached filtered revs are invalidated when
|
|
|
|
bookmarks change
|
|
|
|
$ cd ..
|
|
|
|
$ cat >$TESTTMP/test_extension.py << EOF
|
2016-05-05 16:41:37 +03:00
|
|
|
> import weakref
|
2015-06-13 10:51:43 +03:00
|
|
|
> from mercurial import cmdutil, extensions, bookmarks, repoview
|
|
|
|
> def _bookmarkchanged(orig, bkmstoreinst, *args, **kwargs):
|
2016-05-05 16:41:37 +03:00
|
|
|
> reporef = weakref.ref(bkmstoreinst._repo)
|
|
|
|
> def trhook(tr):
|
|
|
|
> repo = reporef()
|
|
|
|
> hidden1 = repoview.computehidden(repo)
|
|
|
|
> hidden = repoview.filterrevs(repo, 'visible')
|
|
|
|
> if sorted(hidden1) != sorted(hidden):
|
|
|
|
> print "cache inconsistency"
|
|
|
|
> bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
|
|
|
|
> orig(bkmstoreinst, *args, **kwargs)
|
2015-06-13 10:51:43 +03:00
|
|
|
> def extsetup(ui):
|
2016-05-05 16:41:37 +03:00
|
|
|
> extensions.wrapfunction(bookmarks.bmstore, 'recordchange',
|
|
|
|
> _bookmarkchanged)
|
2015-06-13 10:51:43 +03:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ hg init repo-cache-inconsistency
|
|
|
|
$ cd repo-issue-nativerevs-pending-changes
|
|
|
|
$ mkcommit a
|
|
|
|
a already tracked!
|
|
|
|
$ mkcommit b
|
|
|
|
$ hg id
|
|
|
|
13bedc178fce tip
|
|
|
|
$ echo "hello" > b
|
|
|
|
$ hg commit --amend -m "message"
|
|
|
|
$ hg book bookb -r 13bedc178fce --hidden
|
|
|
|
$ hg log -r 13bedc178fce
|
|
|
|
5:13bedc178fce (draft) [ bookb] add b
|
|
|
|
$ hg book -d bookb
|
|
|
|
$ hg log -r 13bedc178fce
|
|
|
|
abort: hidden revision '13bedc178fce'!
|
|
|
|
(use --hidden to access hidden revisions)
|
|
|
|
[255]
|
|
|
|
|
2016-05-05 16:41:37 +03:00
|
|
|
Empty out the test extension, as it isn't compatible with later parts
|
|
|
|
of the test.
|
|
|
|
$ echo > $TESTTMP/test_extension.py
|
|
|
|
|
2016-02-22 20:35:40 +03:00
|
|
|
Test ability to pull changeset with locally applying obsolescence markers
|
|
|
|
(issue4945)
|
2015-06-13 10:51:43 +03:00
|
|
|
|
2016-02-22 20:35:40 +03:00
|
|
|
$ cd ..
|
|
|
|
$ hg init issue4845
|
|
|
|
$ cd issue4845
|
|
|
|
|
|
|
|
$ echo foo > f0
|
|
|
|
$ hg add f0
|
|
|
|
$ hg ci -m '0'
|
|
|
|
$ echo foo > f1
|
|
|
|
$ hg add f1
|
|
|
|
$ hg ci -m '1'
|
|
|
|
$ echo foo > f2
|
|
|
|
$ hg add f2
|
|
|
|
$ hg ci -m '2'
|
|
|
|
|
|
|
|
$ echo bar > f2
|
|
|
|
$ hg commit --amend --config experimetnal.evolution=createmarkers
|
|
|
|
$ hg log -G
|
|
|
|
@ 4:b0551702f918 (draft) [tip ] 2
|
|
|
|
|
|
|
|
|
o 1:e016b03fd86f (draft) [ ] 1
|
|
|
|
|
|
|
|
|
o 0:a78f55e5508c (draft) [ ] 0
|
|
|
|
|
|
|
|
$ hg log -G --hidden
|
|
|
|
@ 4:b0551702f918 (draft) [tip ] 2
|
|
|
|
|
|
|
|
|
| x 3:f27abbcc1f77 (draft) [ ] temporary amend commit for e008cf283490
|
|
|
|
| |
|
|
|
|
| x 2:e008cf283490 (draft) [ ] 2
|
|
|
|
|/
|
|
|
|
o 1:e016b03fd86f (draft) [ ] 1
|
|
|
|
|
|
|
|
|
o 0:a78f55e5508c (draft) [ ] 0
|
|
|
|
|
|
|
|
|
|
|
|
$ hg strip -r 1 --config extensions.strip=
|
|
|
|
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
|
|
|
saved backup bundle to $TESTTMP/tmpe/issue4845/.hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg (glob)
|
|
|
|
$ hg log -G
|
|
|
|
@ 0:a78f55e5508c (draft) [tip ] 0
|
|
|
|
|
|
|
|
$ hg log -G --hidden
|
|
|
|
@ 0:a78f55e5508c (draft) [tip ] 0
|
|
|
|
|
|
|
|
|
|
|
|
$ hg pull .hg/strip-backup/*
|
|
|
|
pulling from .hg/strip-backup/e016b03fd86f-c41c6bcc-backup.hg
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 2 changesets with 2 changes to 2 files
|
|
|
|
(run 'hg update' to get a working copy)
|
|
|
|
$ hg log -G
|
|
|
|
o 2:b0551702f918 (draft) [tip ] 2
|
|
|
|
|
|
|
|
|
o 1:e016b03fd86f (draft) [ ] 1
|
|
|
|
|
|
|
|
|
@ 0:a78f55e5508c (draft) [ ] 0
|
|
|
|
|
|
|
|
$ hg log -G --hidden
|
|
|
|
o 2:b0551702f918 (draft) [tip ] 2
|
|
|
|
|
|
|
|
|
o 1:e016b03fd86f (draft) [ ] 1
|
|
|
|
|
|
|
|
|
@ 0:a78f55e5508c (draft) [ ] 0
|
|
|
|
|
2016-04-04 12:05:10 +03:00
|
|
|
Test that 'hg debugobsolete --index --rev' can show indices of obsmarkers when
|
|
|
|
only a subset of those are displayed (because of --rev option)
|
|
|
|
$ hg init doindexrev
|
|
|
|
$ cd doindexrev
|
|
|
|
$ echo a > a
|
|
|
|
$ hg ci -Am a
|
|
|
|
adding a
|
|
|
|
$ hg ci --amend -m aa
|
|
|
|
$ echo b > b
|
|
|
|
$ hg ci -Am b
|
|
|
|
adding b
|
|
|
|
$ hg ci --amend -m bb
|
|
|
|
$ echo c > c
|
|
|
|
$ hg ci -Am c
|
|
|
|
adding c
|
|
|
|
$ hg ci --amend -m cc
|
|
|
|
$ echo d > d
|
|
|
|
$ hg ci -Am d
|
|
|
|
adding d
|
|
|
|
$ hg ci --amend -m dd
|
|
|
|
$ hg debugobsolete --index --rev "3+7"
|
|
|
|
1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
|
2016-08-15 10:07:55 +03:00
|
|
|
$ hg debugobsolete --index --rev "3+7" -Tjson
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"date": *, (glob)
|
|
|
|
"flag": 0,
|
|
|
|
"index": 1,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1",
|
|
|
|
"succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"date": *, (glob)
|
|
|
|
"flag": 0,
|
|
|
|
"index": 3,
|
|
|
|
"metadata": {"user": "test"},
|
|
|
|
"precnode": "4715cf767440ed891755448016c2b8cf70760c30",
|
|
|
|
"succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"]
|
|
|
|
}
|
|
|
|
]
|
2015-06-13 10:51:43 +03:00
|
|
|
|
2016-04-02 01:12:50 +03:00
|
|
|
Test the --delete option of debugobsolete command
|
2016-04-12 13:40:53 +03:00
|
|
|
$ hg debugobsolete --index
|
|
|
|
0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
$ hg debugobsolete --delete 1 --delete 3
|
2016-10-18 00:16:55 +03:00
|
|
|
deleted 2 obsolescence markers
|
2016-04-02 01:12:50 +03:00
|
|
|
$ hg debugobsolete
|
2016-04-12 13:40:53 +03:00
|
|
|
cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re)
|
|
|
|
1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re)
|
2016-04-02 01:12:50 +03:00
|
|
|
$ cd ..
|
2016-04-12 13:40:53 +03:00
|
|
|
|