2010-09-03 14:58:51 +04:00
|
|
|
Create test repository:
|
|
|
|
|
2010-09-13 15:09:26 +04:00
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
2010-09-03 14:58:51 +04:00
|
|
|
$ echo x1 > x.txt
|
|
|
|
|
|
|
|
$ hg init foo
|
|
|
|
$ cd foo
|
|
|
|
$ echo y1 > y.txt
|
|
|
|
|
|
|
|
$ hg init bar
|
|
|
|
$ cd bar
|
|
|
|
$ echo z1 > z.txt
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ echo 'bar = bar' > .hgsub
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ echo 'foo = foo' > .hgsub
|
2010-09-13 15:09:20 +04:00
|
|
|
|
|
|
|
Add files --- .hgsub files must go first to trigger subrepos:
|
|
|
|
|
|
|
|
$ hg add -S .hgsub
|
|
|
|
$ hg add -S foo/.hgsub
|
|
|
|
$ hg add -S foo/bar
|
2011-11-16 06:45:14 +04:00
|
|
|
adding foo/bar/z.txt (glob)
|
2010-09-13 15:09:20 +04:00
|
|
|
$ hg add -S
|
|
|
|
adding x.txt
|
2011-11-16 06:45:14 +04:00
|
|
|
adding foo/y.txt (glob)
|
2010-09-03 14:58:51 +04:00
|
|
|
|
2010-09-07 18:23:55 +04:00
|
|
|
Test recursive status without committing anything:
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S
|
2010-09-07 18:23:55 +04:00
|
|
|
A .hgsub
|
|
|
|
A foo/.hgsub
|
|
|
|
A foo/bar/z.txt
|
|
|
|
A foo/y.txt
|
|
|
|
A x.txt
|
|
|
|
|
|
|
|
Test recursive diff without committing anything:
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S foo
|
2010-09-07 18:23:55 +04:00
|
|
|
diff -r 000000000000 foo/.hgsub
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/foo/.hgsub
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+bar = bar
|
|
|
|
diff -r 000000000000 foo/y.txt
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+y1
|
|
|
|
diff -r 000000000000 foo/bar/z.txt
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+z1
|
|
|
|
|
|
|
|
Commits:
|
|
|
|
|
2011-10-21 02:33:08 +04:00
|
|
|
$ hg commit -m fails
|
2015-03-25 07:55:32 +03:00
|
|
|
abort: uncommitted changes in subrepository 'foo'
|
2011-10-21 02:33:08 +04:00
|
|
|
(use --subrepos for recursive commit)
|
|
|
|
[255]
|
|
|
|
|
|
|
|
The --subrepos flag overwrite the config setting:
|
|
|
|
|
|
|
|
$ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos
|
2010-09-03 14:58:51 +04:00
|
|
|
committing subrepository foo
|
2011-11-16 06:45:14 +04:00
|
|
|
committing subrepository foo/bar (glob)
|
2010-09-03 14:58:51 +04:00
|
|
|
|
|
|
|
$ cd foo
|
|
|
|
$ echo y2 >> y.txt
|
|
|
|
$ hg commit -m 0-1-0
|
|
|
|
|
|
|
|
$ cd bar
|
|
|
|
$ echo z2 >> z.txt
|
|
|
|
$ hg commit -m 0-1-1
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg commit -m 0-2-1
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg commit -m 1-2-1
|
|
|
|
|
|
|
|
Change working directory:
|
|
|
|
|
|
|
|
$ echo y3 >> foo/y.txt
|
|
|
|
$ echo z3 >> foo/bar/z.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S
|
2010-09-03 14:58:51 +04:00
|
|
|
M foo/bar/z.txt
|
|
|
|
M foo/y.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S
|
2010-09-03 14:58:51 +04:00
|
|
|
diff -r d254738c5f5e foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
y1
|
|
|
|
y2
|
|
|
|
+y3
|
|
|
|
diff -r 9647f22de499 foo/bar/z.txt
|
|
|
|
--- a/foo/bar/z.txt
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
z1
|
|
|
|
z2
|
|
|
|
+z3
|
2010-09-03 14:58:51 +04:00
|
|
|
|
|
|
|
Status call crossing repository boundaries:
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S foo/bar/z.txt
|
2010-09-03 14:58:51 +04:00
|
|
|
M foo/bar/z.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S -I 'foo/?.txt'
|
2010-09-03 14:58:51 +04:00
|
|
|
M foo/y.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S -I '**/?.txt'
|
2010-09-03 14:58:51 +04:00
|
|
|
M foo/bar/z.txt
|
|
|
|
M foo/y.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S -I '**/?.txt'
|
2010-09-03 14:58:51 +04:00
|
|
|
diff -r d254738c5f5e foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
y1
|
|
|
|
y2
|
|
|
|
+y3
|
|
|
|
diff -r 9647f22de499 foo/bar/z.txt
|
|
|
|
--- a/foo/bar/z.txt
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
z1
|
|
|
|
z2
|
|
|
|
+z3
|
2010-09-03 14:58:51 +04:00
|
|
|
|
|
|
|
Status from within a subdirectory:
|
|
|
|
|
|
|
|
$ mkdir dir
|
|
|
|
$ cd dir
|
|
|
|
$ echo a1 > a.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S
|
2010-09-03 14:58:51 +04:00
|
|
|
M foo/bar/z.txt
|
|
|
|
M foo/y.txt
|
|
|
|
? dir/a.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S
|
2010-09-03 14:58:51 +04:00
|
|
|
diff -r d254738c5f5e foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
y1
|
|
|
|
y2
|
|
|
|
+y3
|
|
|
|
diff -r 9647f22de499 foo/bar/z.txt
|
|
|
|
--- a/foo/bar/z.txt
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
z1
|
|
|
|
z2
|
|
|
|
+z3
|
2010-09-03 14:58:51 +04:00
|
|
|
|
|
|
|
Status with relative path:
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S ..
|
2010-09-03 14:58:51 +04:00
|
|
|
M ../foo/bar/z.txt
|
|
|
|
M ../foo/y.txt
|
|
|
|
? a.txt
|
largefiles: revert to lfilesrepo.status() being an unfiltered method
This effectively reverts 9fc565fa1621, which caused some normal file copies to
not be displayed as copies. Other normal file copies could be displayed- the
exact reason isn't clear. This also adds two tests that were failing prior to
this backout, so that this can be sorted out next cycle.
The difference between copy cases that worked and those that didn't seemed to be
in copies.pathcopies(). When largefiles isn't enabled for the changed test, or
lfstatus is not set in the commands.status() override, 'y.ancestor(x) == x'.
That wasn't true otherwise, which fell through to the _chain() method. In this
case, the copy is removed in the criss cross loop.
'y.ancestor(x)' returns a context.changectx type, while 'x' is a lfilesctx type
in the failing case. I tried adding the ancestor method to the lfilesctx class
to change the type of the ancestor context, however the context when printed as
a string then gains a '+'. This points to it being a context.committablectx,
which clearly isn't correct for an ancestor. Possibly the problem is the
lfilesctx needs to subclass context.committablectx in some cases, but
context.changectx in others, within the same invocation? I'm not sure how to
pull that off, and backing out this change is safer during the freeze.
As to the status changing when a path is specified, I haven't looked into it
yet.
2015-01-26 06:55:10 +03:00
|
|
|
|
|
|
|
XXX: filtering lfilesrepo.status() in 3.3-rc causes these files to be listed as
|
|
|
|
added instead of modified.
|
|
|
|
$ hg status -S .. --config extensions.largefiles=
|
|
|
|
M ../foo/bar/z.txt
|
|
|
|
M ../foo/y.txt
|
|
|
|
? a.txt
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S ..
|
2010-09-03 14:58:51 +04:00
|
|
|
diff -r d254738c5f5e foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
y1
|
|
|
|
y2
|
|
|
|
+y3
|
|
|
|
diff -r 9647f22de499 foo/bar/z.txt
|
|
|
|
--- a/foo/bar/z.txt
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -1,2 +1,3 @@
|
|
|
|
z1
|
|
|
|
z2
|
|
|
|
+z3
|
2010-09-03 14:58:51 +04:00
|
|
|
$ cd ..
|
|
|
|
|
2010-09-03 14:58:51 +04:00
|
|
|
Cleanup and final commit:
|
2010-09-03 14:58:51 +04:00
|
|
|
|
|
|
|
$ rm -r dir
|
2011-10-21 02:33:08 +04:00
|
|
|
$ hg commit --subrepos -m 2-3-2
|
2010-09-03 14:58:51 +04:00
|
|
|
committing subrepository foo
|
2011-11-16 06:45:14 +04:00
|
|
|
committing subrepository foo/bar (glob)
|
2010-09-03 14:58:51 +04:00
|
|
|
|
2012-01-18 04:10:54 +04:00
|
|
|
Test explicit path commands within subrepos: add/forget
|
|
|
|
$ echo z1 > foo/bar/z2.txt
|
|
|
|
$ hg status -S
|
|
|
|
? foo/bar/z2.txt
|
|
|
|
$ hg add foo/bar/z2.txt
|
|
|
|
$ hg status -S
|
|
|
|
A foo/bar/z2.txt
|
|
|
|
$ hg forget foo/bar/z2.txt
|
|
|
|
$ hg status -S
|
|
|
|
? foo/bar/z2.txt
|
2012-02-06 09:37:49 +04:00
|
|
|
$ hg forget foo/bar/z2.txt
|
2012-04-28 03:55:39 +04:00
|
|
|
not removing foo/bar/z2.txt: file is already untracked (glob)
|
2012-02-06 09:37:49 +04:00
|
|
|
[1]
|
|
|
|
$ hg status -S
|
|
|
|
? foo/bar/z2.txt
|
2012-01-18 04:10:54 +04:00
|
|
|
$ rm foo/bar/z2.txt
|
|
|
|
|
2010-09-03 14:58:51 +04:00
|
|
|
Log with the relationships between repo and its subrepo:
|
|
|
|
|
|
|
|
$ hg log --template '{rev}:{node|short} {desc}\n'
|
|
|
|
2:1326fa26d0c0 2-3-2
|
|
|
|
1:4b3c9ff4f66b 1-2-1
|
|
|
|
0:23376cbba0d8 0-0-0
|
|
|
|
|
|
|
|
$ hg -R foo log --template '{rev}:{node|short} {desc}\n'
|
|
|
|
3:65903cebad86 2-3-2
|
|
|
|
2:d254738c5f5e 0-2-1
|
|
|
|
1:8629ce7dcc39 0-1-0
|
|
|
|
0:af048e97ade2 0-0-0
|
|
|
|
|
|
|
|
$ hg -R foo/bar log --template '{rev}:{node|short} {desc}\n'
|
|
|
|
2:31ecbdafd357 2-3-2
|
|
|
|
1:9647f22de499 0-1-1
|
|
|
|
0:4904098473f9 0-0-0
|
|
|
|
|
|
|
|
Status between revisions:
|
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S
|
|
|
|
$ hg status -S --rev 0:1
|
2010-09-03 14:58:51 +04:00
|
|
|
M .hgsubstate
|
|
|
|
M foo/.hgsubstate
|
|
|
|
M foo/bar/z.txt
|
|
|
|
M foo/y.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S -I '**/?.txt' --rev 0:1
|
2010-09-03 14:58:51 +04:00
|
|
|
diff -r af048e97ade2 -r d254738c5f5e foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,1 +1,2 @@
|
|
|
|
y1
|
|
|
|
+y2
|
|
|
|
diff -r 4904098473f9 -r 9647f22de499 foo/bar/z.txt
|
|
|
|
--- a/foo/bar/z.txt
|
|
|
|
+++ b/foo/bar/z.txt
|
|
|
|
@@ -1,1 +1,2 @@
|
|
|
|
z1
|
|
|
|
+z2
|
2010-09-13 15:09:26 +04:00
|
|
|
|
2010-11-29 18:34:10 +03:00
|
|
|
Enable progress extension for archive tests:
|
|
|
|
|
|
|
|
$ cp $HGRCPATH $HGRCPATH.no-progress
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [extensions]
|
|
|
|
> progress =
|
|
|
|
> [progress]
|
2015-06-08 03:50:56 +03:00
|
|
|
> disable=False
|
2010-11-29 18:34:10 +03:00
|
|
|
> assume-tty = 1
|
|
|
|
> delay = 0
|
2015-04-04 06:12:21 +03:00
|
|
|
> # set changedelay really large so we don't see nested topics
|
|
|
|
> changedelay = 30000
|
2010-12-15 19:55:14 +03:00
|
|
|
> format = topic bar number
|
2010-11-29 18:34:10 +03:00
|
|
|
> refresh = 0
|
|
|
|
> width = 60
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
Test archiving to a directory tree (the doubled lines in the output
|
|
|
|
only show up in the test output, not in real usage):
|
|
|
|
|
2012-10-10 03:37:54 +04:00
|
|
|
$ hg archive --subrepos ../archive
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving [=============> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving [===========================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving [==========================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving (foo) [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-06-10 06:40:13 +03:00
|
|
|
archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
|
|
|
|
archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
|
2012-10-10 03:37:54 +04:00
|
|
|
\r (no-eol) (esc)
|
2010-09-22 01:58:32 +04:00
|
|
|
$ find ../archive | sort
|
2010-09-20 17:46:17 +04:00
|
|
|
../archive
|
2010-09-22 01:58:32 +04:00
|
|
|
../archive/.hg_archival.txt
|
|
|
|
../archive/.hgsub
|
|
|
|
../archive/.hgsubstate
|
2010-09-20 17:46:17 +04:00
|
|
|
../archive/foo
|
2010-09-22 01:58:32 +04:00
|
|
|
../archive/foo/.hgsub
|
|
|
|
../archive/foo/.hgsubstate
|
2010-09-20 17:46:17 +04:00
|
|
|
../archive/foo/bar
|
|
|
|
../archive/foo/bar/z.txt
|
|
|
|
../archive/foo/y.txt
|
|
|
|
../archive/x.txt
|
|
|
|
|
2010-09-21 00:50:36 +04:00
|
|
|
Test archiving to zip file (unzip output is unstable):
|
2010-09-20 17:46:17 +04:00
|
|
|
|
2015-05-06 03:52:38 +03:00
|
|
|
$ hg archive --subrepos --prefix '.' ../archive.zip
|
2012-10-10 03:37:54 +04:00
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving [=============> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving [===========================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving [==========================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving (foo) [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-06-10 06:40:13 +03:00
|
|
|
archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
|
|
|
|
archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
|
2012-10-10 03:37:54 +04:00
|
|
|
\r (no-eol) (esc)
|
2015-05-08 00:57:02 +03:00
|
|
|
|
|
|
|
(unzip date formating is unstable, we do not care about it and glob it out)
|
|
|
|
|
2015-05-06 03:52:38 +03:00
|
|
|
$ unzip -l ../archive.zip
|
|
|
|
Archive: ../archive.zip
|
2015-06-17 23:45:25 +03:00
|
|
|
Length [ ]* Date [ ]* Time [ ]* Name (re)
|
|
|
|
[\- ]* (re)
|
|
|
|
172 [0-9:\- ]* .hg_archival.txt (re)
|
|
|
|
10 [0-9:\- ]* .hgsub (re)
|
|
|
|
45 [0-9:\- ]* .hgsubstate (re)
|
|
|
|
3 [0-9:\- ]* x.txt (re)
|
|
|
|
10 [0-9:\- ]* foo/.hgsub (re)
|
|
|
|
45 [0-9:\- ]* foo/.hgsubstate (re)
|
|
|
|
9 [0-9:\- ]* foo/y.txt (re)
|
|
|
|
9 [0-9:\- ]* foo/bar/z.txt (re)
|
|
|
|
[\- ]* (re)
|
|
|
|
303 [ ]* 8 files (re)
|
2010-11-29 18:34:10 +03:00
|
|
|
|
2011-10-17 18:45:19 +04:00
|
|
|
Test archiving a revision that references a subrepo that is not yet
|
|
|
|
cloned:
|
|
|
|
|
2015-04-04 01:19:24 +03:00
|
|
|
#if hardlink
|
2011-10-17 18:45:19 +04:00
|
|
|
$ hg clone -U . ../empty
|
2015-03-14 01:28:11 +03:00
|
|
|
\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 1\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 2\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 3\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 4\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 5\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 6\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 7\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 8\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-04-04 01:19:24 +03:00
|
|
|
#else
|
|
|
|
$ hg clone -U . ../empty
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 1 (no-eol)
|
|
|
|
#endif
|
|
|
|
|
2011-10-17 18:45:19 +04:00
|
|
|
$ cd ../empty
|
2015-04-04 01:19:24 +03:00
|
|
|
#if hardlink
|
2015-05-06 03:52:38 +03:00
|
|
|
$ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
|
2012-10-10 03:37:54 +04:00
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving [=============> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving [===========================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving [==========================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-03-14 01:28:11 +03:00
|
|
|
linking [ <=> ] 1\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 2\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 3\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 4\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 5\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 6\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 7\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 8\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2012-10-10 03:37:54 +04:00
|
|
|
archiving (foo) [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [===========> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [=======================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-03-14 01:28:11 +03:00
|
|
|
linking [ <=> ] 1\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 2\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 3\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 4\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 5\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 6\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
2015-06-10 06:40:13 +03:00
|
|
|
archiving (foo/bar) [ ] 0/1\r (no-eol) (glob) (esc)
|
|
|
|
archiving (foo/bar) [================================>] 1/1\r (no-eol) (glob) (esc)
|
2012-10-10 03:37:54 +04:00
|
|
|
\r (no-eol) (esc)
|
2011-10-17 18:45:19 +04:00
|
|
|
cloning subrepo foo from $TESTTMP/repo/foo
|
2011-11-16 06:45:14 +04:00
|
|
|
cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
|
2015-04-04 01:19:24 +03:00
|
|
|
#else
|
|
|
|
Note there's a slight output glitch on non-hardlink systems: the last
|
|
|
|
"linking" progress topic never gets closed, leading to slight output corruption on that platform.
|
2015-05-06 03:52:38 +03:00
|
|
|
$ hg archive --subrepos -r tip --prefix './' ../archive.tar.gz
|
2015-04-04 01:19:24 +03:00
|
|
|
\r (no-eol) (esc)
|
|
|
|
archiving [ ] 0/3\r (no-eol) (esc)
|
|
|
|
archiving [=============> ] 1/3\r (no-eol) (esc)
|
|
|
|
archiving [===========================> ] 2/3\r (no-eol) (esc)
|
|
|
|
archiving [==========================================>] 3/3\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
\r (no-eol) (esc)
|
|
|
|
linking [ <=> ] 1\r (no-eol) (esc)
|
|
|
|
cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
|
|
|
|
#endif
|
2012-10-10 03:37:54 +04:00
|
|
|
|
2015-05-05 05:33:29 +03:00
|
|
|
Archive + subrepos uses '/' for all component separators
|
|
|
|
|
|
|
|
$ tar -tzf ../archive.tar.gz | sort
|
2015-05-06 03:52:38 +03:00
|
|
|
.hg_archival.txt
|
|
|
|
.hgsub
|
|
|
|
.hgsubstate
|
|
|
|
foo/.hgsub
|
|
|
|
foo/.hgsubstate
|
|
|
|
foo/bar/z.txt
|
|
|
|
foo/y.txt
|
|
|
|
x.txt
|
2015-05-05 05:33:29 +03:00
|
|
|
|
2011-10-17 18:45:19 +04:00
|
|
|
The newly cloned subrepos contain no working copy:
|
|
|
|
|
|
|
|
$ hg -R foo summary
|
|
|
|
parent: -1:000000000000 (no revision checked out)
|
|
|
|
branch: default
|
|
|
|
commit: (clean)
|
|
|
|
update: 4 new changesets (update)
|
|
|
|
|
2010-11-29 18:34:10 +03:00
|
|
|
Disable progress extension and cleanup:
|
|
|
|
|
|
|
|
$ mv $HGRCPATH.no-progress $HGRCPATH
|
2010-09-20 17:46:17 +04:00
|
|
|
|
2011-10-17 20:01:38 +04:00
|
|
|
Test archiving when there is a directory in the way for a subrepo
|
|
|
|
created by archive:
|
|
|
|
|
|
|
|
$ hg clone -U . ../almost-empty
|
|
|
|
$ cd ../almost-empty
|
|
|
|
$ mkdir foo
|
|
|
|
$ echo f > foo/f
|
|
|
|
$ hg archive --subrepos -r tip archive
|
|
|
|
cloning subrepo foo from $TESTTMP/empty/foo
|
2012-12-14 02:37:53 +04:00
|
|
|
abort: destination '$TESTTMP/almost-empty/foo' is not empty (in subrepo foo) (glob)
|
2011-10-17 20:01:38 +04:00
|
|
|
[255]
|
|
|
|
|
2010-09-13 15:09:26 +04:00
|
|
|
Clone and test outgoing:
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg clone repo repo2
|
|
|
|
updating to branch default
|
2011-05-09 19:15:44 +04:00
|
|
|
cloning subrepo foo from $TESTTMP/repo/foo
|
2011-11-16 06:45:14 +04:00
|
|
|
cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
|
2010-09-13 15:09:26 +04:00
|
|
|
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ cd repo2
|
|
|
|
$ hg outgoing -S
|
2011-11-16 06:45:14 +04:00
|
|
|
comparing with $TESTTMP/repo (glob)
|
2010-09-13 15:09:26 +04:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo/foo
|
2010-09-13 15:09:26 +04:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo/foo/bar
|
2010-09-24 14:00:55 +04:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2010-09-17 02:51:32 +04:00
|
|
|
[1]
|
2010-09-13 15:09:26 +04:00
|
|
|
|
|
|
|
Make nested change:
|
|
|
|
|
|
|
|
$ echo y4 >> foo/y.txt
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg diff --nodates -S
|
2010-09-13 15:09:26 +04:00
|
|
|
diff -r 65903cebad86 foo/y.txt
|
|
|
|
--- a/foo/y.txt
|
|
|
|
+++ b/foo/y.txt
|
|
|
|
@@ -1,3 +1,4 @@
|
|
|
|
y1
|
|
|
|
y2
|
|
|
|
y3
|
|
|
|
+y4
|
2011-10-21 02:33:08 +04:00
|
|
|
$ hg commit --subrepos -m 3-4-2
|
2010-09-13 15:09:26 +04:00
|
|
|
committing subrepository foo
|
|
|
|
$ hg outgoing -S
|
2011-11-16 06:45:14 +04:00
|
|
|
comparing with $TESTTMP/repo (glob)
|
2010-09-13 15:09:26 +04:00
|
|
|
searching for changes
|
|
|
|
changeset: 3:2655b8ecc4ee
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 3-4-2
|
|
|
|
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo/foo
|
2010-09-13 15:09:26 +04:00
|
|
|
searching for changes
|
|
|
|
changeset: 4:e96193d6cb36
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 3-4-2
|
|
|
|
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo/foo/bar
|
2010-09-24 14:00:55 +04:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
2010-09-13 15:09:31 +04:00
|
|
|
|
2010-09-28 15:09:22 +04:00
|
|
|
|
2010-09-13 15:09:31 +04:00
|
|
|
Switch to original repo and setup default path:
|
|
|
|
|
|
|
|
$ cd ../repo
|
|
|
|
$ echo '[paths]' >> .hg/hgrc
|
|
|
|
$ echo 'default = ../repo2' >> .hg/hgrc
|
|
|
|
|
|
|
|
Test incoming:
|
|
|
|
|
|
|
|
$ hg incoming -S
|
2011-11-16 06:45:14 +04:00
|
|
|
comparing with $TESTTMP/repo2 (glob)
|
2010-09-13 15:09:31 +04:00
|
|
|
searching for changes
|
|
|
|
changeset: 3:2655b8ecc4ee
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 3-4-2
|
|
|
|
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo2/foo
|
2010-09-13 15:09:31 +04:00
|
|
|
searching for changes
|
|
|
|
changeset: 4:e96193d6cb36
|
|
|
|
tag: tip
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: 3-4-2
|
|
|
|
|
2010-10-09 07:36:10 +04:00
|
|
|
comparing with $TESTTMP/repo2/foo/bar
|
2010-09-24 14:00:55 +04:00
|
|
|
searching for changes
|
|
|
|
no changes found
|
|
|
|
|
2010-09-13 15:09:31 +04:00
|
|
|
$ hg incoming -S --bundle incoming.hg
|
|
|
|
abort: cannot combine --bundle and --subrepos
|
2010-09-17 02:51:32 +04:00
|
|
|
[255]
|
2010-09-13 15:09:31 +04:00
|
|
|
|
2010-09-13 17:13:30 +04:00
|
|
|
Test missing subrepo:
|
|
|
|
|
|
|
|
$ rm -r foo
|
2010-09-28 15:09:22 +04:00
|
|
|
$ hg status -S
|
2010-09-13 17:33:49 +04:00
|
|
|
warning: error "unknown revision '65903cebad86f1a84bd4f1134f62fa7dcb7a1c98'" in subrepository "foo"
|
2011-02-04 11:05:23 +03:00
|
|
|
|
|
|
|
Issue2619: IndexError: list index out of range on hg add with subrepos
|
|
|
|
The subrepo must sorts after the explicit filename.
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ hg init test
|
|
|
|
$ cd test
|
|
|
|
$ hg init x
|
2015-03-26 05:20:44 +03:00
|
|
|
$ echo abc > abc.txt
|
|
|
|
$ hg ci -Am "abc"
|
|
|
|
adding abc.txt
|
2011-02-04 11:05:23 +03:00
|
|
|
$ echo "x = x" >> .hgsub
|
|
|
|
$ hg add .hgsub
|
|
|
|
$ touch a x/a
|
|
|
|
$ hg add a x/a
|
2012-06-11 03:40:51 +04:00
|
|
|
|
2015-03-26 05:20:44 +03:00
|
|
|
$ hg ci -Sm "added x"
|
|
|
|
committing subrepository x
|
|
|
|
$ echo abc > x/a
|
|
|
|
$ hg revert --rev '.^' "set:subrepo('glob:x*')"
|
|
|
|
abort: subrepository 'x' does not exist in 25ac2c9b3180!
|
|
|
|
[255]
|
|
|
|
|
2012-06-11 03:40:51 +04:00
|
|
|
$ cd ..
|