You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you read the previous section about using `git svn`, you can easily use those instructions to `git svn clone` a repository; then, stop using the Subversion server, push to a new Git server, and start using that.
6
-
If you want the history, you can accomplish that as quickly as you can pull the data out of the Subversion server (which may take a while).
4
+
(((Εισαγωγή, από Subversion)))
5
+
Όπως αναφέρεται στην προηγούμενη ενότητα σχετικά με τη χρήση του `git svn`, μπορούμε εύκολα να χρησιμοποιήσουμε αυτές τις οδηγίες για να κλωνοποιήσουμε ένα αποθετήριο SVN με την `git svn clone`· στη συνέχεια, σταματούμε να χρησιμοποιούμε τον διακομιστή Subversion, ωθούμε στον νέο διακομιστή Git και αρχίζουμε να χρησιμοποιούμε αυτόν.
6
+
Εάν θέλουμε το ιστορικό, αυτό είναι κάτι που μπορούμε να το πετύχουμε τόσο γρήγορα όσο γρήγορα μπορούμε να τραβήξουμε τα δεδομένα από τον διακομιστή Subversion (αυτό μπορεί να πάρει διαρκέσει αρκετά).
7
7
8
-
However, the import isn't perfect; and because it will take so long, you may as well do it right.
9
-
The first problem is the author information.
10
-
In Subversion, each person committing has a user on the system who is recorded in the commit information.
11
-
The examples in the previous section show `schacon`in some places, such as the `blame`output and the`git svn log`.
12
-
If you want to map this to better Git author data, you need a mapping from the Subversion users to the Git authors.
13
-
Create a file called `users.txt`that has this mapping in a format like this:
8
+
Ωστόσο, η εισαγωγή δεν είναι τέλεια· και επειδή θα διαρκέσει τόσο πολύ ούτως ή άλλως, ας την κάνουμε σωστά.
9
+
Το πρώτο πρόβλημα είναι οι πληροφορίες του συγγραφέα.
10
+
Στο Subversion, κάθε άτομο που υποβάλλει έχει έναν χρήστη στο σύστημα που καταγράφεται καταγραφεί στις πληροφορίες της υποβολής.
11
+
Τα παραδείγματα στην προηγούμενη ενότητα δείχνουν `schacon`σε ορισμένα σημεία, όπως στις εξόδους των `blame`και`git svn log`.
12
+
Εάν θέλουμε να αντιστοιχίσουμε αυτό για να βελτιώσουμε τις πληροφορίες των συγγραφέων στο Git, χρειάζεστε μια απεικόνιση από τους χρήστες του Subversion στους συγγραφείς του Git.
13
+
Δημιουργούμε ένα αρχείο με όνομα `users.txt`που έχει αυτήν την απεικόνιση στην παρακάτω μορφή:
To get a list of the author names that SVN uses, you can run this:
21
+
Για να αποκτήσουμε μια λίστα με τα ονόματα συγγραφέων που χρησιμοποιεί το SVN, μπορούμε να εκτελέσουμε το εξής:
22
22
23
23
[source,console]
24
24
----
25
25
$ svn log --xml | grep author | sort -u | \
26
26
perl -pe 's/.*>(.*?)<.*/$1 = /'
27
27
----
28
28
29
-
That generates the log output in XML format, then keeps only the lines with author information, discards duplicates, strips out the XML tags.
30
-
(Obviously this only works on a machine with `grep`, `sort`, and`perl` installed.)
31
-
Then, redirect that output into your users.txt file so you can add the equivalent Git user data next to each entry.
29
+
Αυτό δίνει την έξοδο του αρχείου καταγραφής σε μορφή XML, διατηρεί μόνο τις γραμμές με πληροφορίες συγγραφέα, απορρίπτει διπλότυπα, απομακρύνει τις ετικέτες XML.
30
+
(Προφανώς αυτό λειτουργεί μόνο σε ένα μηχάνημα που έχει εγκατεστημένα τα προγράμματα `grep`, `sort` και`perl`.)
31
+
Στη συνέχεια, ανακατευθύνουμε την έξοδο στο αρχείο users.txt, ώστε να μπορούμε να προσθέσουμε τα αντίστοιχα δεδομένα χρήστη Git δίπλα σε κάθε καταχώρηση.
32
32
33
-
You can provide this file to `git svn`to help it map the author data more accurately.
34
-
You can also tell `git svn`not to include the metadata that Subversion normally imports, by passing `--no-metadata`to the`clone`or `init` command.
35
-
This makes your `import`command look like this:
33
+
Μπορούμε να δώσουμε αυτό το αρχείο στην `git svn`για να το βοηθήσουμε να αντιστοιχίσει τα δεδομένα των συγγραφέων με μεγαλύτερη ακρίβεια.
34
+
Μπορούμε επίσης να πούμε στο `git svn`να μην συμπεριλάβει τα μεταδεδομένα που εισάγει το Subversion υπό κανονικές συνθήκες, περνώντας την επιλογή `--no-metadata`στην εντολή`clone`ή την `init`.
35
+
Αυτό κάνει την εντολή `import`μας να μοιάζει με αυτή:
Now you should have a nicer Subversion import in your `my_project` directory.
44
-
Instead of commits that look like this
43
+
Τώρα θα πρέπει να έχουμε μια καλύτερη εισαγωγή από το Subversion στον κατάλογο `my_project`.
44
+
Αντί οι υποβολές που μοιάζουν με αυτό:
45
45
46
46
[source]
47
47
----
@@ -55,7 +55,7 @@ Date: Sun May 3 00:12:22 2009 +0000
55
55
be05-5f7a86268029
56
56
----
57
57
58
-
they look like this:
58
+
μοιάζουν με αυτό:
59
59
60
60
[source]
61
61
----
@@ -68,42 +68,44 @@ Date: Sun May 3 00:12:22 2009 +0000
68
68
69
69
Not only does the Author field look a lot better, but the `git-svn-id` is no longer there, either.
70
70
71
-
You should also do a bit of post-import cleanup.
72
-
For one thing, you should clean up the weird references that `git svn` set up.
73
-
First you'll move the tags so they're actual tags rather than strange remote branches, and then you'll move the rest of the branches so they're local.
71
+
Όχι μόνο το πεδίο ``Author'' φαίνεται πολύ καλύτερα, αλλά επιπλέον το `git-svn-id` δεν βρίσκεται πια εκεί.
74
72
75
-
To move the tags to be proper Git tags, run
73
+
Θα πρέπει επίσης να κάνουμε ένα συμμαζεματάκι μετά την εισαγωγή.
74
+
Κατ' αρχάς, θα πρέπει να καθαρίσουμε τις περίεργες αναφορές που έβαλε η `git svn`.
75
+
Αρχικά θα μετακινήσουμε τις ετικέτες έτσι ώστε να είναι πραγματικές ετικέτες και όχι περίεργοι απομακρυσμένοι κλάδοι και στη συνέχεια θα μετακινήσουμε τους υπόλοιπους κλάδους έτσι ώστε να είναι τοπικοί.
76
+
77
+
Για να μετακινήσουμε τις ετικέτες ώστε να είναι κατάλληλες ετικέτες Git, εκτελούμε:
0 commit comments